DefaultACPClient
Base classes¶
| Name | Children | Inherits |
|---|---|---|
| Client aclientp.client.protocol Base client interface for ACP. |
⋔ Inheritance diagram¶
graph TD
95970860331904["default_client.DefaultACPClient"]
95970858218656["protocol.Client"]
95970836711072["typing.Protocol"]
95970835676112["typing.Generic"]
125067848591872["builtins.object"]
95970858218656 --> 95970860331904
95970836711072 --> 95970858218656
95970835676112 --> 95970836711072
125067848591872 --> 95970835676112
🛈 DocStrings¶
Bases: Client
Default implementation of ACP Client interface for basic operations.
This provides a basic client implementation that can be used for testing or as a base for more sophisticated client implementations.
Source code in src/aclientp/client/implementations/default_client.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 | |
__init__
¶
__init__(
*,
allow_file_operations: bool = False,
permission_outcomes: list[dict[str, DeniedOutcome | AllowedOutcome]] | None = None,
use_real_files: bool = True,
) -> None
Initialize default ACP client.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
allow_file_operations
|
bool
|
Whether to allow file read/write operations |
False
|
permission_outcomes
|
list[dict[str, DeniedOutcome | AllowedOutcome]] | None
|
Queue of permission outcomes for testing |
None
|
use_real_files
|
bool
|
Whether to use real filesystem or in-memory storage |
True
|
Source code in src/aclientp/client/implementations/default_client.py
clear_session_updates
¶
create_terminal
async
¶
create_terminal(params: CreateTerminalRequest) -> CreateTerminalResponse
Create terminal (not implemented).
elicitation
async
¶
elicitation(params: ElicitationRequest) -> ElicitationResponse
Decline elicitation by default.
Source code in src/aclientp/client/implementations/default_client.py
elicitation_complete
async
¶
elicitation_complete(params: ElicitationCompleteNotification) -> None
get_session_updates
¶
get_session_updates() -> list[SessionNotification]
kill_terminal
async
¶
kill_terminal(params: KillTerminalRequest) -> KillTerminalResponse | None
Kill terminal (not implemented).
read_text_file
async
¶
read_text_file(params: ReadTextFileRequest) -> ReadTextFileResponse
Read text from file (if allowed).
Source code in src/aclientp/client/implementations/default_client.py
release_terminal
async
¶
release_terminal(params: ReleaseTerminalRequest) -> ReleaseTerminalResponse | None
Release terminal (not implemented).
request_permission
async
¶
request_permission(params: RequestPermissionRequest) -> RequestPermissionResponse
Default permission handler - grants all permissions or uses test queue.
Source code in src/aclientp/client/implementations/default_client.py
session_update
async
¶
session_update(params: SessionNotification) -> None
Handle session update notifications.
Source code in src/aclientp/client/implementations/default_client.py
terminal_output
async
¶
terminal_output(params: TerminalOutputRequest) -> TerminalOutputResponse
Get terminal output (not implemented).
wait_for_terminal_exit
async
¶
wait_for_terminal_exit(params: WaitForTerminalExitRequest) -> WaitForTerminalExitResponse
Wait for terminal exit (not implemented).
Source code in src/aclientp/client/implementations/default_client.py
write_text_file
async
¶
write_text_file(params: WriteTextFileRequest) -> WriteTextFileResponse
Write text to file (if allowed).