| ... | @@ -4,127 +4,127 @@ import * as RpcGroup from "effect/unstable/rpc/RpcGroup"; | ... | @@ -4,127 +4,127 @@ import * as RpcGroup from "effect/unstable/rpc/RpcGroup"; |
| 4 | import * as AcpSchema from "./_generated/schema.gen.ts"; | 4 | import * as AcpSchema from "./_generated/schema.gen.ts"; |
| 5 | import { AGENT_METHODS, CLIENT_METHODS } from "./_generated/meta.gen.ts"; | 5 | import { AGENT_METHODS, CLIENT_METHODS } from "./_generated/meta.gen.ts"; |
| 6 | | 6 | |
| 7 | export const InitializeRpc = Rpc.make(AGENT_METHODS.initialize, { | 7 | const InitializeRpc = Rpc.make(AGENT_METHODS.initialize, { |
| 8 | payload: AcpSchema.InitializeRequest, | 8 | payload: AcpSchema.InitializeRequest, |
| 9 | success: AcpSchema.InitializeResponse, | 9 | success: AcpSchema.InitializeResponse, |
| 10 | error: AcpSchema.Error, | 10 | error: AcpSchema.Error, |
| 11 | }); | 11 | }); |
| 12 | | 12 | |
| 13 | export const AuthenticateRpc = Rpc.make(AGENT_METHODS.authenticate, { | 13 | const AuthenticateRpc = Rpc.make(AGENT_METHODS.authenticate, { |
| 14 | payload: AcpSchema.AuthenticateRequest, | 14 | payload: AcpSchema.AuthenticateRequest, |
| 15 | success: AcpSchema.AuthenticateResponse, | 15 | success: AcpSchema.AuthenticateResponse, |
| 16 | error: AcpSchema.Error, | 16 | error: AcpSchema.Error, |
| 17 | }); | 17 | }); |
| 18 | | 18 | |
| 19 | export const LogoutRpc = Rpc.make(AGENT_METHODS.logout, { | 19 | const LogoutRpc = Rpc.make(AGENT_METHODS.logout, { |
| 20 | payload: AcpSchema.LogoutRequest, | 20 | payload: AcpSchema.LogoutRequest, |
| 21 | success: AcpSchema.LogoutResponse, | 21 | success: AcpSchema.LogoutResponse, |
| 22 | error: AcpSchema.Error, | 22 | error: AcpSchema.Error, |
| 23 | }); | 23 | }); |
| 24 | | 24 | |
| 25 | export const NewSessionRpc = Rpc.make(AGENT_METHODS.session_new, { | 25 | const NewSessionRpc = Rpc.make(AGENT_METHODS.session_new, { |
| 26 | payload: AcpSchema.NewSessionRequest, | 26 | payload: AcpSchema.NewSessionRequest, |
| 27 | success: AcpSchema.NewSessionResponse, | 27 | success: AcpSchema.NewSessionResponse, |
| 28 | error: AcpSchema.Error, | 28 | error: AcpSchema.Error, |
| 29 | }); | 29 | }); |
| 30 | | 30 | |
| 31 | export const LoadSessionRpc = Rpc.make(AGENT_METHODS.session_load, { | 31 | const LoadSessionRpc = Rpc.make(AGENT_METHODS.session_load, { |
| 32 | payload: AcpSchema.LoadSessionRequest, | 32 | payload: AcpSchema.LoadSessionRequest, |
| 33 | success: AcpSchema.LoadSessionResponse, | 33 | success: AcpSchema.LoadSessionResponse, |
| 34 | error: AcpSchema.Error, | 34 | error: AcpSchema.Error, |
| 35 | }); | 35 | }); |
| 36 | | 36 | |
| 37 | export const ListSessionsRpc = Rpc.make(AGENT_METHODS.session_list, { | 37 | const ListSessionsRpc = Rpc.make(AGENT_METHODS.session_list, { |
| 38 | payload: AcpSchema.ListSessionsRequest, | 38 | payload: AcpSchema.ListSessionsRequest, |
| 39 | success: AcpSchema.ListSessionsResponse, | 39 | success: AcpSchema.ListSessionsResponse, |
| 40 | error: AcpSchema.Error, | 40 | error: AcpSchema.Error, |
| 41 | }); | 41 | }); |
| 42 | | 42 | |
| 43 | export const ForkSessionRpc = Rpc.make(AGENT_METHODS.session_fork, { | 43 | const ForkSessionRpc = Rpc.make(AGENT_METHODS.session_fork, { |
| 44 | payload: AcpSchema.ForkSessionRequest, | 44 | payload: AcpSchema.ForkSessionRequest, |
| 45 | success: AcpSchema.ForkSessionResponse, | 45 | success: AcpSchema.ForkSessionResponse, |
| 46 | error: AcpSchema.Error, | 46 | error: AcpSchema.Error, |
| 47 | }); | 47 | }); |
| 48 | | 48 | |
| 49 | export const ResumeSessionRpc = Rpc.make(AGENT_METHODS.session_resume, { | 49 | const ResumeSessionRpc = Rpc.make(AGENT_METHODS.session_resume, { |
| 50 | payload: AcpSchema.ResumeSessionRequest, | 50 | payload: AcpSchema.ResumeSessionRequest, |
| 51 | success: AcpSchema.ResumeSessionResponse, | 51 | success: AcpSchema.ResumeSessionResponse, |
| 52 | error: AcpSchema.Error, | 52 | error: AcpSchema.Error, |
| 53 | }); | 53 | }); |
| 54 | | 54 | |
| 55 | export const CloseSessionRpc = Rpc.make(AGENT_METHODS.session_close, { | 55 | const CloseSessionRpc = Rpc.make(AGENT_METHODS.session_close, { |
| 56 | payload: AcpSchema.CloseSessionRequest, | 56 | payload: AcpSchema.CloseSessionRequest, |
| 57 | success: AcpSchema.CloseSessionResponse, | 57 | success: AcpSchema.CloseSessionResponse, |
| 58 | error: AcpSchema.Error, | 58 | error: AcpSchema.Error, |
| 59 | }); | 59 | }); |
| 60 | | 60 | |
| 61 | export const PromptRpc = Rpc.make(AGENT_METHODS.session_prompt, { | 61 | const PromptRpc = Rpc.make(AGENT_METHODS.session_prompt, { |
| 62 | payload: AcpSchema.PromptRequest, | 62 | payload: AcpSchema.PromptRequest, |
| 63 | success: AcpSchema.PromptResponse, | 63 | success: AcpSchema.PromptResponse, |
| 64 | error: AcpSchema.Error, | 64 | error: AcpSchema.Error, |
| 65 | }); | 65 | }); |
| 66 | | 66 | |
| 67 | export const SetSessionModelRpc = Rpc.make(AGENT_METHODS.session_set_model, { | 67 | const SetSessionModelRpc = Rpc.make(AGENT_METHODS.session_set_model, { |
| 68 | payload: AcpSchema.SetSessionModelRequest, | 68 | payload: AcpSchema.SetSessionModelRequest, |
| 69 | success: AcpSchema.SetSessionModelResponse, | 69 | success: AcpSchema.SetSessionModelResponse, |
| 70 | error: AcpSchema.Error, | 70 | error: AcpSchema.Error, |
| 71 | }); | 71 | }); |
| 72 | | 72 | |
| 73 | export const SetSessionConfigOptionRpc = Rpc.make(AGENT_METHODS.session_set_config_option, { | 73 | const SetSessionConfigOptionRpc = Rpc.make(AGENT_METHODS.session_set_config_option, { |
| 74 | payload: AcpSchema.SetSessionConfigOptionRequest, | 74 | payload: AcpSchema.SetSessionConfigOptionRequest, |
| 75 | success: AcpSchema.SetSessionConfigOptionResponse, | 75 | success: AcpSchema.SetSessionConfigOptionResponse, |
| 76 | error: AcpSchema.Error, | 76 | error: AcpSchema.Error, |
| 77 | }); | 77 | }); |
| 78 | | 78 | |
| 79 | export const ReadTextFileRpc = Rpc.make(CLIENT_METHODS.fs_read_text_file, { | 79 | const ReadTextFileRpc = Rpc.make(CLIENT_METHODS.fs_read_text_file, { |
| 80 | payload: AcpSchema.ReadTextFileRequest, | 80 | payload: AcpSchema.ReadTextFileRequest, |
| 81 | success: AcpSchema.ReadTextFileResponse, | 81 | success: AcpSchema.ReadTextFileResponse, |
| 82 | error: AcpSchema.Error, | 82 | error: AcpSchema.Error, |
| 83 | }); | 83 | }); |
| 84 | | 84 | |
| 85 | export const WriteTextFileRpc = Rpc.make(CLIENT_METHODS.fs_write_text_file, { | 85 | const WriteTextFileRpc = Rpc.make(CLIENT_METHODS.fs_write_text_file, { |
| 86 | payload: AcpSchema.WriteTextFileRequest, | 86 | payload: AcpSchema.WriteTextFileRequest, |
| 87 | success: AcpSchema.WriteTextFileResponse, | 87 | success: AcpSchema.WriteTextFileResponse, |
| 88 | error: AcpSchema.Error, | 88 | error: AcpSchema.Error, |
| 89 | }); | 89 | }); |
| 90 | | 90 | |
| 91 | export const RequestPermissionRpc = Rpc.make(CLIENT_METHODS.session_request_permission, { | 91 | const RequestPermissionRpc = Rpc.make(CLIENT_METHODS.session_request_permission, { |
| 92 | payload: AcpSchema.RequestPermissionRequest, | 92 | payload: AcpSchema.RequestPermissionRequest, |
| 93 | success: AcpSchema.RequestPermissionResponse, | 93 | success: AcpSchema.RequestPermissionResponse, |
| 94 | error: AcpSchema.Error, | 94 | error: AcpSchema.Error, |
| 95 | }); | 95 | }); |
| 96 | | 96 | |
| 97 | export const ElicitationRpc = Rpc.make(CLIENT_METHODS.session_elicitation, { | 97 | const ElicitationRpc = Rpc.make(CLIENT_METHODS.session_elicitation, { |
| 98 | payload: AcpSchema.ElicitationRequest, | 98 | payload: AcpSchema.ElicitationRequest, |
| 99 | success: AcpSchema.ElicitationResponse, | 99 | success: AcpSchema.ElicitationResponse, |
| 100 | error: AcpSchema.Error, | 100 | error: AcpSchema.Error, |
| 101 | }); | 101 | }); |
| 102 | | 102 | |
| 103 | export const CreateTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_create, { | 103 | const CreateTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_create, { |
| 104 | payload: AcpSchema.CreateTerminalRequest, | 104 | payload: AcpSchema.CreateTerminalRequest, |
| 105 | success: AcpSchema.CreateTerminalResponse, | 105 | success: AcpSchema.CreateTerminalResponse, |
| 106 | error: AcpSchema.Error, | 106 | error: AcpSchema.Error, |
| 107 | }); | 107 | }); |
| 108 | | 108 | |
| 109 | export const TerminalOutputRpc = Rpc.make(CLIENT_METHODS.terminal_output, { | 109 | const TerminalOutputRpc = Rpc.make(CLIENT_METHODS.terminal_output, { |
| 110 | payload: AcpSchema.TerminalOutputRequest, | 110 | payload: AcpSchema.TerminalOutputRequest, |
| 111 | success: AcpSchema.TerminalOutputResponse, | 111 | success: AcpSchema.TerminalOutputResponse, |
| 112 | error: AcpSchema.Error, | 112 | error: AcpSchema.Error, |
| 113 | }); | 113 | }); |
| 114 | | 114 | |
| 115 | export const ReleaseTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_release, { | 115 | const ReleaseTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_release, { |
| 116 | payload: AcpSchema.ReleaseTerminalRequest, | 116 | payload: AcpSchema.ReleaseTerminalRequest, |
| 117 | success: AcpSchema.ReleaseTerminalResponse, | 117 | success: AcpSchema.ReleaseTerminalResponse, |
| 118 | error: AcpSchema.Error, | 118 | error: AcpSchema.Error, |
| 119 | }); | 119 | }); |
| 120 | | 120 | |
| 121 | export const WaitForTerminalExitRpc = Rpc.make(CLIENT_METHODS.terminal_wait_for_exit, { | 121 | const WaitForTerminalExitRpc = Rpc.make(CLIENT_METHODS.terminal_wait_for_exit, { |
| 122 | payload: AcpSchema.WaitForTerminalExitRequest, | 122 | payload: AcpSchema.WaitForTerminalExitRequest, |
| 123 | success: AcpSchema.WaitForTerminalExitResponse, | 123 | success: AcpSchema.WaitForTerminalExitResponse, |
| 124 | error: AcpSchema.Error, | 124 | error: AcpSchema.Error, |
| 125 | }); | 125 | }); |
| 126 | | 126 | |
| 127 | export const KillTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_kill, { | 127 | const KillTerminalRpc = Rpc.make(CLIENT_METHODS.terminal_kill, { |
| 128 | payload: AcpSchema.KillTerminalRequest, | 128 | payload: AcpSchema.KillTerminalRequest, |
| 129 | success: AcpSchema.KillTerminalResponse, | 129 | success: AcpSchema.KillTerminalResponse, |
| 130 | error: AcpSchema.Error, | 130 | error: AcpSchema.Error, |