@opencode/client 2.0.1 → 2.0.3
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 +29 -1
- package/dist/effect/client.d.ts +4 -0
- package/dist/effect/generated/client.d.ts +5 -1
- package/dist/effect/generated/client.js +14 -1
- package/dist/promise/client.d.ts +5 -1
- package/dist/promise/generated/client.d.ts +6 -2
- package/dist/promise/generated/client.js +25 -1
- package/dist/promise/generated/types.d.ts +102 -4
- package/dist/promise/generated/types.js +1 -0
- package/dist/solid/data.js +11 -0
- package/package.json +4 -4
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ import type { PromptInput } from "@opencode/schema/prompt-input";
|
|
|
17
17
|
import type { AgentAttachment } from "@opencode/schema/prompt";
|
|
18
18
|
import type { Skill } from "@opencode/schema/skill";
|
|
19
19
|
import type { Event } from "@opencode/schema/event";
|
|
20
|
+
import type { FileDiff } from "@opencode/schema/file-diff";
|
|
20
21
|
import type { InstructionEntry } from "@opencode/schema/instruction-entry";
|
|
21
22
|
import type { Schema } from "effect";
|
|
22
23
|
import type { EventLog } from "@opencode/schema/event-log";
|
|
@@ -35,7 +36,6 @@ import type { PtyTicket } from "@opencode/schema/pty-ticket";
|
|
|
35
36
|
import type { Reference } from "@opencode/schema/reference";
|
|
36
37
|
import type { Worktree } from "@opencode/schema/worktree";
|
|
37
38
|
import type { Vcs } from "@opencode/schema/vcs";
|
|
38
|
-
import type { FileDiff } from "@opencode/schema/file-diff";
|
|
39
39
|
import type { WebSearch } from "@opencode/schema/websearch";
|
|
40
40
|
import type { Config } from "@opencode/schema/config";
|
|
41
41
|
export type HealthGetOutput = {
|
|
@@ -395,6 +395,14 @@ export type SessionContextInput = {
|
|
|
395
395
|
};
|
|
396
396
|
export type SessionContextOutput = ReadonlyArray<SessionMessage.Info>;
|
|
397
397
|
export type SessionContextOperation<E = never> = (input: SessionContextInput) => Effect.Effect<SessionContextOutput, E>;
|
|
398
|
+
export type SessionDiffInput = {
|
|
399
|
+
readonly sessionID: Session.ID;
|
|
400
|
+
readonly from?: SessionMessage.ID | undefined;
|
|
401
|
+
readonly to?: SessionMessage.ID | undefined;
|
|
402
|
+
readonly context?: number | undefined;
|
|
403
|
+
};
|
|
404
|
+
export type SessionDiffOutput = ReadonlyArray<FileDiff.Info>;
|
|
405
|
+
export type SessionDiffOperation<E = never> = (input: SessionDiffInput) => Effect.Effect<SessionDiffOutput, E>;
|
|
398
406
|
export type SessionInboxListInput = {
|
|
399
407
|
readonly sessionID: Session.ID;
|
|
400
408
|
};
|
|
@@ -1471,6 +1479,7 @@ export interface SessionApi<E = never> {
|
|
|
1471
1479
|
readonly commit: SessionRevertCommitOperation<E>;
|
|
1472
1480
|
};
|
|
1473
1481
|
readonly context: SessionContextOperation<E>;
|
|
1482
|
+
readonly diff: SessionDiffOperation<E>;
|
|
1474
1483
|
readonly inbox: {
|
|
1475
1484
|
readonly list: SessionInboxListOperation<E>;
|
|
1476
1485
|
readonly cancel: SessionInboxCancelOperation<E>;
|
|
@@ -2659,8 +2668,27 @@ export type ConfigGetInput = {
|
|
|
2659
2668
|
};
|
|
2660
2669
|
export type ConfigGetOutput = ReadonlyArray<Config.Entry>;
|
|
2661
2670
|
export type ConfigGetOperation<E = never> = (input?: ConfigGetInput) => Effect.Effect<ConfigGetOutput, E>;
|
|
2671
|
+
export type ConfigPreferencesOutput = Config.Preferences;
|
|
2672
|
+
export type ConfigPreferencesOperation<E = never> = () => Effect.Effect<ConfigPreferencesOutput, E>;
|
|
2673
|
+
export type ConfigUpdatePreferencesInput = {
|
|
2674
|
+
readonly shell?: string | null | undefined;
|
|
2675
|
+
readonly websearch?: false | {
|
|
2676
|
+
readonly provider: "random" | WebSearch.ID;
|
|
2677
|
+
} | null | undefined;
|
|
2678
|
+
};
|
|
2679
|
+
export type ConfigUpdatePreferencesOutput = Config.Preferences;
|
|
2680
|
+
export type ConfigUpdatePreferencesOperation<E = never> = (input?: ConfigUpdatePreferencesInput) => Effect.Effect<ConfigUpdatePreferencesOutput, E>;
|
|
2681
|
+
export type ConfigShellsOutput = ReadonlyArray<{
|
|
2682
|
+
readonly path: string;
|
|
2683
|
+
readonly name: string;
|
|
2684
|
+
readonly acceptable: boolean;
|
|
2685
|
+
}>;
|
|
2686
|
+
export type ConfigShellsOperation<E = never> = () => Effect.Effect<ConfigShellsOutput, E>;
|
|
2662
2687
|
export interface ConfigApi<E = never> {
|
|
2663
2688
|
readonly get: ConfigGetOperation<E>;
|
|
2689
|
+
readonly preferences: ConfigPreferencesOperation<E>;
|
|
2690
|
+
readonly updatePreferences: ConfigUpdatePreferencesOperation<E>;
|
|
2691
|
+
readonly shells: ConfigShellsOperation<E>;
|
|
2664
2692
|
}
|
|
2665
2693
|
export interface AppApi<E = never> {
|
|
2666
2694
|
readonly health: HealthApi<E>;
|
package/dist/effect/client.d.ts
CHANGED
|
@@ -2268,6 +2268,7 @@ export declare const make: (options?: {
|
|
|
2268
2268
|
commit: (input: import("./api.js").SessionRevertCommitInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").SessionBusyError | import("@opencode/protocol/errors").SessionNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2269
2269
|
};
|
|
2270
2270
|
context: (input: import("./api.js").SessionContextInput) => Effect.Effect<import("./api.js").SessionContextOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnknownError | import("@opencode/protocol/errors").SessionNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2271
|
+
diff: (input: import("./api.js").SessionDiffInput) => Effect.Effect<import("./api.js").SessionDiffOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnknownError | import("@opencode/protocol/errors").SessionNotFoundError | import("@opencode/protocol/errors").MessageNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2271
2272
|
inbox: {
|
|
2272
2273
|
list: (input: import("./api.js").SessionInboxListInput) => Effect.Effect<import("./api.js").SessionInboxListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").SessionNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2273
2274
|
cancel: (input: import("./api.js").SessionInboxCancelInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ConflictError | import("@opencode/protocol/errors").SessionNotFoundError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
@@ -2460,5 +2461,8 @@ export declare const make: (options?: {
|
|
|
2460
2461
|
};
|
|
2461
2462
|
config: {
|
|
2462
2463
|
get: (input?: import("./api.js").ConfigGetInput) => Effect.Effect<import("./api.js").ConfigGetOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2464
|
+
preferences: () => Effect.Effect<import("@opencode/schema/config").Preferences, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2465
|
+
updatePreferences: (input?: import("./api.js").ConfigUpdatePreferencesInput) => Effect.Effect<import("@opencode/schema/config").Preferences, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2466
|
+
shells: () => Effect.Effect<import("./api.js").ConfigShellsOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("effect/Schema").SchemaError | ClientError | import("effect/unstable/http/HttpClientError").HttpClientError, never>;
|
|
2463
2467
|
};
|
|
2464
2468
|
}, never, HttpClient.HttpClient>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Effect, Stream, Schema } from "effect";
|
|
2
2
|
import { Sse } from "effect/unstable/encoding";
|
|
3
3
|
import { HttpClientError } from "effect/unstable/http";
|
|
4
|
-
import type { HealthGetOutput, ServerGetOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginAwaitActivationInput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormListOutput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, PermissionRulesInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "../api/api.js";
|
|
4
|
+
import type { HealthGetOutput, ServerGetOutput, LocationGetInput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginAwaitActivationInput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionListOutput, SessionStatsInput, SessionStatsOutput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionExportOutput, SessionActiveOutput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionContextOutput, SessionDiffInput, SessionDiffOutput, SessionInboxListInput, SessionInboxListOutput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryListOutput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionGenerateOutput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionInterruptOutput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, MessageListOutput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, GenerateTextOutput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormListOutput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedListOutput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionCreateOutput, PermissionListInput, PermissionListOutput, PermissionGetInput, PermissionReplyInput, PermissionRulesInput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, RpcCallOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyReadOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyGetOutput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtyUpdateOutput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtySnapshotOutput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput, ConfigUpdatePreferencesInput, ConfigShellsOutput } from "../api/api.js";
|
|
5
5
|
import { ClientError } from "./client-error.js";
|
|
6
6
|
export declare const make: (options?: {
|
|
7
7
|
readonly baseUrl?: URL | string;
|
|
@@ -52,6 +52,7 @@ export declare const make: (options?: {
|
|
|
52
52
|
commit: (input: SessionRevertCommitInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").SessionBusyError | import("@opencode/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
53
53
|
};
|
|
54
54
|
context: (input: SessionContextInput) => Effect.Effect<SessionContextOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnknownError | import("@opencode/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
55
|
+
diff: (input: SessionDiffInput) => Effect.Effect<SessionDiffOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").UnknownError | import("@opencode/protocol/errors").SessionNotFoundError | import("@opencode/protocol/errors").MessageNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
55
56
|
inbox: {
|
|
56
57
|
list: (input: SessionInboxListInput) => Effect.Effect<SessionInboxListOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
57
58
|
cancel: (input: SessionInboxCancelInput) => Effect.Effect<void, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | import("@opencode/protocol/errors").ConflictError | import("@opencode/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
@@ -2459,5 +2460,8 @@ export declare const make: (options?: {
|
|
|
2459
2460
|
};
|
|
2460
2461
|
config: {
|
|
2461
2462
|
get: (input?: ConfigGetInput) => Effect.Effect<ConfigGetOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
2463
|
+
preferences: () => Effect.Effect<import("@opencode/schema/config").Preferences, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
2464
|
+
updatePreferences: (input?: ConfigUpdatePreferencesInput) => Effect.Effect<import("@opencode/schema/config").Preferences, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
2465
|
+
shells: () => Effect.Effect<ConfigShellsOutput, import("@opencode/protocol/errors").InvalidRequestError | import("@opencode/protocol/errors").UnauthorizedError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
2462
2466
|
};
|
|
2463
2467
|
}, never, import("effect/unstable/http/HttpClient").HttpClient>;
|
|
@@ -135,6 +135,10 @@ const EndpointSessionRevertStage = (raw) => (input) => preserveEffect()(raw["ses
|
|
|
135
135
|
const EndpointSessionRevertClear = (raw) => (input) => preserveEffect()(raw["session.revert.clear"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
136
136
|
const EndpointSessionRevertCommit = (raw) => (input) => preserveEffect()(raw["session.revert.commit"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
137
137
|
const EndpointSessionContext = (raw) => (input) => preserveEffect()(raw["session.context"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
138
|
+
const EndpointSessionDiff = (raw) => (input) => preserveEffect()(raw["session.diff"]({
|
|
139
|
+
params: { sessionID: input["sessionID"] },
|
|
140
|
+
query: { from: input["from"], to: input["to"], context: input["context"] },
|
|
141
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
138
142
|
const EndpointSessionInboxList = (raw) => (input) => preserveEffect()(raw["session.inbox.list"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
139
143
|
const EndpointSessionInboxCancel = (raw) => (input) => preserveEffect()(raw["session.inbox.cancel"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
140
144
|
const EndpointSessionInboxSteer = (raw) => (input) => preserveEffect()(raw["session.inbox.steer"]({ params: { sessionID: input["sessionID"], inboxID: input["inboxID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
@@ -188,6 +192,7 @@ const adaptGroupSession = (raw) => ({
|
|
|
188
192
|
commit: EndpointSessionRevertCommit(raw),
|
|
189
193
|
},
|
|
190
194
|
context: EndpointSessionContext(raw),
|
|
195
|
+
diff: EndpointSessionDiff(raw),
|
|
191
196
|
inbox: {
|
|
192
197
|
list: EndpointSessionInboxList(raw),
|
|
193
198
|
cancel: EndpointSessionInboxCancel(raw),
|
|
@@ -565,7 +570,15 @@ const adaptGroupWebsearch = (raw) => ({
|
|
|
565
570
|
query: EndpointWebsearchQuery(raw),
|
|
566
571
|
});
|
|
567
572
|
const EndpointConfigGet = (raw) => (input) => preserveEffect()(raw["config.get"]({ query: { location: input?.["location"] } }).pipe(Effect.mapError(mapClientError)));
|
|
568
|
-
const
|
|
573
|
+
const EndpointConfigPreferences = (raw) => () => preserveEffect()(raw["config.preferences"]({}).pipe(Effect.mapError(mapClientError)));
|
|
574
|
+
const EndpointConfigUpdatePreferences = (raw) => (input) => preserveEffect()(raw["config.updatePreferences"]({ payload: { shell: input?.["shell"], websearch: input?.["websearch"] } }).pipe(Effect.mapError(mapClientError)));
|
|
575
|
+
const EndpointConfigShells = (raw) => () => preserveEffect()(raw["config.shells"]({}).pipe(Effect.mapError(mapClientError)));
|
|
576
|
+
const adaptGroupConfig = (raw) => ({
|
|
577
|
+
get: EndpointConfigGet(raw),
|
|
578
|
+
preferences: EndpointConfigPreferences(raw),
|
|
579
|
+
updatePreferences: EndpointConfigUpdatePreferences(raw),
|
|
580
|
+
shells: EndpointConfigShells(raw),
|
|
581
|
+
});
|
|
569
582
|
const adaptClient = (raw) => ({
|
|
570
583
|
health: adaptGroupHealth(raw["server.health"]),
|
|
571
584
|
server: adaptGroupServer(raw["server.server"]),
|
package/dist/promise/client.d.ts
CHANGED
|
@@ -58,6 +58,7 @@ export declare function make(options: ClientOptions): {
|
|
|
58
58
|
commit: (input: import("./index.js").SessionRevertCommitInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
59
59
|
};
|
|
60
60
|
context: (input: import("./index.js").SessionContextInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").SessionMessageInfo[]>;
|
|
61
|
+
diff: (input: import("./index.js").SessionDiffInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").FileDiffInfo[]>;
|
|
61
62
|
inbox: {
|
|
62
63
|
list: (input: import("./index.js").SessionInboxListInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").SessionInboxInfo[]>;
|
|
63
64
|
cancel: (input: import("./index.js").SessionInboxCancelInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
@@ -77,7 +78,7 @@ export declare function make(options: ClientOptions): {
|
|
|
77
78
|
log: (input: import("./index.js").SessionLogInput, requestOptions?: OpenCode.RequestOptions) => AsyncIterable<import("./index.js").SessionLogOutput>;
|
|
78
79
|
interrupt: (input: import("./index.js").SessionInterruptInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").SessionInterruptResponse>;
|
|
79
80
|
background: (input: import("./index.js").SessionBackgroundInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
80
|
-
message: (input: import("./index.js").SessionMessageInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").SessionMessageAgentSelected | import("./index.js").SessionMessageSynthetic | import("./index.js").SessionMessageSystem | import("./index.js").SessionMessageSkill | import("./index.js").SessionMessageShell | import("./index.js").SessionMessageCompactionRunning | import("./index.js").SessionMessageLocationSwitched | import("./index.js").SessionMessageModelSelected | import("./index.js").SessionMessageCompactionFailed | import("./index.js").SessionMessageUser | import("./index.js").SessionMessageCompactionCompleted | import("./index.js").SessionMessageAssistant>;
|
|
81
|
+
message: (input: import("./index.js").SessionMessageInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").SessionMessageAgentSelected | import("./index.js").SessionMessageSynthetic | import("./index.js").SessionMessageSystem | import("./index.js").SessionMessageSkill | import("./index.js").SessionMessageShell | import("./index.js").SessionMessageCompactionRunning | import("./index.js").SessionMessageIdle | import("./index.js").SessionMessageLocationSwitched | import("./index.js").SessionMessageModelSelected | import("./index.js").SessionMessageCompactionFailed | import("./index.js").SessionMessageUser | import("./index.js").SessionMessageCompactionCompleted | import("./index.js").SessionMessageAssistant>;
|
|
81
82
|
environment: (input: import("./index.js").SessionEnvironmentInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
82
83
|
view: (input: import("./index.js").SessionViewInput, requestOptions?: OpenCode.RequestOptions) => Promise<void>;
|
|
83
84
|
};
|
|
@@ -253,5 +254,8 @@ export declare function make(options: ClientOptions): {
|
|
|
253
254
|
};
|
|
254
255
|
config: {
|
|
255
256
|
get: (input?: import("./index.js").ConfigGetInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").ConfigGetOutput>;
|
|
257
|
+
preferences: (requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").ConfigPreferences>;
|
|
258
|
+
updatePreferences: (input?: import("./index.js").ConfigUpdatePreferencesInput, requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").ConfigPreferences>;
|
|
259
|
+
shells: (requestOptions?: OpenCode.RequestOptions) => Promise<import("./index.js").ConfigShellsOutput>;
|
|
256
260
|
};
|
|
257
261
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginAwaitActivationInput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, PermissionRulesInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
|
|
1
|
+
import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, PluginAwaitActivationInput, PluginCheckInput, PluginCheckOutput, PluginUpdateInput, SessionListInput, SessionStatsInput, SessionCreateInput, SessionImportInput, SessionExportInput, SessionGetInput, SessionRemoveInput, SessionForkInput, SessionSwitchAgentInput, SessionSwitchModelInput, SessionRenameInput, SessionMoveInput, SessionPromptInput, SessionCommandInput, SessionSkillInput, SessionSyntheticInput, SessionShellInput, SessionCompactInput, SessionWaitInput, SessionRevertStageInput, SessionRevertClearInput, SessionRevertCommitInput, SessionContextInput, SessionDiffInput, SessionInboxListInput, SessionInboxCancelInput, SessionInboxSteerInput, SessionInboxQueueInput, SessionInstructionsEntryListInput, SessionInstructionsEntryPutInput, SessionInstructionsEntryRemoveInput, SessionGenerateInput, SessionLogInput, SessionLogOutput, SessionInterruptInput, SessionBackgroundInput, SessionMessageInput, SessionEnvironmentInput, SessionViewInput, MessageListInput, ModelListInput, ModelListOutput, ModelDefaultInput, ModelDefaultOutput, GenerateTextInput, ProviderListInput, ProviderListOutput, ProviderGetInput, ProviderGetOutput, IntegrationListInput, IntegrationListOutput, IntegrationGetInput, IntegrationGetOutput, IntegrationWellknownAddInput, IntegrationConnectKeyInput, IntegrationOauthConnectInput, IntegrationOauthConnectOutput, IntegrationOauthStatusInput, IntegrationOauthStatusOutput, IntegrationOauthCompleteInput, IntegrationOauthCancelInput, IntegrationCommandConnectInput, IntegrationCommandConnectOutput, IntegrationCommandStatusInput, IntegrationCommandStatusOutput, IntegrationCommandCancelInput, McpListInput, McpListOutput, McpAddInput, McpRemoveInput, McpConnectInput, McpDisconnectInput, McpResourceCatalogInput, McpResourceCatalogOutput, CredentialUpdateInput, CredentialActivateInput, CredentialRemoveInput, ProjectListOutput, ProjectUpdateInput, ProjectCurrentInput, FormRequestListInput, FormRequestListOutput, FormListInput, FormCreateInput, FormGetInput, FormStateInput, FormReplyInput, FormCancelInput, PermissionRequestListInput, PermissionRequestListOutput, PermissionSavedListInput, PermissionSavedRemoveInput, PermissionCreateInput, PermissionListInput, PermissionGetInput, PermissionReplyInput, PermissionRulesInput, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, RpcCallInput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyReadInput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyHandoffOutput, ExperimentalPersistentPtyGetInput, ExperimentalPersistentPtyUpdateInput, ExperimentalPersistentPtySnapshotInput, ExperimentalPersistentPtyRemoveInput, ExperimentalPersistentPtyConnectTokenInput, ShellListInput, ShellListOutput, ShellCreateInput, ShellCreateOutput, ShellGetInput, ShellGetOutput, ShellTimeoutInput, ShellTimeoutOutput, ShellOutputInput, ShellOutputOutput, ShellRemoveInput, ReferenceListInput, ReferenceListOutput, WorktreeListInput, WorktreeCreateInput, WorktreeRemoveInput, WorktreeRefreshInput, WorkspaceCreateInput, WorkspaceDestroyInput, VcsGetInput, VcsGetOutput, VcsBaseInput, VcsBaseOutput, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput, ConfigUpdatePreferencesInput, ConfigShellsOutput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -59,6 +59,7 @@ export declare function make(options: ClientOptions): {
|
|
|
59
59
|
commit: (input: SessionRevertCommitInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
60
60
|
};
|
|
61
61
|
context: (input: SessionContextInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageInfo[]>;
|
|
62
|
+
diff: (input: SessionDiffInput, requestOptions?: RequestOptions) => Promise<import("./types.js").FileDiffInfo[]>;
|
|
62
63
|
inbox: {
|
|
63
64
|
list: (input: SessionInboxListInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInboxInfo[]>;
|
|
64
65
|
cancel: (input: SessionInboxCancelInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
@@ -78,7 +79,7 @@ export declare function make(options: ClientOptions): {
|
|
|
78
79
|
log: (input: SessionLogInput, requestOptions?: RequestOptions) => AsyncIterable<SessionLogOutput>;
|
|
79
80
|
interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInterruptResponse>;
|
|
80
81
|
background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
81
|
-
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").SessionMessageSynthetic | import("./types.js").SessionMessageSystem | import("./types.js").SessionMessageSkill | import("./types.js").SessionMessageShell | import("./types.js").SessionMessageCompactionRunning | import("./types.js").SessionMessageLocationSwitched | import("./types.js").SessionMessageModelSelected | import("./types.js").SessionMessageCompactionFailed | import("./types.js").SessionMessageUser | import("./types.js").SessionMessageCompactionCompleted | import("./types.js").SessionMessageAssistant>;
|
|
82
|
+
message: (input: SessionMessageInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAgentSelected | import("./types.js").SessionMessageSynthetic | import("./types.js").SessionMessageSystem | import("./types.js").SessionMessageSkill | import("./types.js").SessionMessageShell | import("./types.js").SessionMessageCompactionRunning | import("./types.js").SessionMessageIdle | import("./types.js").SessionMessageLocationSwitched | import("./types.js").SessionMessageModelSelected | import("./types.js").SessionMessageCompactionFailed | import("./types.js").SessionMessageUser | import("./types.js").SessionMessageCompactionCompleted | import("./types.js").SessionMessageAssistant>;
|
|
82
83
|
environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
83
84
|
view: (input: SessionViewInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
84
85
|
};
|
|
@@ -260,5 +261,8 @@ export declare function make(options: ClientOptions): {
|
|
|
260
261
|
};
|
|
261
262
|
config: {
|
|
262
263
|
get: (input?: ConfigGetInput, requestOptions?: RequestOptions) => Promise<ConfigGetOutput>;
|
|
264
|
+
preferences: (requestOptions?: RequestOptions) => Promise<import("./types.js").ConfigPreferences>;
|
|
265
|
+
updatePreferences: (input?: ConfigUpdatePreferencesInput, requestOptions?: RequestOptions) => Promise<import("./types.js").ConfigPreferences>;
|
|
266
|
+
shells: (requestOptions?: RequestOptions) => Promise<ConfigShellsOutput>;
|
|
263
267
|
};
|
|
264
268
|
};
|
|
@@ -434,6 +434,14 @@ export function make(options) {
|
|
|
434
434
|
declaredStatuses: [400, 401, 404, 500],
|
|
435
435
|
empty: false,
|
|
436
436
|
}, requestOptions).then((value) => value.data),
|
|
437
|
+
diff: (input, requestOptions) => request({
|
|
438
|
+
method: "GET",
|
|
439
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/diff`,
|
|
440
|
+
query: { from: input["from"], to: input["to"], context: input["context"] },
|
|
441
|
+
successStatus: 200,
|
|
442
|
+
declaredStatuses: [400, 401, 404, 500],
|
|
443
|
+
empty: false,
|
|
444
|
+
}, requestOptions).then((value) => value.data),
|
|
437
445
|
inbox: {
|
|
438
446
|
list: (input, requestOptions) => request({
|
|
439
447
|
method: "GET",
|
|
@@ -945,7 +953,7 @@ export function make(options) {
|
|
|
945
953
|
path: `/api/fs/read/${encodePath(input.path)}`,
|
|
946
954
|
query: { location: input["location"] },
|
|
947
955
|
successStatus: 200,
|
|
948
|
-
declaredStatuses: [400, 401],
|
|
956
|
+
declaredStatuses: [400, 401, 404],
|
|
949
957
|
empty: false,
|
|
950
958
|
binary: true,
|
|
951
959
|
}, requestOptions),
|
|
@@ -1372,6 +1380,22 @@ export function make(options) {
|
|
|
1372
1380
|
declaredStatuses: [400, 401],
|
|
1373
1381
|
empty: false,
|
|
1374
1382
|
}, requestOptions),
|
|
1383
|
+
preferences: (requestOptions) => request({
|
|
1384
|
+
method: "GET",
|
|
1385
|
+
path: `/api/config/preferences`,
|
|
1386
|
+
successStatus: 200,
|
|
1387
|
+
declaredStatuses: [400, 401],
|
|
1388
|
+
empty: false,
|
|
1389
|
+
}, requestOptions),
|
|
1390
|
+
updatePreferences: (input, requestOptions) => request({
|
|
1391
|
+
method: "PATCH",
|
|
1392
|
+
path: `/api/config/preferences`,
|
|
1393
|
+
body: { shell: input?.["shell"], websearch: input?.["websearch"] },
|
|
1394
|
+
successStatus: 200,
|
|
1395
|
+
declaredStatuses: [400, 401],
|
|
1396
|
+
empty: false,
|
|
1397
|
+
}, requestOptions),
|
|
1398
|
+
shells: (requestOptions) => request({ method: "GET", path: `/api/config/shell`, successStatus: 200, declaredStatuses: [400, 401], empty: false }, requestOptions),
|
|
1375
1399
|
},
|
|
1376
1400
|
};
|
|
1377
1401
|
}
|
|
@@ -226,6 +226,17 @@ export type SessionProviderContextProvenance = {
|
|
|
226
226
|
protocol: string;
|
|
227
227
|
endpoint: string;
|
|
228
228
|
};
|
|
229
|
+
export type SessionMessageIdle = {
|
|
230
|
+
id: string;
|
|
231
|
+
metadata?: {
|
|
232
|
+
[x: string]: JsonValue;
|
|
233
|
+
};
|
|
234
|
+
time: {
|
|
235
|
+
created: number;
|
|
236
|
+
};
|
|
237
|
+
type: "idle";
|
|
238
|
+
outcome: "succeeded" | "failed" | "interrupted";
|
|
239
|
+
};
|
|
229
240
|
export type SessionActive = {
|
|
230
241
|
type: "running";
|
|
231
242
|
};
|
|
@@ -659,6 +670,17 @@ export type WebSearchResult = {
|
|
|
659
670
|
export type ConfigWorktree = {
|
|
660
671
|
directory: string;
|
|
661
672
|
};
|
|
673
|
+
export type ConfigPreferences = {
|
|
674
|
+
shell?: string;
|
|
675
|
+
websearch?: false | {
|
|
676
|
+
provider: "random" | (string & {});
|
|
677
|
+
};
|
|
678
|
+
};
|
|
679
|
+
export type ConfigShellOption = {
|
|
680
|
+
path: string;
|
|
681
|
+
name: string;
|
|
682
|
+
acceptable: boolean;
|
|
683
|
+
};
|
|
662
684
|
export type ProviderRequest = {
|
|
663
685
|
settings: ProviderSettings;
|
|
664
686
|
headers: {
|
|
@@ -3132,7 +3154,7 @@ export type FormInfo1 = {
|
|
|
3132
3154
|
metadata?: FormMetadata1;
|
|
3133
3155
|
fields: FormFields2;
|
|
3134
3156
|
};
|
|
3135
|
-
export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageLocationSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
|
|
3157
|
+
export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageLocationSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction | SessionMessageIdle;
|
|
3136
3158
|
export type SessionMessageContentUpdated = {
|
|
3137
3159
|
id: string;
|
|
3138
3160
|
created: number;
|
|
@@ -3315,6 +3337,12 @@ export type PermissionNotFoundError = {
|
|
|
3315
3337
|
readonly message: string;
|
|
3316
3338
|
};
|
|
3317
3339
|
export declare const isPermissionNotFoundError: (value: unknown) => value is PermissionNotFoundError;
|
|
3340
|
+
export type FileNotFoundError = {
|
|
3341
|
+
readonly _tag: "FileNotFoundError";
|
|
3342
|
+
readonly path: string;
|
|
3343
|
+
readonly message: string;
|
|
3344
|
+
};
|
|
3345
|
+
export declare const isFileNotFoundError: (value: unknown) => value is FileNotFoundError;
|
|
3318
3346
|
export type RpcError = {
|
|
3319
3347
|
readonly _tag: "RpcError";
|
|
3320
3348
|
readonly type: string;
|
|
@@ -4241,7 +4269,17 @@ export type SessionImportInput = {
|
|
|
4241
4269
|
readonly write: number;
|
|
4242
4270
|
};
|
|
4243
4271
|
};
|
|
4244
|
-
})
|
|
4272
|
+
}) | {
|
|
4273
|
+
readonly id: string;
|
|
4274
|
+
readonly metadata?: {
|
|
4275
|
+
readonly [x: string]: JsonValue;
|
|
4276
|
+
};
|
|
4277
|
+
readonly time: {
|
|
4278
|
+
readonly created: number;
|
|
4279
|
+
};
|
|
4280
|
+
readonly type: "idle";
|
|
4281
|
+
readonly outcome: "succeeded" | "failed" | "interrupted";
|
|
4282
|
+
}>;
|
|
4245
4283
|
readonly location?: {
|
|
4246
4284
|
readonly directory: string;
|
|
4247
4285
|
readonly workspaceID?: string;
|
|
@@ -4704,7 +4742,17 @@ export type SessionImportInput = {
|
|
|
4704
4742
|
readonly write: number;
|
|
4705
4743
|
};
|
|
4706
4744
|
};
|
|
4707
|
-
})
|
|
4745
|
+
}) | {
|
|
4746
|
+
readonly id: string;
|
|
4747
|
+
readonly metadata?: {
|
|
4748
|
+
readonly [x: string]: JsonValue;
|
|
4749
|
+
};
|
|
4750
|
+
readonly time: {
|
|
4751
|
+
readonly created: number;
|
|
4752
|
+
};
|
|
4753
|
+
readonly type: "idle";
|
|
4754
|
+
readonly outcome: "succeeded" | "failed" | "interrupted";
|
|
4755
|
+
}>;
|
|
4708
4756
|
readonly location?: {
|
|
4709
4757
|
readonly directory: string;
|
|
4710
4758
|
readonly workspaceID?: string;
|
|
@@ -5167,7 +5215,17 @@ export type SessionImportInput = {
|
|
|
5167
5215
|
readonly write: number;
|
|
5168
5216
|
};
|
|
5169
5217
|
};
|
|
5170
|
-
})
|
|
5218
|
+
}) | {
|
|
5219
|
+
readonly id: string;
|
|
5220
|
+
readonly metadata?: {
|
|
5221
|
+
readonly [x: string]: JsonValue;
|
|
5222
|
+
};
|
|
5223
|
+
readonly time: {
|
|
5224
|
+
readonly created: number;
|
|
5225
|
+
};
|
|
5226
|
+
readonly type: "idle";
|
|
5227
|
+
readonly outcome: "succeeded" | "failed" | "interrupted";
|
|
5228
|
+
}>;
|
|
5171
5229
|
readonly location?: {
|
|
5172
5230
|
readonly directory: string;
|
|
5173
5231
|
readonly workspaceID?: string;
|
|
@@ -5916,6 +5974,29 @@ export type SessionContextInput = {
|
|
|
5916
5974
|
export type SessionContextOutput = {
|
|
5917
5975
|
data: Array<SessionMessageInfo>;
|
|
5918
5976
|
}["data"];
|
|
5977
|
+
export type SessionDiffInput = {
|
|
5978
|
+
readonly sessionID: {
|
|
5979
|
+
readonly sessionID: string;
|
|
5980
|
+
}["sessionID"];
|
|
5981
|
+
readonly from?: {
|
|
5982
|
+
readonly from?: string | undefined;
|
|
5983
|
+
readonly to?: string | undefined;
|
|
5984
|
+
readonly context?: number | undefined;
|
|
5985
|
+
}["from"];
|
|
5986
|
+
readonly to?: {
|
|
5987
|
+
readonly from?: string | undefined;
|
|
5988
|
+
readonly to?: string | undefined;
|
|
5989
|
+
readonly context?: number | undefined;
|
|
5990
|
+
}["to"];
|
|
5991
|
+
readonly context?: {
|
|
5992
|
+
readonly from?: string | undefined;
|
|
5993
|
+
readonly to?: string | undefined;
|
|
5994
|
+
readonly context?: number | undefined;
|
|
5995
|
+
}["context"];
|
|
5996
|
+
};
|
|
5997
|
+
export type SessionDiffOutput = {
|
|
5998
|
+
data: Array<FileDiffInfo>;
|
|
5999
|
+
}["data"];
|
|
5919
6000
|
export type SessionInboxListInput = {
|
|
5920
6001
|
readonly sessionID: {
|
|
5921
6002
|
readonly sessionID: string;
|
|
@@ -8775,3 +8856,20 @@ export type ConfigGetInput = {
|
|
|
8775
8856
|
}["location"];
|
|
8776
8857
|
};
|
|
8777
8858
|
export type ConfigGetOutput = Array<ConfigEntry>;
|
|
8859
|
+
export type ConfigPreferencesOutput = ConfigPreferences;
|
|
8860
|
+
export type ConfigUpdatePreferencesInput = {
|
|
8861
|
+
readonly shell?: {
|
|
8862
|
+
readonly shell?: string | null;
|
|
8863
|
+
readonly websearch?: false | {
|
|
8864
|
+
readonly provider: "random" | (string & {});
|
|
8865
|
+
} | null;
|
|
8866
|
+
}["shell"];
|
|
8867
|
+
readonly websearch?: {
|
|
8868
|
+
readonly shell?: string | null;
|
|
8869
|
+
readonly websearch?: false | {
|
|
8870
|
+
readonly provider: "random" | (string & {});
|
|
8871
|
+
} | null;
|
|
8872
|
+
}["websearch"];
|
|
8873
|
+
};
|
|
8874
|
+
export type ConfigUpdatePreferencesOutput = ConfigPreferences;
|
|
8875
|
+
export type ConfigShellsOutput = Array<ConfigShellOption>;
|
|
@@ -22,6 +22,7 @@ export const isFormNotFoundError = (value) => typeof value === "object" && value
|
|
|
22
22
|
export const isFormInvalidAnswerError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "FormInvalidAnswerError";
|
|
23
23
|
export const isFormAlreadySettledError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "FormAlreadySettledError";
|
|
24
24
|
export const isPermissionNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PermissionNotFoundError";
|
|
25
|
+
export const isFileNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "FileNotFoundError";
|
|
25
26
|
export const isRpcError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "RpcError";
|
|
26
27
|
export const isRpcInternalError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "RpcInternalError";
|
|
27
28
|
export const isPtyNotFoundError = (value) => typeof value === "object" && value !== null && "_tag" in value && value["_tag"] === "PtyNotFoundError";
|
package/dist/solid/data.js
CHANGED
|
@@ -898,6 +898,17 @@ export function createData(config) {
|
|
|
898
898
|
});
|
|
899
899
|
if (event.type === "session.execution.interrupted" && event.data.reason === "shutdown")
|
|
900
900
|
return;
|
|
901
|
+
// Mirror the projected idle marker so turn boundaries match before the next message read.
|
|
902
|
+
message.insert(event.data.sessionID, {
|
|
903
|
+
id: messageIDFromEvent(event.id),
|
|
904
|
+
type: "idle",
|
|
905
|
+
outcome: event.type === "session.execution.succeeded"
|
|
906
|
+
? "succeeded"
|
|
907
|
+
: event.type === "session.execution.failed"
|
|
908
|
+
? "failed"
|
|
909
|
+
: "interrupted",
|
|
910
|
+
time: { created: event.created },
|
|
911
|
+
});
|
|
901
912
|
// An event can overtake the first read; queue a revalidation when that read is still active.
|
|
902
913
|
if (!store.session.info[event.data.sessionID] && !sync.has(`session:${event.data.sessionID}`))
|
|
903
914
|
return;
|
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": "2.0.
|
|
4
|
+
"version": "2.0.3",
|
|
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": "2.0.
|
|
61
|
-
"@opencode/protocol": "2.0.
|
|
60
|
+
"@opencode/schema": "2.0.3",
|
|
61
|
+
"@opencode/protocol": "2.0.3"
|
|
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": "2.0.
|
|
77
|
+
"@opencode/httpapi-codegen": "2.0.3",
|
|
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",
|