@opencode-ai/client 0.0.0-dev-18293 → 0.0.0-dev-18296
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 +26 -0
- package/dist/effect/generated/client.d.ts +122 -1
- package/dist/effect/generated/client.js +5 -0
- package/dist/promise/generated/client.d.ts +2 -1
- package/dist/promise/generated/client.js +8 -0
- package/dist/promise/generated/types.d.ts +202 -3
- package/dist/solid/data.js +17 -0
- package/package.json +4 -4
package/dist/effect/api/api.d.ts
CHANGED
|
@@ -1260,6 +1260,24 @@ export type SessionLogOutput = ({
|
|
|
1260
1260
|
readonly sessionID: Session.ID;
|
|
1261
1261
|
readonly to: SessionMessage.ID;
|
|
1262
1262
|
};
|
|
1263
|
+
} | {
|
|
1264
|
+
readonly id: Event.ID;
|
|
1265
|
+
readonly created: number;
|
|
1266
|
+
readonly metadata?: {
|
|
1267
|
+
readonly [x: string]: unknown;
|
|
1268
|
+
} | undefined;
|
|
1269
|
+
readonly type: "session.message.content.updated";
|
|
1270
|
+
readonly durable: {
|
|
1271
|
+
readonly aggregateID: string;
|
|
1272
|
+
readonly seq: Event.Seq;
|
|
1273
|
+
readonly version: Event.Version;
|
|
1274
|
+
};
|
|
1275
|
+
readonly location?: Location.Ref | undefined;
|
|
1276
|
+
readonly data: {
|
|
1277
|
+
readonly sessionID: Session.ID;
|
|
1278
|
+
readonly messageID: SessionMessage.ID;
|
|
1279
|
+
readonly content: ReadonlyArray<SessionMessage.AssistantContentEncoded>;
|
|
1280
|
+
};
|
|
1263
1281
|
} | {
|
|
1264
1282
|
readonly id: Event.ID;
|
|
1265
1283
|
readonly created: number;
|
|
@@ -1308,6 +1326,13 @@ export type SessionMessageInput = {
|
|
|
1308
1326
|
};
|
|
1309
1327
|
export type SessionMessageOutput = SessionMessage.Info;
|
|
1310
1328
|
export type SessionMessageOperation<E = never> = (input: SessionMessageInput) => Effect.Effect<SessionMessageOutput, E>;
|
|
1329
|
+
export type SessionMessageUpdateInput = {
|
|
1330
|
+
readonly sessionID: Session.ID;
|
|
1331
|
+
readonly messageID: SessionMessage.ID;
|
|
1332
|
+
readonly content: ReadonlyArray<SessionMessage.AssistantText | SessionMessage.AssistantReasoning | SessionMessage.AssistantTool>;
|
|
1333
|
+
};
|
|
1334
|
+
export type SessionMessageUpdateOutput = SessionMessage.Assistant;
|
|
1335
|
+
export type SessionMessageUpdateOperation<E = never> = (input: SessionMessageUpdateInput) => Effect.Effect<SessionMessageUpdateOutput, E>;
|
|
1311
1336
|
export type SessionEnvironmentInput = {
|
|
1312
1337
|
readonly sessionID: Session.ID;
|
|
1313
1338
|
readonly variables: {
|
|
@@ -1367,6 +1392,7 @@ export interface SessionApi<E = never> {
|
|
|
1367
1392
|
readonly interrupt: SessionInterruptOperation<E>;
|
|
1368
1393
|
readonly background: SessionBackgroundOperation<E>;
|
|
1369
1394
|
readonly message: SessionMessageOperation<E>;
|
|
1395
|
+
readonly messageUpdate: SessionMessageUpdateOperation<E>;
|
|
1370
1396
|
readonly environment: SessionEnvironmentOperation<E>;
|
|
1371
1397
|
readonly view: SessionViewOperation<E>;
|
|
1372
1398
|
}
|
|
@@ -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, 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, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, 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, 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, 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, SessionMessageUpdateInput, 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, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyListOutput, ExperimentalPersistentPtyCreateInput, ExperimentalPersistentPtyCreateOutput, 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, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } 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;
|
|
@@ -67,6 +67,7 @@ export declare const make: (options?: {
|
|
|
67
67
|
interrupt: (input: SessionInterruptInput) => Effect.Effect<SessionInterruptOutput, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
68
68
|
background: (input: SessionBackgroundInput) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
69
69
|
message: (input: SessionMessageInput) => Effect.Effect<import("@opencode-ai/schema/session-message").Info, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").SessionNotFoundError | import("@opencode-ai/protocol/errors").MessageNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
70
|
+
messageUpdate: (input: SessionMessageUpdateInput) => Effect.Effect<import("@opencode-ai/schema/session-message").Assistant, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").ConflictError | import("@opencode-ai/protocol/errors").SessionBusyError | import("@opencode-ai/protocol/errors").SessionNotFoundError | import("@opencode-ai/protocol/errors").MessageNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
70
71
|
environment: (input: SessionEnvironmentInput) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
71
72
|
view: (input: SessionViewInput) => Effect.Effect<void, import("@opencode-ai/protocol/errors").InvalidRequestError | import("@opencode-ai/protocol/errors").UnauthorizedError | import("@opencode-ai/protocol/errors").SessionNotFoundError | Schema.SchemaError | ClientError | HttpClientError.HttpClientError, never>;
|
|
72
73
|
};
|
|
@@ -749,6 +750,126 @@ export declare const make: (options?: {
|
|
|
749
750
|
readonly metadata?: {
|
|
750
751
|
readonly [x: string]: unknown;
|
|
751
752
|
} | undefined;
|
|
753
|
+
} | {
|
|
754
|
+
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
755
|
+
readonly data: {
|
|
756
|
+
readonly messageID: string & import("effect/Brand").Brand<"Session.Message.ID">;
|
|
757
|
+
readonly content: readonly ({
|
|
758
|
+
readonly id: string;
|
|
759
|
+
readonly type: "tool";
|
|
760
|
+
readonly name: string;
|
|
761
|
+
readonly time: {
|
|
762
|
+
readonly created: number;
|
|
763
|
+
readonly completed?: number | undefined;
|
|
764
|
+
readonly ran?: number | undefined;
|
|
765
|
+
};
|
|
766
|
+
readonly state: {
|
|
767
|
+
readonly status: "streaming";
|
|
768
|
+
readonly input: string;
|
|
769
|
+
} | {
|
|
770
|
+
readonly status: "running";
|
|
771
|
+
readonly input: {
|
|
772
|
+
readonly [x: string]: unknown;
|
|
773
|
+
};
|
|
774
|
+
readonly metadata: {
|
|
775
|
+
readonly [x: string]: Schema.Json;
|
|
776
|
+
};
|
|
777
|
+
} | {
|
|
778
|
+
readonly content: readonly [{
|
|
779
|
+
readonly type: "text";
|
|
780
|
+
readonly text: string;
|
|
781
|
+
} | {
|
|
782
|
+
readonly type: "file";
|
|
783
|
+
readonly uri: string;
|
|
784
|
+
readonly mime: string;
|
|
785
|
+
readonly name?: string | undefined;
|
|
786
|
+
}, ...({
|
|
787
|
+
readonly type: "text";
|
|
788
|
+
readonly text: string;
|
|
789
|
+
} | {
|
|
790
|
+
readonly type: "file";
|
|
791
|
+
readonly uri: string;
|
|
792
|
+
readonly mime: string;
|
|
793
|
+
readonly name?: string | undefined;
|
|
794
|
+
})[]];
|
|
795
|
+
readonly status: "completed";
|
|
796
|
+
readonly input: {
|
|
797
|
+
readonly [x: string]: unknown;
|
|
798
|
+
};
|
|
799
|
+
readonly metadata?: {
|
|
800
|
+
readonly [x: string]: Schema.Json;
|
|
801
|
+
} | undefined;
|
|
802
|
+
} | {
|
|
803
|
+
readonly error: {
|
|
804
|
+
readonly type: string;
|
|
805
|
+
readonly message: string;
|
|
806
|
+
readonly status?: number | undefined;
|
|
807
|
+
};
|
|
808
|
+
readonly status: "error";
|
|
809
|
+
readonly input: {
|
|
810
|
+
readonly [x: string]: unknown;
|
|
811
|
+
};
|
|
812
|
+
readonly metadata?: {
|
|
813
|
+
readonly [x: string]: Schema.Json;
|
|
814
|
+
} | undefined;
|
|
815
|
+
readonly content?: readonly [{
|
|
816
|
+
readonly type: "text";
|
|
817
|
+
readonly text: string;
|
|
818
|
+
} | {
|
|
819
|
+
readonly type: "file";
|
|
820
|
+
readonly uri: string;
|
|
821
|
+
readonly mime: string;
|
|
822
|
+
readonly name?: string | undefined;
|
|
823
|
+
}, ...({
|
|
824
|
+
readonly type: "text";
|
|
825
|
+
readonly text: string;
|
|
826
|
+
} | {
|
|
827
|
+
readonly type: "file";
|
|
828
|
+
readonly uri: string;
|
|
829
|
+
readonly mime: string;
|
|
830
|
+
readonly name?: string | undefined;
|
|
831
|
+
})[]] | undefined;
|
|
832
|
+
};
|
|
833
|
+
readonly executed?: boolean | undefined;
|
|
834
|
+
readonly providerState?: {
|
|
835
|
+
readonly [x: string]: unknown;
|
|
836
|
+
} | undefined;
|
|
837
|
+
readonly providerResultState?: {
|
|
838
|
+
readonly [x: string]: unknown;
|
|
839
|
+
} | undefined;
|
|
840
|
+
} | {
|
|
841
|
+
readonly type: "text";
|
|
842
|
+
readonly text: string;
|
|
843
|
+
readonly state?: {
|
|
844
|
+
readonly [x: string]: unknown;
|
|
845
|
+
} | undefined;
|
|
846
|
+
} | {
|
|
847
|
+
readonly type: "reasoning";
|
|
848
|
+
readonly text: string;
|
|
849
|
+
readonly time?: {
|
|
850
|
+
readonly created: number;
|
|
851
|
+
readonly completed?: number | undefined;
|
|
852
|
+
} | undefined;
|
|
853
|
+
readonly state?: {
|
|
854
|
+
readonly [x: string]: unknown;
|
|
855
|
+
} | undefined;
|
|
856
|
+
})[];
|
|
857
|
+
readonly sessionID: string & import("effect/Brand").Brand<"SessionID">;
|
|
858
|
+
};
|
|
859
|
+
readonly durable: {
|
|
860
|
+
readonly aggregateID: string;
|
|
861
|
+
readonly seq: number & import("effect/Brand").Brand<"Event.Seq">;
|
|
862
|
+
readonly version: number & import("effect/Brand").Brand<"Event.Version">;
|
|
863
|
+
};
|
|
864
|
+
readonly type: "session.message.content.updated";
|
|
865
|
+
readonly created: number;
|
|
866
|
+
readonly location?: {
|
|
867
|
+
readonly directory: string & import("effect/Brand").Brand<"AbsolutePath">;
|
|
868
|
+
readonly workspaceID?: (string & import("effect/Brand").Brand<"Workspace.ID">) | undefined;
|
|
869
|
+
} | undefined;
|
|
870
|
+
readonly metadata?: {
|
|
871
|
+
readonly [x: string]: unknown;
|
|
872
|
+
} | undefined;
|
|
752
873
|
} | {
|
|
753
874
|
readonly id: string & import("effect/Brand").Brand<"Event.ID">;
|
|
754
875
|
readonly data: {
|
|
@@ -146,6 +146,10 @@ const EndpointSessionInterrupt = (raw) => (input) => preserveEffect()(raw["sessi
|
|
|
146
146
|
}).pipe(Effect.mapError(mapClientError)));
|
|
147
147
|
const EndpointSessionBackground = (raw) => (input) => preserveEffect()(raw["session.background"]({ params: { sessionID: input["sessionID"] } }).pipe(Effect.mapError(mapClientError)));
|
|
148
148
|
const EndpointSessionMessage = (raw) => (input) => preserveEffect()(raw["session.message"]({ params: { sessionID: input["sessionID"], messageID: input["messageID"] } }).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
149
|
+
const EndpointSessionMessageUpdate = (raw) => (input) => preserveEffect()(raw["session.messageUpdate"]({
|
|
150
|
+
params: { sessionID: input["sessionID"], messageID: input["messageID"] },
|
|
151
|
+
payload: { content: input["content"] },
|
|
152
|
+
}).pipe(Effect.mapError(mapClientError), Effect.map((value) => value.data)));
|
|
149
153
|
const EndpointSessionEnvironment = (raw) => (input) => preserveEffect()(raw["session.environment"]({
|
|
150
154
|
params: { sessionID: input["sessionID"] },
|
|
151
155
|
payload: { variables: input["variables"] },
|
|
@@ -196,6 +200,7 @@ const adaptGroupSession = (raw) => ({
|
|
|
196
200
|
interrupt: EndpointSessionInterrupt(raw),
|
|
197
201
|
background: EndpointSessionBackground(raw),
|
|
198
202
|
message: EndpointSessionMessage(raw),
|
|
203
|
+
messageUpdate: EndpointSessionMessageUpdate(raw),
|
|
199
204
|
environment: EndpointSessionEnvironment(raw),
|
|
200
205
|
view: EndpointSessionView(raw),
|
|
201
206
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ServerGetOutput, LocationGetInput, LocationGetOutput, AgentListInput, AgentListOutput, AgentGetInput, AgentGetOutput, PluginListInput, PluginListOutput, 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, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, 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, 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, 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, SessionMessageUpdateInput, 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, FileReadInput, FileReadOutput, FileListInput, FileListOutput, FileFindInput, FileFindOutput, CommandListInput, CommandListOutput, SkillListInput, SkillListOutput, EventSubscribeOutput, PtyListInput, PtyListOutput, PtyCreateInput, PtyCreateOutput, PtyGetInput, PtyGetOutput, PtyUpdateInput, PtyUpdateOutput, PtyRemoveInput, PtyConnectTokenInput, PtyConnectTokenOutput, ExperimentalPersistentPtyListInput, ExperimentalPersistentPtyCreateInput, 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, VcsStatusInput, VcsStatusOutput, VcsBranchesInput, VcsBranchesOutput, VcsDiffInput, VcsDiffOutput, DebugLocationListOutput, DebugLocationEvictInput, MigrationV1StatusOutput, WebsearchProvidersInput, WebsearchProvidersOutput, WebsearchQueryInput, WebsearchQueryOutput, ConfigGetInput, ConfigGetOutput } from "./types.js";
|
|
2
2
|
export interface ClientOptions {
|
|
3
3
|
readonly baseUrl: string;
|
|
4
4
|
readonly fetch?: typeof globalThis.fetch;
|
|
@@ -74,6 +74,7 @@ export declare function make(options: ClientOptions): {
|
|
|
74
74
|
interrupt: (input: SessionInterruptInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionInterruptResponse>;
|
|
75
75
|
background: (input: SessionBackgroundInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
76
76
|
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").SessionMessageCompactionCompleted | import("./types.js").SessionMessageLocationSwitched | import("./types.js").SessionMessageModelSelected | import("./types.js").SessionMessageCompactionFailed | import("./types.js").SessionMessageUser | import("./types.js").SessionMessageAssistant>;
|
|
77
|
+
messageUpdate: (input: SessionMessageUpdateInput, requestOptions?: RequestOptions) => Promise<import("./types.js").SessionMessageAssistant>;
|
|
77
78
|
environment: (input: SessionEnvironmentInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
78
79
|
view: (input: SessionViewInput, requestOptions?: RequestOptions) => Promise<void>;
|
|
79
80
|
};
|
|
@@ -498,6 +498,14 @@ export function make(options) {
|
|
|
498
498
|
declaredStatuses: [404, 401, 400],
|
|
499
499
|
empty: false,
|
|
500
500
|
}, requestOptions).then((value) => value.data),
|
|
501
|
+
messageUpdate: (input, requestOptions) => request({
|
|
502
|
+
method: "PATCH",
|
|
503
|
+
path: `/api/session/${encodeURIComponent(input.sessionID)}/message/${encodeURIComponent(input.messageID)}`,
|
|
504
|
+
body: { content: input["content"] },
|
|
505
|
+
successStatus: 200,
|
|
506
|
+
declaredStatuses: [404, 400, 409, 401],
|
|
507
|
+
empty: false,
|
|
508
|
+
}, requestOptions).then((value) => value.data),
|
|
501
509
|
environment: (input, requestOptions) => request({
|
|
502
510
|
method: "PUT",
|
|
503
511
|
path: `/api/session/${encodeURIComponent(input.sessionID)}/environment`,
|
|
@@ -265,6 +265,15 @@ export type ToolFileContent1 = {
|
|
|
265
265
|
mime: string;
|
|
266
266
|
name?: string | undefined;
|
|
267
267
|
};
|
|
268
|
+
export type SessionMessageToolStateRunning1 = {
|
|
269
|
+
status: "running";
|
|
270
|
+
input: {
|
|
271
|
+
[x: string]: any;
|
|
272
|
+
};
|
|
273
|
+
metadata: {
|
|
274
|
+
[x: string]: JsonValue;
|
|
275
|
+
};
|
|
276
|
+
};
|
|
268
277
|
export type EventLogSynced = {
|
|
269
278
|
type: "log.synced";
|
|
270
279
|
aggregateID: string;
|
|
@@ -1985,6 +1994,20 @@ export type SessionToolCalled = {
|
|
|
1985
1994
|
state?: SessionMessageProviderState1;
|
|
1986
1995
|
};
|
|
1987
1996
|
};
|
|
1997
|
+
export type SessionMessageAssistantText1 = {
|
|
1998
|
+
type: "text";
|
|
1999
|
+
text: string;
|
|
2000
|
+
state?: SessionMessageProviderState1;
|
|
2001
|
+
};
|
|
2002
|
+
export type SessionMessageAssistantReasoning1 = {
|
|
2003
|
+
type: "reasoning";
|
|
2004
|
+
text: string;
|
|
2005
|
+
state?: SessionMessageProviderState1;
|
|
2006
|
+
time?: {
|
|
2007
|
+
created: number;
|
|
2008
|
+
completed?: number;
|
|
2009
|
+
};
|
|
2010
|
+
};
|
|
1988
2011
|
export type ToolContent1 = ToolTextContent | ToolFileContent1;
|
|
1989
2012
|
export type ModelCompatibility = {
|
|
1990
2013
|
reasoningField?: ModelReasoningField;
|
|
@@ -2475,6 +2498,27 @@ export type SessionToolFailed = {
|
|
|
2475
2498
|
resultState?: SessionMessageProviderState1;
|
|
2476
2499
|
};
|
|
2477
2500
|
};
|
|
2501
|
+
export type SessionMessageToolStateCompleted1 = {
|
|
2502
|
+
status: "completed";
|
|
2503
|
+
input: {
|
|
2504
|
+
[x: string]: any;
|
|
2505
|
+
};
|
|
2506
|
+
content: [ToolContent1, ...Array<ToolContent1>];
|
|
2507
|
+
metadata?: {
|
|
2508
|
+
[x: string]: JsonValue;
|
|
2509
|
+
};
|
|
2510
|
+
};
|
|
2511
|
+
export type SessionMessageToolStateError1 = {
|
|
2512
|
+
status: "error";
|
|
2513
|
+
input: {
|
|
2514
|
+
[x: string]: any;
|
|
2515
|
+
};
|
|
2516
|
+
error: SessionStructuredError;
|
|
2517
|
+
content?: [ToolContent1, ...Array<ToolContent1>];
|
|
2518
|
+
metadata?: {
|
|
2519
|
+
[x: string]: JsonValue;
|
|
2520
|
+
};
|
|
2521
|
+
};
|
|
2478
2522
|
export type ModelInfo = {
|
|
2479
2523
|
id: string;
|
|
2480
2524
|
modelID: string;
|
|
@@ -2869,6 +2913,20 @@ export type SessionMessageAssistantTool = {
|
|
|
2869
2913
|
completed?: number;
|
|
2870
2914
|
};
|
|
2871
2915
|
};
|
|
2916
|
+
export type SessionMessageAssistantTool1 = {
|
|
2917
|
+
type: "tool";
|
|
2918
|
+
id: string;
|
|
2919
|
+
name: string;
|
|
2920
|
+
executed?: boolean;
|
|
2921
|
+
providerState?: SessionMessageProviderState1;
|
|
2922
|
+
providerResultState?: SessionMessageProviderState1;
|
|
2923
|
+
state: SessionMessageToolStateStreaming | SessionMessageToolStateRunning1 | SessionMessageToolStateCompleted1 | SessionMessageToolStateError1;
|
|
2924
|
+
time: {
|
|
2925
|
+
created: number;
|
|
2926
|
+
ran?: number;
|
|
2927
|
+
completed?: number;
|
|
2928
|
+
};
|
|
2929
|
+
};
|
|
2872
2930
|
export type FormFields = [FormField, ...Array<FormField>];
|
|
2873
2931
|
export type FormFields2 = [FormField1, ...Array<FormField1>];
|
|
2874
2932
|
export type SessionInboxInfo = SessionInboxUser | SessionInboxSynthetic | SessionInboxCompaction | SessionInboxMove;
|
|
@@ -2917,6 +2975,7 @@ export type SessionMessageAssistant = {
|
|
|
2917
2975
|
error?: SessionStructuredError;
|
|
2918
2976
|
retry?: SessionMessageAssistantRetry;
|
|
2919
2977
|
};
|
|
2978
|
+
export type SessionMessageAssistantContentEncoded = SessionMessageAssistantText1 | SessionMessageAssistantReasoning1 | SessionMessageAssistantTool1;
|
|
2920
2979
|
export type IntegrationOAuthMethod = {
|
|
2921
2980
|
id: string;
|
|
2922
2981
|
type: "oauth";
|
|
@@ -2942,8 +3001,26 @@ export type FormInfo1 = {
|
|
|
2942
3001
|
metadata?: FormMetadata1;
|
|
2943
3002
|
fields: FormFields2;
|
|
2944
3003
|
};
|
|
2945
|
-
export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionUsageRecorded;
|
|
2946
3004
|
export type SessionMessageInfo = SessionMessageAgentSelected | SessionMessageModelSelected | SessionMessageLocationSwitched | SessionMessageUser | SessionMessageSynthetic | SessionMessageSystem | SessionMessageSkill | SessionMessageShell | SessionMessageAssistant | SessionMessageCompaction;
|
|
3005
|
+
export type SessionMessageContentUpdated = {
|
|
3006
|
+
id: string;
|
|
3007
|
+
created: number;
|
|
3008
|
+
metadata?: {
|
|
3009
|
+
[x: string]: any;
|
|
3010
|
+
};
|
|
3011
|
+
type: "session.message.content.updated";
|
|
3012
|
+
durable: {
|
|
3013
|
+
aggregateID: string;
|
|
3014
|
+
seq: number;
|
|
3015
|
+
version: 1;
|
|
3016
|
+
};
|
|
3017
|
+
location?: LocationRef;
|
|
3018
|
+
data: {
|
|
3019
|
+
sessionID: string;
|
|
3020
|
+
messageID: string;
|
|
3021
|
+
content: Array<SessionMessageAssistantContentEncoded>;
|
|
3022
|
+
};
|
|
3023
|
+
};
|
|
2947
3024
|
export type IntegrationMethod = IntegrationOAuthMethod | IntegrationCommandMethod | IntegrationKeyMethod | IntegrationEnvMethod;
|
|
2948
3025
|
export type FormCreated = {
|
|
2949
3026
|
id: string;
|
|
@@ -2957,7 +3034,6 @@ export type FormCreated = {
|
|
|
2957
3034
|
form: FormInfo1;
|
|
2958
3035
|
};
|
|
2959
3036
|
};
|
|
2960
|
-
export type SessionLogItem = SessionEventDurable | EventLogSynced;
|
|
2961
3037
|
export type SessionTransferData = {
|
|
2962
3038
|
info: SessionInfo;
|
|
2963
3039
|
messages: Array<SessionMessageInfo>;
|
|
@@ -2969,6 +3045,7 @@ export type SessionMessagesResponse = {
|
|
|
2969
3045
|
next?: string | null;
|
|
2970
3046
|
};
|
|
2971
3047
|
};
|
|
3048
|
+
export type SessionEventDurable = SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextEnded | SessionReasoningStarted | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputEnded | SessionToolCalled | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionMessageContentUpdated | SessionUsageRecorded;
|
|
2972
3049
|
export type IntegrationInfo = {
|
|
2973
3050
|
id: string;
|
|
2974
3051
|
name: string;
|
|
@@ -2978,7 +3055,8 @@ export type IntegrationInfo = {
|
|
|
2978
3055
|
methods: Array<IntegrationMethod>;
|
|
2979
3056
|
connections: Array<ConnectionInfo>;
|
|
2980
3057
|
};
|
|
2981
|
-
export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | 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 | PluginAdded | 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 | V2EventServerConnected;
|
|
3058
|
+
export type V2Event = ModelsDevRefreshed | CredentialUpdated | CredentialSwitched | IntegrationUpdated | CatalogUpdated | AgentUpdated | SessionCreated | SessionAgentSelected | SessionModelSelected | SessionMoved | SessionRenamed | SessionViewed | SessionUsageUpdated | SessionDeleted | SessionForked | SessionInboxDelivered | SessionInboxEnqueued | SessionInboxCancelled | SessionInboxDeliveryChanged | SessionExecutionStarted | SessionExecutionSucceeded | SessionExecutionFailed | SessionExecutionInterrupted | SessionInstructionsUpdated | SessionSynthetic | SessionSkillActivated | SessionShellStarted | SessionShellEnded | SessionStepStarted | SessionStepEnded | SessionStepFailed | SessionTextStarted | SessionTextDelta | SessionTextEnded | SessionReasoningStarted | SessionReasoningDelta | SessionReasoningEnded | SessionToolInputStarted | SessionToolInputDelta | SessionToolInputEnded | SessionToolCalled | SessionToolProgress | SessionToolSuccess | SessionToolFailed | SessionRetryScheduled | SessionCompactionStarted | SessionCompactionDelta | SessionCompactionEnded | SessionCompactionFailed | SessionRevertStaged | SessionRevertCleared | SessionRevertCommitted | SessionMessageContentUpdated | FilesystemChanged | ReferenceUpdated | PermissionAsked | PermissionReplied | PluginAdded | 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 | V2EventServerConnected;
|
|
3059
|
+
export type SessionLogItem = SessionEventDurable | EventLogSynced;
|
|
2982
3060
|
export type UnauthorizedError = {
|
|
2983
3061
|
readonly _tag: "UnauthorizedError";
|
|
2984
3062
|
readonly message: string;
|
|
@@ -5543,6 +5621,127 @@ export type SessionMessageInput = {
|
|
|
5543
5621
|
export type SessionMessageOutput = {
|
|
5544
5622
|
data: SessionMessageInfo;
|
|
5545
5623
|
}["data"];
|
|
5624
|
+
export type SessionMessageUpdateInput = {
|
|
5625
|
+
readonly sessionID: {
|
|
5626
|
+
readonly sessionID: string;
|
|
5627
|
+
readonly messageID: string;
|
|
5628
|
+
}["sessionID"];
|
|
5629
|
+
readonly messageID: {
|
|
5630
|
+
readonly sessionID: string;
|
|
5631
|
+
readonly messageID: string;
|
|
5632
|
+
}["messageID"];
|
|
5633
|
+
readonly content: {
|
|
5634
|
+
readonly content: ReadonlyArray<{
|
|
5635
|
+
readonly type: "text";
|
|
5636
|
+
readonly text: string;
|
|
5637
|
+
readonly state?: {
|
|
5638
|
+
readonly [x: string]: JsonValue;
|
|
5639
|
+
};
|
|
5640
|
+
} | {
|
|
5641
|
+
readonly type: "reasoning";
|
|
5642
|
+
readonly text: string;
|
|
5643
|
+
readonly state?: {
|
|
5644
|
+
readonly [x: string]: JsonValue;
|
|
5645
|
+
};
|
|
5646
|
+
readonly time?: {
|
|
5647
|
+
readonly created: number;
|
|
5648
|
+
readonly completed?: number;
|
|
5649
|
+
};
|
|
5650
|
+
} | {
|
|
5651
|
+
readonly type: "tool";
|
|
5652
|
+
readonly id: string;
|
|
5653
|
+
readonly name: string;
|
|
5654
|
+
readonly executed?: boolean;
|
|
5655
|
+
readonly providerState?: {
|
|
5656
|
+
readonly [x: string]: JsonValue;
|
|
5657
|
+
};
|
|
5658
|
+
readonly providerResultState?: {
|
|
5659
|
+
readonly [x: string]: JsonValue;
|
|
5660
|
+
};
|
|
5661
|
+
readonly state: {
|
|
5662
|
+
readonly status: "streaming";
|
|
5663
|
+
readonly input: string;
|
|
5664
|
+
} | {
|
|
5665
|
+
readonly status: "running";
|
|
5666
|
+
readonly input: {
|
|
5667
|
+
readonly [x: string]: JsonValue;
|
|
5668
|
+
};
|
|
5669
|
+
readonly metadata: {
|
|
5670
|
+
readonly [x: string]: JsonValue;
|
|
5671
|
+
};
|
|
5672
|
+
} | {
|
|
5673
|
+
readonly status: "completed";
|
|
5674
|
+
readonly input: {
|
|
5675
|
+
readonly [x: string]: JsonValue;
|
|
5676
|
+
};
|
|
5677
|
+
readonly content: readonly [
|
|
5678
|
+
({
|
|
5679
|
+
readonly type: "text";
|
|
5680
|
+
readonly text: string;
|
|
5681
|
+
} | {
|
|
5682
|
+
readonly type: "file";
|
|
5683
|
+
readonly uri: string;
|
|
5684
|
+
readonly mime: string;
|
|
5685
|
+
readonly name?: string | null;
|
|
5686
|
+
}),
|
|
5687
|
+
...Array<{
|
|
5688
|
+
readonly type: "text";
|
|
5689
|
+
readonly text: string;
|
|
5690
|
+
} | {
|
|
5691
|
+
readonly type: "file";
|
|
5692
|
+
readonly uri: string;
|
|
5693
|
+
readonly mime: string;
|
|
5694
|
+
readonly name?: string | null;
|
|
5695
|
+
}>
|
|
5696
|
+
];
|
|
5697
|
+
readonly metadata?: {
|
|
5698
|
+
readonly [x: string]: JsonValue;
|
|
5699
|
+
};
|
|
5700
|
+
} | {
|
|
5701
|
+
readonly status: "error";
|
|
5702
|
+
readonly input: {
|
|
5703
|
+
readonly [x: string]: JsonValue;
|
|
5704
|
+
};
|
|
5705
|
+
readonly error: {
|
|
5706
|
+
readonly type: string;
|
|
5707
|
+
readonly message: string;
|
|
5708
|
+
readonly status?: number;
|
|
5709
|
+
};
|
|
5710
|
+
readonly content?: readonly [
|
|
5711
|
+
({
|
|
5712
|
+
readonly type: "text";
|
|
5713
|
+
readonly text: string;
|
|
5714
|
+
} | {
|
|
5715
|
+
readonly type: "file";
|
|
5716
|
+
readonly uri: string;
|
|
5717
|
+
readonly mime: string;
|
|
5718
|
+
readonly name?: string | null;
|
|
5719
|
+
}),
|
|
5720
|
+
...Array<{
|
|
5721
|
+
readonly type: "text";
|
|
5722
|
+
readonly text: string;
|
|
5723
|
+
} | {
|
|
5724
|
+
readonly type: "file";
|
|
5725
|
+
readonly uri: string;
|
|
5726
|
+
readonly mime: string;
|
|
5727
|
+
readonly name?: string | null;
|
|
5728
|
+
}>
|
|
5729
|
+
];
|
|
5730
|
+
readonly metadata?: {
|
|
5731
|
+
readonly [x: string]: JsonValue;
|
|
5732
|
+
};
|
|
5733
|
+
};
|
|
5734
|
+
readonly time: {
|
|
5735
|
+
readonly created: number;
|
|
5736
|
+
readonly ran?: number;
|
|
5737
|
+
readonly completed?: number;
|
|
5738
|
+
};
|
|
5739
|
+
}>;
|
|
5740
|
+
}["content"];
|
|
5741
|
+
};
|
|
5742
|
+
export type SessionMessageUpdateOutput = {
|
|
5743
|
+
data: SessionMessageAssistant;
|
|
5744
|
+
}["data"];
|
|
5546
5745
|
export type SessionEnvironmentInput = {
|
|
5547
5746
|
readonly sessionID: {
|
|
5548
5747
|
readonly sessionID: string;
|
package/dist/solid/data.js
CHANGED
|
@@ -61,6 +61,10 @@ function createSync() {
|
|
|
61
61
|
has(key) {
|
|
62
62
|
return state.has(key);
|
|
63
63
|
},
|
|
64
|
+
pending(key) {
|
|
65
|
+
const active = state.get(key);
|
|
66
|
+
return active !== undefined && active !== true;
|
|
67
|
+
},
|
|
64
68
|
invalidate(key) {
|
|
65
69
|
if (key) {
|
|
66
70
|
const active = state.get(key);
|
|
@@ -586,6 +590,19 @@ export function createData(config) {
|
|
|
586
590
|
match.time.completed = event.created;
|
|
587
591
|
});
|
|
588
592
|
return;
|
|
593
|
+
case "session.message.content.updated": {
|
|
594
|
+
if (store.session.message[event.data.sessionID])
|
|
595
|
+
message.update(event.data.sessionID, (draft, index) => {
|
|
596
|
+
const assistant = message.assistant(draft, index, event.data.messageID);
|
|
597
|
+
if (assistant)
|
|
598
|
+
assistant.content = [...event.data.content];
|
|
599
|
+
});
|
|
600
|
+
if (!sync.pending(`session.message:${event.data.sessionID}`))
|
|
601
|
+
return;
|
|
602
|
+
result.session.message.invalidate(event.data.sessionID);
|
|
603
|
+
void result.session.message.sync(event.data.sessionID);
|
|
604
|
+
return;
|
|
605
|
+
}
|
|
589
606
|
case "session.step.started":
|
|
590
607
|
message.update(event.data.sessionID, (draft, index) => {
|
|
591
608
|
const position = index.get(event.data.assistantMessageID);
|
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-dev-
|
|
4
|
+
"version": "0.0.0-dev-18296",
|
|
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-ai/schema": "0.0.0-dev-
|
|
61
|
-
"@opencode-ai/protocol": "0.0.0-dev-
|
|
60
|
+
"@opencode-ai/schema": "0.0.0-dev-18296",
|
|
61
|
+
"@opencode-ai/protocol": "0.0.0-dev-18296"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
64
|
"effect": "4.0.0-rc.111",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"devDependencies": {
|
|
76
76
|
"@effect/platform-node": "4.0.0-rc.111",
|
|
77
|
-
"@opencode-ai/httpapi-codegen": "0.0.0-dev-
|
|
77
|
+
"@opencode-ai/httpapi-codegen": "0.0.0-dev-18296",
|
|
78
78
|
"@tsconfig/bun": "1.0.9",
|
|
79
79
|
"@types/bun": "1.3.13",
|
|
80
80
|
"@typescript/native-preview": "7.0.0-dev.20251207.1",
|