@opencode/client 0.0.0-dev-19707 → 0.0.0-dev-19708
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 +3 -0
- package/dist/effect/client.d.ts +13 -0
- package/dist/effect/generated/client.d.ts +13 -0
- package/dist/effect/generated/client.js +5 -1
- package/dist/promise/client.d.ts +1 -0
- package/dist/promise/generated/client.d.ts +1 -0
- package/dist/promise/generated/client.js +7 -0
- package/dist/promise/generated/types.d.ts +18 -7
- package/dist/promise/generated/types.js +1 -1
- package/dist/solid/data.js +7 -0
- package/package.json +4 -4
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -53,8 +53,11 @@ export type LocationGetInput = {
|
|
|
53
53
|
};
|
|
54
54
|
export type LocationGetOutput = Location.PublicInfo;
|
|
55
55
|
export type LocationGetOperation<E = never> = (input?: LocationGetInput) => Effect.Effect<LocationGetOutput, E>;
|
|
56
|
+
export type LocationReloadOutput = void;
|
|
57
|
+
export type LocationReloadOperation<E = never> = () => Effect.Effect<LocationReloadOutput, E>;
|
|
56
58
|
export interface LocationApi<E = never> {
|
|
57
59
|
readonly get: LocationGetOperation<E>;
|
|
60
|
+
readonly reload: LocationReloadOperation<E>;
|
|
58
61
|
}
|
|
59
62
|
export type AgentListInput = {
|
|
60
63
|
readonly location?: {
|
package/dist/effect/client.d.ts
CHANGED
|
@@ -1896,6 +1896,18 @@ export declare const make: (options?: {
|
|
|
1896
1896
|
readonly metadata?: {
|
|
1897
1897
|
readonly [x: string]: unknown;
|
|
1898
1898
|
} | undefined;
|
|
1899
|
+
} | {
|
|
1900
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
1901
|
+
readonly data: {};
|
|
1902
|
+
readonly type: "location.shutdown";
|
|
1903
|
+
readonly created: number;
|
|
1904
|
+
readonly location?: {
|
|
1905
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
1906
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
1907
|
+
} | undefined;
|
|
1908
|
+
readonly metadata?: {
|
|
1909
|
+
readonly [x: string]: unknown;
|
|
1910
|
+
} | undefined;
|
|
1899
1911
|
} | {
|
|
1900
1912
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
1901
1913
|
readonly data: {
|
|
@@ -2236,6 +2248,7 @@ export declare const make: (options?: {
|
|
|
2236
2248
|
};
|
|
2237
2249
|
location: {
|
|
2238
2250
|
get: (input?: import("./api.js").LocationGetInput) => Effect.Effect<import("@opencode/schema/location").PublicInfo, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2251
|
+
reload: () => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ServiceUnavailableError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2239
2252
|
};
|
|
2240
2253
|
agent: {
|
|
2241
2254
|
list: (input?: import("./api.js").AgentListInput) => Effect.Effect<import("./api.js").AgentListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
@@ -11,6 +11,7 @@ export declare const make: (options?: {
|
|
|
11
11
|
};
|
|
12
12
|
location: {
|
|
13
13
|
get: (input?: LocationGetInput) => Effect.Effect<import("@opencode/schema/location").PublicInfo, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
14
|
+
reload: () => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ServiceUnavailableError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
14
15
|
};
|
|
15
16
|
agent: {
|
|
16
17
|
list: (input?: AgentListInput) => Effect.Effect<AgentListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
@@ -2050,6 +2051,18 @@ export declare const make: (options?: {
|
|
|
2050
2051
|
readonly metadata?: {
|
|
2051
2052
|
readonly [x: string]: unknown;
|
|
2052
2053
|
} | undefined;
|
|
2054
|
+
} | {
|
|
2055
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
2056
|
+
readonly data: {};
|
|
2057
|
+
readonly type: "location.shutdown";
|
|
2058
|
+
readonly created: number;
|
|
2059
|
+
readonly location?: {
|
|
2060
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
2061
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
2062
|
+
} | undefined;
|
|
2063
|
+
readonly metadata?: {
|
|
2064
|
+
readonly [x: string]: unknown;
|
|
2065
|
+
} | undefined;
|
|
2053
2066
|
} | {
|
|
2054
2067
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
2055
2068
|
readonly data: {
|
|
@@ -13,7 +13,11 @@ const preserveStream = () => (stream) => stream;
|
|
|
13
13
|
const EndpointServerStatus = (raw) => () => preserveEffect()(raw["server.status"]({}).pipe(Effect.mapError(mapClientError)));
|
|
14
14
|
const adaptGroupServer = (raw) => ({ status: EndpointServerStatus(raw) });
|
|
15
15
|
const EndpointLocationGet = (raw) => (input) => preserveEffect()(raw["location.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
16
|
-
const
|
|
16
|
+
const EndpointLocationReload = (raw) => () => preserveEffect()(raw["location.reload"]({}).pipe(Effect.mapError(mapClientError)));
|
|
17
|
+
const adaptGroupLocation = (raw) => ({
|
|
18
|
+
get: EndpointLocationGet(raw),
|
|
19
|
+
reload: EndpointLocationReload(raw),
|
|
20
|
+
});
|
|
17
21
|
const EndpointAgentList = (raw) => (input) => preserveEffect()(raw["agent.list"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
18
22
|
const EndpointAgentGet = (raw) => (input) => preserveEffect()(raw["agent.get"]({ params: { agentID: input["agentID"] }, query: { location: input["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
19
23
|
const adaptGroupAgent = (raw) => ({
|
package/dist/promise/client.d.ts
CHANGED
|
@@ -15,6 +15,7 @@ export declare function make(options: ClientOptions): {
|
|
|
15
15
|
};
|
|
16
16
|
location: {
|
|
17
17
|
get: (input?: import("./index.js").LocationGetInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").LocationPublicInfo>;
|
|
18
|
+
reload: (requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
18
19
|
};
|
|
19
20
|
agent: {
|
|
20
21
|
list: (input?: import("./index.js").AgentListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").AgentListOutput>;
|
|
@@ -16,6 +16,7 @@ export declare function make(options: ClientOptions): {
|
|
|
16
16
|
};
|
|
17
17
|
location: {
|
|
18
18
|
get: (input?: LocationGetInput, requestOptions?: RequestOptions) => Promise<import("./types.js").LocationPublicInfo>;
|
|
19
|
+
reload: (requestOptions?: RequestOptions) => Promise<void>;
|
|
19
20
|
};
|
|
20
21
|
agent: {
|
|
21
22
|
list: (input?: AgentListInput, requestOptions?: RequestOptions) => Promise<AgentListOutput>;
|
|
@@ -141,6 +141,13 @@ export function make(options) {
|
|
|
141
141
|
declaredStatuses: [400, 401],
|
|
142
142
|
empty: false,
|
|
143
143
|
}, requestOptions),
|
|
144
|
+
reload: (requestOptions) => request({
|
|
145
|
+
method: "POST",
|
|
146
|
+
path: `/api/location/reload`,
|
|
147
|
+
successStatus: 204,
|
|
148
|
+
declaredStatuses: [400, 401, 503],
|
|
149
|
+
empty: true,
|
|
150
|
+
}, requestOptions),
|
|
144
151
|
},
|
|
145
152
|
agent: {
|
|
146
153
|
list: (input, requestOptions) => request({
|
|
@@ -1369,6 +1369,16 @@ export type SessionUsageRecorded = {
|
|
|
1369
1369
|
tokens: TokenUsageInfo;
|
|
1370
1370
|
};
|
|
1371
1371
|
};
|
|
1372
|
+
export type LocationShutdown = {
|
|
1373
|
+
id: string;
|
|
1374
|
+
created: number;
|
|
1375
|
+
metadata?: {
|
|
1376
|
+
[x: string]: any;
|
|
1377
|
+
};
|
|
1378
|
+
type: "location.shutdown";
|
|
1379
|
+
location?: LocationRef;
|
|
1380
|
+
data: {};
|
|
1381
|
+
};
|
|
1372
1382
|
export type ModelsDevRefreshed = {
|
|
1373
1383
|
id: string;
|
|
1374
1384
|
created: number;
|
|
@@ -3249,7 +3259,7 @@ export type IntegrationInfo = {
|
|
|
3249
3259
|
methods: Array<IntegrationMethod>;
|
|
3250
3260
|
connections: Array<ConnectionInfo>;
|
|
3251
3261
|
};
|
|
3252
|
-
export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionPermissions | 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;
|
|
3262
|
+
export type V2Event = LocationShutdown | ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | ProviderUpdated | ModelUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionPermissions | 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;
|
|
3253
3263
|
export type SessionLogItem = SessionEventDurable | EventLogSynced;
|
|
3254
3264
|
export type InvalidRequestError = {
|
|
3255
3265
|
readonly _tag: "InvalidRequestError";
|
|
@@ -3263,18 +3273,18 @@ export type UnauthorizedError = {
|
|
|
3263
3273
|
readonly message: string;
|
|
3264
3274
|
};
|
|
3265
3275
|
export declare const isUnauthorizedError: (value: unknown) => value is UnauthorizedError;
|
|
3266
|
-
export type AgentNotFoundError = {
|
|
3267
|
-
readonly _tag: "AgentNotFoundError";
|
|
3268
|
-
readonly agentID: string;
|
|
3269
|
-
readonly message: string;
|
|
3270
|
-
};
|
|
3271
|
-
export declare const isAgentNotFoundError: (value: unknown) => value is AgentNotFoundError;
|
|
3272
3276
|
export type ServiceUnavailableError = {
|
|
3273
3277
|
readonly _tag: "ServiceUnavailableError";
|
|
3274
3278
|
readonly message: string;
|
|
3275
3279
|
readonly service?: string | undefined;
|
|
3276
3280
|
};
|
|
3277
3281
|
export declare const isServiceUnavailableError: (value: unknown) => value is ServiceUnavailableError;
|
|
3282
|
+
export type AgentNotFoundError = {
|
|
3283
|
+
readonly _tag: "AgentNotFoundError";
|
|
3284
|
+
readonly agentID: string;
|
|
3285
|
+
readonly message: string;
|
|
3286
|
+
};
|
|
3287
|
+
export declare const isAgentNotFoundError: (value: unknown) => value is AgentNotFoundError;
|
|
3278
3288
|
export type InvalidCursorError = {
|
|
3279
3289
|
readonly _tag: "InvalidCursorError";
|
|
3280
3290
|
readonly message: string;
|
|
@@ -3452,6 +3462,7 @@ export type LocationGetInput = {
|
|
|
3452
3462
|
}["location"];
|
|
3453
3463
|
};
|
|
3454
3464
|
export type LocationGetOutput = LocationPublicInfo;
|
|
3465
|
+
export type LocationReloadOutput = void;
|
|
3455
3466
|
export type AgentListInput = {
|
|
3456
3467
|
readonly location?: {
|
|
3457
3468
|
readonly location?: {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export const isInvalidRequestError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidRequestError";
|
|
2
2
|
export const isUnauthorizedError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "UnauthorizedError";
|
|
3
|
-
export const isAgentNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "AgentNotFoundError";
|
|
4
3
|
export const isServiceUnavailableError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ServiceUnavailableError";
|
|
4
|
+
export const isAgentNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "AgentNotFoundError";
|
|
5
5
|
export const isInvalidCursorError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "InvalidCursorError";
|
|
6
6
|
export const isSessionNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "SessionNotFoundError";
|
|
7
7
|
export const isConflictError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "ConflictError";
|
package/dist/solid/data.js
CHANGED
|
@@ -448,6 +448,13 @@ export function createData(config) {
|
|
|
448
448
|
}
|
|
449
449
|
function handleEvent(event) {
|
|
450
450
|
switch (event.type) {
|
|
451
|
+
case "location.shutdown": {
|
|
452
|
+
if (!event.location)
|
|
453
|
+
return;
|
|
454
|
+
result.location.invalidate(event.location);
|
|
455
|
+
refresh(() => result.location.sync(event.location));
|
|
456
|
+
return;
|
|
457
|
+
}
|
|
451
458
|
case "server.connected": {
|
|
452
459
|
const updates = new Map();
|
|
453
460
|
activeUpdates = updates;
|
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-
|
|
4
|
+
"version": "0.0.0-dev-19708",
|
|
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-
|
|
61
|
-
"@opencode/protocol": "0.0.0-dev-
|
|
60
|
+
"@opencode/schema": "0.0.0-dev-19708",
|
|
61
|
+
"@opencode/protocol": "0.0.0-dev-19708"
|
|
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-
|
|
77
|
+
"@opencode/httpapi-codegen": "0.0.0-dev-19708",
|
|
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",
|