@opencode-ai/client 0.0.0-next-14983 → 0.0.0-next-14986
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 +1 -4
- package/dist/effect/generated/client.d.ts +2 -18
- package/dist/effect/generated/client.js +2 -3
- package/dist/promise/generated/client.d.ts +6 -3
- package/dist/promise/generated/client.js +2 -3
- package/dist/promise/generated/types.d.ts +1 -15
- package/package.json +4 -4
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export type Endpoint4_1Input = {
|
|
|
59
59
|
};
|
|
60
60
|
export type Endpoint4_1Output = EffectValue<ReturnType<RawClient["server.session"]["session.create"]>>["data"];
|
|
61
61
|
export type SessionCreateOperation<E = never> = (input?: Endpoint4_1Input) => Effect.Effect<Endpoint4_1Output, E>;
|
|
62
|
-
export type Endpoint4_2Output = EffectValue<ReturnType<RawClient["server.session"]["session.active"]
|
|
62
|
+
export type Endpoint4_2Output = EffectValue<ReturnType<RawClient["server.session"]["session.active"]>>["data"];
|
|
63
63
|
export type SessionActiveOperation<E = never> = () => Effect.Effect<Endpoint4_2Output, E>;
|
|
64
64
|
type Endpoint4_3Request = Parameters<RawClient["server.session"]["session.get"]>[0];
|
|
65
65
|
export type Endpoint4_3Input = {
|
|
@@ -591,11 +591,8 @@ export interface SkillApi<E = never> {
|
|
|
591
591
|
}
|
|
592
592
|
export type Endpoint18_0Output = StreamValue<EffectValue<ReturnType<RawClient["server.event"]["event.subscribe"]>>>;
|
|
593
593
|
export type EventSubscribeOperation<E = never> = () => Stream.Stream<Endpoint18_0Output, E>;
|
|
594
|
-
export type Endpoint18_1Output = StreamValue<EffectValue<ReturnType<RawClient["server.event"]["event.changes"]>>>;
|
|
595
|
-
export type EventChangesOperation<E = never> = () => Stream.Stream<Endpoint18_1Output, E>;
|
|
596
594
|
export interface EventApi<E = never> {
|
|
597
595
|
readonly subscribe: EventSubscribeOperation<E>;
|
|
598
|
-
readonly changes: EventChangesOperation<E>;
|
|
599
596
|
}
|
|
600
597
|
type Endpoint19_0Request = Parameters<RawClient["server.pty"]["pty.list"]>[0];
|
|
601
598
|
export type Endpoint19_0Input = {
|
|
@@ -568,9 +568,6 @@ export declare const make: (options?: {
|
|
|
568
568
|
}[] | undefined;
|
|
569
569
|
} | undefined;
|
|
570
570
|
}[];
|
|
571
|
-
readonly watermarks: {
|
|
572
|
-
readonly [x: string & import("effect/Brand").Brand<"SessionID">]: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
573
|
-
};
|
|
574
571
|
readonly cursor: {
|
|
575
572
|
readonly previous?: (string & import("effect/Brand").Brand<"SessionsCursor">) | undefined;
|
|
576
573
|
readonly next?: (string & import("effect/Brand").Brand<"SessionsCursor">) | undefined;
|
|
@@ -622,13 +619,8 @@ export declare const make: (options?: {
|
|
|
622
619
|
} | undefined;
|
|
623
620
|
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
624
621
|
active: () => Effect.Effect<{
|
|
625
|
-
readonly
|
|
626
|
-
readonly
|
|
627
|
-
readonly type: "running";
|
|
628
|
-
};
|
|
629
|
-
};
|
|
630
|
-
readonly watermarks: {
|
|
631
|
-
readonly [x: string & import("effect/Brand").Brand<"SessionID">]: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
622
|
+
readonly [x: string & import("effect/Brand").Brand<"SessionID">]: {
|
|
623
|
+
readonly type: "running";
|
|
632
624
|
};
|
|
633
625
|
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | ClientError, never>;
|
|
634
626
|
get: (input: Endpoint4_3Input) => Effect.Effect<{
|
|
@@ -2512,7 +2504,6 @@ export declare const make: (options?: {
|
|
|
2512
2504
|
readonly previous?: string | undefined;
|
|
2513
2505
|
readonly next?: string | undefined;
|
|
2514
2506
|
};
|
|
2515
|
-
readonly watermark?: (number & import("effect/Brand").Brand<"Event.Seq">) | undefined;
|
|
2516
2507
|
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").UnknownError | import("@opencode-ai/protocol/errors").SessionNotFoundError | import("@opencode-ai/protocol/errors").InvalidCursorError | HttpClientError.HttpClientError | ClientError, never>;
|
|
2517
2508
|
};
|
|
2518
2509
|
model: {
|
|
@@ -5912,13 +5903,6 @@ export declare const make: (options?: {
|
|
|
5912
5903
|
readonly workspaceID?: (string & import("effect/Brand").Brand<"WorkspaceV2.ID">) | undefined;
|
|
5913
5904
|
} | undefined;
|
|
5914
5905
|
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | Sse.Retry | ClientError, never>;
|
|
5915
|
-
changes: () => Stream.Stream<{
|
|
5916
|
-
readonly type: "log.hint";
|
|
5917
|
-
readonly aggregateID: string;
|
|
5918
|
-
readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
5919
|
-
} | {
|
|
5920
|
-
readonly type: "log.sweep_required";
|
|
5921
|
-
}, import("@opencode-ai/protocol/errors").InvalidRequestError | Schema.SchemaError | import("@opencode-ai/protocol/errors").UnauthorizedError | HttpClientError.HttpClientError | Sse.Retry | ClientError, never>;
|
|
5922
5906
|
};
|
|
5923
5907
|
pty: {
|
|
5924
5908
|
list: (input?: Endpoint19_0Input) => Effect.Effect<{
|
|
@@ -32,7 +32,7 @@ const Endpoint4_0 = (raw) => (input) => raw["session.list"]({
|
|
|
32
32
|
const Endpoint4_1 = (raw) => (input) => raw["session.create"]({
|
|
33
33
|
payload: { id: input?.["id"], agent: input?.["agent"], model: input?.["model"], location: input?.["location"] },
|
|
34
34
|
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data));
|
|
35
|
-
const Endpoint4_2 = (raw) => () => raw["session.active"]({}).pipe(Effect.mapError(mapClientError));
|
|
35
|
+
const Endpoint4_2 = (raw) => () => raw["session.active"]({}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data));
|
|
36
36
|
const Endpoint4_3 = (raw) => (input) => raw["session.get"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data));
|
|
37
37
|
const Endpoint4_4 = (raw) => (input) => raw["session.fork"]({ params: { sessionID: input["sessionID"] }, payload: { messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data));
|
|
38
38
|
const Endpoint4_5 = (raw) => (input) => raw["session.switchAgent"]({ params: { sessionID: input["sessionID"] }, payload: { agent: input["agent"] } }).pipe(Effect.mapError(mapClientError));
|
|
@@ -263,8 +263,7 @@ const adaptGroup16 = (raw) => ({ list: Endpoint16_0(raw) });
|
|
|
263
263
|
const Endpoint17_0 = (raw) => (input) => raw["skill.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
|
|
264
264
|
const adaptGroup17 = (raw) => ({ list: Endpoint17_0(raw) });
|
|
265
265
|
const Endpoint18_0 = (raw) => () => Stream.unwrap(raw["event.subscribe"]({}).pipe(Effect.mapError(mapClientError), Effect.map((stream) => stream.pipe(Stream.mapError(mapClientError)))));
|
|
266
|
-
const
|
|
267
|
-
const adaptGroup18 = (raw) => ({ subscribe: Endpoint18_0(raw), changes: Endpoint18_1(raw) });
|
|
266
|
+
const adaptGroup18 = (raw) => ({ subscribe: Endpoint18_0(raw) });
|
|
268
267
|
const Endpoint19_0 = (raw) => (input) => raw["pty.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError));
|
|
269
268
|
const Endpoint19_1 = (raw) => (input) => raw["pty.create"]({
|
|
270
269
|
query: { location: input?.["location"] },
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput,
|
|
1
|
+
import type { HealthGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, PluginListInput, PluginListOutput, SessionListInput, SessionListOutput, SessionCreateInput, 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, 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;
|
|
@@ -68,7 +68,11 @@ export declare function make(options: ClientOptions): {
|
|
|
68
68
|
}>;
|
|
69
69
|
};
|
|
70
70
|
}>;
|
|
71
|
-
active: (requestOptions?: RequestOptions) => Promise<
|
|
71
|
+
active: (requestOptions?: RequestOptions) => Promise<{
|
|
72
|
+
readonly [x: string]: {
|
|
73
|
+
readonly type: "running";
|
|
74
|
+
};
|
|
75
|
+
}>;
|
|
72
76
|
get: (input: SessionGetInput, requestOptions?: RequestOptions) => Promise<{
|
|
73
77
|
readonly id: string;
|
|
74
78
|
readonly parentID?: string;
|
|
@@ -1242,7 +1246,6 @@ export declare function make(options: ClientOptions): {
|
|
|
1242
1246
|
};
|
|
1243
1247
|
event: {
|
|
1244
1248
|
subscribe: (requestOptions?: RequestOptions) => AsyncIterable<EventSubscribeOutput>;
|
|
1245
|
-
changes: (requestOptions?: RequestOptions) => AsyncIterable<EventChangesOutput>;
|
|
1246
1249
|
};
|
|
1247
1250
|
pty: {
|
|
1248
1251
|
list: (input?: PtyListInput, requestOptions?: RequestOptions) => Promise<PtyListOutput>;
|
|
@@ -197,7 +197,7 @@ export function make(options) {
|
|
|
197
197
|
successStatus: 200,
|
|
198
198
|
declaredStatuses: [401, 400],
|
|
199
199
|
empty: false,
|
|
200
|
-
}, requestOptions),
|
|
200
|
+
}, requestOptions).then((value) => value.data),
|
|
201
201
|
get: (input, requestOptions) => request({
|
|
202
202
|
method: "GET",
|
|
203
203
|
path: `/api/session/${encodeURIComponent(input.sessionID)}`,
|
|
@@ -354,7 +354,7 @@ export function make(options) {
|
|
|
354
354
|
}, requestOptions),
|
|
355
355
|
log: (input, requestOptions) => sse({
|
|
356
356
|
method: "GET",
|
|
357
|
-
path: `/api/session/${encodeURIComponent(input.sessionID)}/log`,
|
|
357
|
+
path: `/api/experimental/session/${encodeURIComponent(input.sessionID)}/log`,
|
|
358
358
|
query: { after: input["after"], follow: input["follow"] },
|
|
359
359
|
successStatus: 200,
|
|
360
360
|
declaredStatuses: [404, 400, 401],
|
|
@@ -721,7 +721,6 @@ export function make(options) {
|
|
|
721
721
|
},
|
|
722
722
|
event: {
|
|
723
723
|
subscribe: (requestOptions) => sse({ method: "GET", path: `/api/event`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
724
|
-
changes: (requestOptions) => sse({ method: "GET", path: `/api/event/changes`, successStatus: 200, declaredStatuses: [401, 400], empty: false }, requestOptions),
|
|
725
724
|
},
|
|
726
725
|
pty: {
|
|
727
726
|
list: (input, requestOptions) => request({
|
|
@@ -366,9 +366,6 @@ export type SessionListOutput = {
|
|
|
366
366
|
}>;
|
|
367
367
|
};
|
|
368
368
|
}>;
|
|
369
|
-
readonly watermarks: {
|
|
370
|
-
readonly [x: string]: number;
|
|
371
|
-
};
|
|
372
369
|
readonly cursor: {
|
|
373
370
|
readonly previous?: string | null;
|
|
374
371
|
readonly next?: string | null;
|
|
@@ -481,10 +478,7 @@ export type SessionActiveOutput = {
|
|
|
481
478
|
readonly type: "running";
|
|
482
479
|
};
|
|
483
480
|
};
|
|
484
|
-
|
|
485
|
-
readonly [x: string]: number;
|
|
486
|
-
};
|
|
487
|
-
};
|
|
481
|
+
}["data"];
|
|
488
482
|
export type SessionGetInput = {
|
|
489
483
|
readonly sessionID: {
|
|
490
484
|
readonly sessionID: string;
|
|
@@ -2988,7 +2982,6 @@ export type MessageListOutput = {
|
|
|
2988
2982
|
readonly created: number;
|
|
2989
2983
|
};
|
|
2990
2984
|
}>;
|
|
2991
|
-
readonly watermark?: number;
|
|
2992
2985
|
readonly cursor: {
|
|
2993
2986
|
readonly previous?: string | null;
|
|
2994
2987
|
readonly next?: string | null;
|
|
@@ -7679,13 +7672,6 @@ export type EventSubscribeOutput = {
|
|
|
7679
7672
|
readonly type: "server.connected";
|
|
7680
7673
|
readonly data: {};
|
|
7681
7674
|
};
|
|
7682
|
-
export type EventChangesOutput = {
|
|
7683
|
-
readonly type: "log.hint";
|
|
7684
|
-
readonly aggregateID: string;
|
|
7685
|
-
readonly seq: number;
|
|
7686
|
-
} | {
|
|
7687
|
-
readonly type: "log.sweep_required";
|
|
7688
|
-
};
|
|
7689
7675
|
export type PtyListInput = {
|
|
7690
7676
|
readonly location?: {
|
|
7691
7677
|
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-14986",
|
|
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-14986",
|
|
45
|
+
"@opencode-ai/protocol": "0.0.0-next-14986"
|
|
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-14986",
|
|
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",
|