pi-cursor-agent 0.1.0
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/LICENSE +19 -0
- package/README.md +45 -0
- package/package.json +50 -0
- package/src/__generated__/agent/v1/agent_pb.ts +4642 -0
- package/src/__generated__/agent/v1/agent_service_connect.ts +71 -0
- package/src/__generated__/agent/v1/apply_agent_diff_tool_pb.ts +317 -0
- package/src/__generated__/agent/v1/ask_question_tool_pb.ts +588 -0
- package/src/__generated__/agent/v1/background_shell_exec_pb.ts +245 -0
- package/src/__generated__/agent/v1/computer_use_tool_pb.ts +959 -0
- package/src/__generated__/agent/v1/control_service_connect.ts +144 -0
- package/src/__generated__/agent/v1/control_service_pb.ts +1308 -0
- package/src/__generated__/agent/v1/create_plan_tool_pb.ts +366 -0
- package/src/__generated__/agent/v1/cursor_packages_pb.ts +278 -0
- package/src/__generated__/agent/v1/cursor_rules_pb.ts +301 -0
- package/src/__generated__/agent/v1/delete_exec_pb.ts +443 -0
- package/src/__generated__/agent/v1/delete_tool_pb.ts +52 -0
- package/src/__generated__/agent/v1/diagnostics_exec_pb.ts +399 -0
- package/src/__generated__/agent/v1/edit_tool_pb.ts +497 -0
- package/src/__generated__/agent/v1/exa_fetch_tool_pb.ts +472 -0
- package/src/__generated__/agent/v1/exa_search_tool_pb.ts +484 -0
- package/src/__generated__/agent/v1/exec_pb.ts +1271 -0
- package/src/__generated__/agent/v1/exec_service_connect.ts +14 -0
- package/src/__generated__/agent/v1/fetch_tool_pb.ts +242 -0
- package/src/__generated__/agent/v1/generate_image_tool_pb.ts +230 -0
- package/src/__generated__/agent/v1/glob_tool_pb.ts +248 -0
- package/src/__generated__/agent/v1/grep_exec_pb.ts +690 -0
- package/src/__generated__/agent/v1/grep_tool_pb.ts +52 -0
- package/src/__generated__/agent/v1/kv_pb.ts +281 -0
- package/src/__generated__/agent/v1/ls_exec_pb.ts +295 -0
- package/src/__generated__/agent/v1/ls_tool_pb.ts +52 -0
- package/src/__generated__/agent/v1/mcp_pb.ts +302 -0
- package/src/__generated__/agent/v1/mcp_resource_tool_pb.ts +688 -0
- package/src/__generated__/agent/v1/mcp_tool_pb.ts +630 -0
- package/src/__generated__/agent/v1/private_worker_bridge_external_connect.ts +26 -0
- package/src/__generated__/agent/v1/read_exec_pb.ts +412 -0
- package/src/__generated__/agent/v1/read_lints_tool_pb.ts +384 -0
- package/src/__generated__/agent/v1/read_tool_pb.ts +342 -0
- package/src/__generated__/agent/v1/record_screen_tool_pb.ts +376 -0
- package/src/__generated__/agent/v1/reflect_tool_pb.ts +236 -0
- package/src/__generated__/agent/v1/repo_pb.ts +154 -0
- package/src/__generated__/agent/v1/report_bugfix_results_tool_pb.ts +305 -0
- package/src/__generated__/agent/v1/request_context_exec_pb.ts +528 -0
- package/src/__generated__/agent/v1/sandbox_pb.ts +125 -0
- package/src/__generated__/agent/v1/selected_context_pb.ts +2272 -0
- package/src/__generated__/agent/v1/semsearch_tool_pb.ts +230 -0
- package/src/__generated__/agent/v1/setup_vm_environment_tool_pb.ts +168 -0
- package/src/__generated__/agent/v1/shell_exec_pb.ts +1195 -0
- package/src/__generated__/agent/v1/shell_tool_pb.ts +176 -0
- package/src/__generated__/agent/v1/start_grind_execution_tool_pb.ts +212 -0
- package/src/__generated__/agent/v1/start_grind_planning_tool_pb.ts +212 -0
- package/src/__generated__/agent/v1/subagents_pb.ts +1106 -0
- package/src/__generated__/agent/v1/switch_mode_tool_pb.ts +429 -0
- package/src/__generated__/agent/v1/todo_tool_pb.ts +551 -0
- package/src/__generated__/agent/v1/utils_pb.ts +348 -0
- package/src/__generated__/agent/v1/web_fetch_tool_pb.ts +429 -0
- package/src/__generated__/agent/v1/web_search_tool_pb.ts +466 -0
- package/src/__generated__/agent/v1/write_exec_pb.ts +379 -0
- package/src/__generated__/agent/v1/write_shell_stdin_tool_pb.ts +224 -0
- package/src/__generated__/aiserver/v1/aiserver_service_connect.ts +40 -0
- package/src/api/agent-service.ts +55 -0
- package/src/api/ai-service.ts +42 -0
- package/src/api/auth.ts +74 -0
- package/src/index.ts +101 -0
- package/src/lib/agent-store/disk.ts +139 -0
- package/src/lib/agent-store/index.ts +72 -0
- package/src/lib/agent-store/json-blob-store.ts +47 -0
- package/src/lib/auth.ts +135 -0
- package/src/lib/backoff.ts +32 -0
- package/src/lib/env.ts +3 -0
- package/src/lib/heartbeat.ts +21 -0
- package/src/pi/agent-store.ts +102 -0
- package/src/pi/env.ts +11 -0
- package/src/pi/executors/delete.ts +129 -0
- package/src/pi/executors/grep.ts +238 -0
- package/src/pi/executors/hook.ts +64 -0
- package/src/pi/executors/ls.ts +107 -0
- package/src/pi/executors/read.ts +73 -0
- package/src/pi/executors/request-context.ts +120 -0
- package/src/pi/executors/shell-stream.ts +136 -0
- package/src/pi/executors/shell.ts +157 -0
- package/src/pi/executors/stubs.ts +173 -0
- package/src/pi/executors/write.ts +189 -0
- package/src/pi/local-resource-provider/index.ts +10 -0
- package/src/pi/local-resource-provider/provider.ts +98 -0
- package/src/pi/local-resource-provider/types.ts +110 -0
- package/src/pi/model-mapping.ts +115 -0
- package/src/pi/model-override.ts +110 -0
- package/src/pi/model.ts +61 -0
- package/src/pi/request-builder.ts +279 -0
- package/src/pi/utils/tool-result.ts +35 -0
- package/src/stream.ts +386 -0
- package/src/tool-host.ts +44 -0
- package/src/vendor/agent-client/checkpoint-controller.ts +34 -0
- package/src/vendor/agent-client/connect.ts +348 -0
- package/src/vendor/agent-client/exec-controller.ts +102 -0
- package/src/vendor/agent-client/index.ts +25 -0
- package/src/vendor/agent-client/interaction-controller.ts +96 -0
- package/src/vendor/agent-client/split-stream.ts +143 -0
- package/src/vendor/agent-core/index.ts +9 -0
- package/src/vendor/agent-core/interaction-conversion.ts +558 -0
- package/src/vendor/agent-exec/controlled.ts +104 -0
- package/src/vendor/agent-exec/index.ts +45 -0
- package/src/vendor/agent-exec/registry-resource-accessor.ts +39 -0
- package/src/vendor/agent-exec/resources.ts +121 -0
- package/src/vendor/agent-exec/serialization.ts +22 -0
- package/src/vendor/agent-exec/simple-controlled-exec-manager.ts +161 -0
- package/src/vendor/agent-kv/agent-store.ts +115 -0
- package/src/vendor/agent-kv/blob-store.ts +36 -0
- package/src/vendor/agent-kv/controlled.ts +117 -0
- package/src/vendor/agent-kv/index.ts +15 -0
- package/src/vendor/agent-kv/serde.ts +44 -0
- package/src/vendor/local-exec/common.ts +19 -0
- package/src/vendor/local-exec/git-executor.ts +37 -0
- package/src/vendor/local-exec/git-helpers.ts +79 -0
- package/src/vendor/local-exec/index.ts +8 -0
- package/src/vendor/utils/index.ts +5 -0
- package/src/vendor/utils/map-writable.ts +34 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
// @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
|
|
2
|
+
// @generated from file agent/v1/switch_mode_tool.proto (package agent.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
|
|
6
|
+
import type { BinaryReadOptions, FieldList, JsonReadOptions, JsonValue, PartialMessage, PlainMessage } from "@bufbuild/protobuf";
|
|
7
|
+
import { Message, proto3 } from "@bufbuild/protobuf";
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @generated from message agent.v1.SwitchModeArgs
|
|
11
|
+
*/
|
|
12
|
+
export class SwitchModeArgs extends Message<SwitchModeArgs> {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from field: string target_mode_id = 1;
|
|
15
|
+
*/
|
|
16
|
+
targetModeId = "";
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @generated from field: optional string explanation = 2;
|
|
20
|
+
*/
|
|
21
|
+
explanation?: string;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* @generated from field: string tool_call_id = 3;
|
|
25
|
+
*/
|
|
26
|
+
toolCallId = "";
|
|
27
|
+
|
|
28
|
+
constructor(data?: PartialMessage<SwitchModeArgs>) {
|
|
29
|
+
super();
|
|
30
|
+
proto3.util.initPartial(data, this);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
34
|
+
static readonly typeName = "agent.v1.SwitchModeArgs";
|
|
35
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
36
|
+
{ no: 1, name: "target_mode_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
37
|
+
{ no: 2, name: "explanation", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
|
|
38
|
+
{ no: 3, name: "tool_call_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
39
|
+
]);
|
|
40
|
+
|
|
41
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeArgs {
|
|
42
|
+
return new SwitchModeArgs().fromBinary(bytes, options);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeArgs {
|
|
46
|
+
return new SwitchModeArgs().fromJson(jsonValue, options);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeArgs {
|
|
50
|
+
return new SwitchModeArgs().fromJsonString(jsonString, options);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
static equals(a: SwitchModeArgs | PlainMessage<SwitchModeArgs> | undefined, b: SwitchModeArgs | PlainMessage<SwitchModeArgs> | undefined): boolean {
|
|
54
|
+
return proto3.util.equals(SwitchModeArgs, a, b);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* @generated from message agent.v1.SwitchModeResult
|
|
60
|
+
*/
|
|
61
|
+
export class SwitchModeResult extends Message<SwitchModeResult> {
|
|
62
|
+
/**
|
|
63
|
+
* @generated from oneof agent.v1.SwitchModeResult.result
|
|
64
|
+
*/
|
|
65
|
+
result: {
|
|
66
|
+
/**
|
|
67
|
+
* @generated from field: agent.v1.SwitchModeSuccess success = 1;
|
|
68
|
+
*/
|
|
69
|
+
value: SwitchModeSuccess;
|
|
70
|
+
case: "success";
|
|
71
|
+
} | {
|
|
72
|
+
/**
|
|
73
|
+
* @generated from field: agent.v1.SwitchModeError error = 2;
|
|
74
|
+
*/
|
|
75
|
+
value: SwitchModeError;
|
|
76
|
+
case: "error";
|
|
77
|
+
} | {
|
|
78
|
+
/**
|
|
79
|
+
* @generated from field: agent.v1.SwitchModeRejected rejected = 3;
|
|
80
|
+
*/
|
|
81
|
+
value: SwitchModeRejected;
|
|
82
|
+
case: "rejected";
|
|
83
|
+
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
84
|
+
|
|
85
|
+
constructor(data?: PartialMessage<SwitchModeResult>) {
|
|
86
|
+
super();
|
|
87
|
+
proto3.util.initPartial(data, this);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
91
|
+
static readonly typeName = "agent.v1.SwitchModeResult";
|
|
92
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
93
|
+
{ no: 1, name: "success", kind: "message", T: SwitchModeSuccess, oneof: "result" },
|
|
94
|
+
{ no: 2, name: "error", kind: "message", T: SwitchModeError, oneof: "result" },
|
|
95
|
+
{ no: 3, name: "rejected", kind: "message", T: SwitchModeRejected, oneof: "result" },
|
|
96
|
+
]);
|
|
97
|
+
|
|
98
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeResult {
|
|
99
|
+
return new SwitchModeResult().fromBinary(bytes, options);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeResult {
|
|
103
|
+
return new SwitchModeResult().fromJson(jsonValue, options);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeResult {
|
|
107
|
+
return new SwitchModeResult().fromJsonString(jsonString, options);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
static equals(a: SwitchModeResult | PlainMessage<SwitchModeResult> | undefined, b: SwitchModeResult | PlainMessage<SwitchModeResult> | undefined): boolean {
|
|
111
|
+
return proto3.util.equals(SwitchModeResult, a, b);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @generated from message agent.v1.SwitchModeSuccess
|
|
117
|
+
*/
|
|
118
|
+
export class SwitchModeSuccess extends Message<SwitchModeSuccess> {
|
|
119
|
+
/**
|
|
120
|
+
* @generated from field: string from_mode_id = 1;
|
|
121
|
+
*/
|
|
122
|
+
fromModeId = "";
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* @generated from field: string to_mode_id = 2;
|
|
126
|
+
*/
|
|
127
|
+
toModeId = "";
|
|
128
|
+
|
|
129
|
+
constructor(data?: PartialMessage<SwitchModeSuccess>) {
|
|
130
|
+
super();
|
|
131
|
+
proto3.util.initPartial(data, this);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
135
|
+
static readonly typeName = "agent.v1.SwitchModeSuccess";
|
|
136
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
137
|
+
{ no: 1, name: "from_mode_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
138
|
+
{ no: 2, name: "to_mode_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
139
|
+
]);
|
|
140
|
+
|
|
141
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeSuccess {
|
|
142
|
+
return new SwitchModeSuccess().fromBinary(bytes, options);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeSuccess {
|
|
146
|
+
return new SwitchModeSuccess().fromJson(jsonValue, options);
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeSuccess {
|
|
150
|
+
return new SwitchModeSuccess().fromJsonString(jsonString, options);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
static equals(a: SwitchModeSuccess | PlainMessage<SwitchModeSuccess> | undefined, b: SwitchModeSuccess | PlainMessage<SwitchModeSuccess> | undefined): boolean {
|
|
154
|
+
return proto3.util.equals(SwitchModeSuccess, a, b);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/**
|
|
159
|
+
* @generated from message agent.v1.SwitchModeError
|
|
160
|
+
*/
|
|
161
|
+
export class SwitchModeError extends Message<SwitchModeError> {
|
|
162
|
+
/**
|
|
163
|
+
* @generated from field: string error = 1;
|
|
164
|
+
*/
|
|
165
|
+
error = "";
|
|
166
|
+
|
|
167
|
+
constructor(data?: PartialMessage<SwitchModeError>) {
|
|
168
|
+
super();
|
|
169
|
+
proto3.util.initPartial(data, this);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
173
|
+
static readonly typeName = "agent.v1.SwitchModeError";
|
|
174
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
175
|
+
{ no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
176
|
+
]);
|
|
177
|
+
|
|
178
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeError {
|
|
179
|
+
return new SwitchModeError().fromBinary(bytes, options);
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeError {
|
|
183
|
+
return new SwitchModeError().fromJson(jsonValue, options);
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeError {
|
|
187
|
+
return new SwitchModeError().fromJsonString(jsonString, options);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
static equals(a: SwitchModeError | PlainMessage<SwitchModeError> | undefined, b: SwitchModeError | PlainMessage<SwitchModeError> | undefined): boolean {
|
|
191
|
+
return proto3.util.equals(SwitchModeError, a, b);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* @generated from message agent.v1.SwitchModeRejected
|
|
197
|
+
*/
|
|
198
|
+
export class SwitchModeRejected extends Message<SwitchModeRejected> {
|
|
199
|
+
/**
|
|
200
|
+
* @generated from field: string reason = 1;
|
|
201
|
+
*/
|
|
202
|
+
reason = "";
|
|
203
|
+
|
|
204
|
+
constructor(data?: PartialMessage<SwitchModeRejected>) {
|
|
205
|
+
super();
|
|
206
|
+
proto3.util.initPartial(data, this);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
210
|
+
static readonly typeName = "agent.v1.SwitchModeRejected";
|
|
211
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
212
|
+
{ no: 1, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
213
|
+
]);
|
|
214
|
+
|
|
215
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeRejected {
|
|
216
|
+
return new SwitchModeRejected().fromBinary(bytes, options);
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeRejected {
|
|
220
|
+
return new SwitchModeRejected().fromJson(jsonValue, options);
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeRejected {
|
|
224
|
+
return new SwitchModeRejected().fromJsonString(jsonString, options);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
static equals(a: SwitchModeRejected | PlainMessage<SwitchModeRejected> | undefined, b: SwitchModeRejected | PlainMessage<SwitchModeRejected> | undefined): boolean {
|
|
228
|
+
return proto3.util.equals(SwitchModeRejected, a, b);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* @generated from message agent.v1.SwitchModeToolCall
|
|
234
|
+
*/
|
|
235
|
+
export class SwitchModeToolCall extends Message<SwitchModeToolCall> {
|
|
236
|
+
/**
|
|
237
|
+
* @generated from field: agent.v1.SwitchModeArgs args = 1;
|
|
238
|
+
*/
|
|
239
|
+
args?: SwitchModeArgs;
|
|
240
|
+
|
|
241
|
+
/**
|
|
242
|
+
* @generated from field: agent.v1.SwitchModeResult result = 2;
|
|
243
|
+
*/
|
|
244
|
+
result?: SwitchModeResult;
|
|
245
|
+
|
|
246
|
+
constructor(data?: PartialMessage<SwitchModeToolCall>) {
|
|
247
|
+
super();
|
|
248
|
+
proto3.util.initPartial(data, this);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
252
|
+
static readonly typeName = "agent.v1.SwitchModeToolCall";
|
|
253
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
254
|
+
{ no: 1, name: "args", kind: "message", T: SwitchModeArgs },
|
|
255
|
+
{ no: 2, name: "result", kind: "message", T: SwitchModeResult },
|
|
256
|
+
]);
|
|
257
|
+
|
|
258
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeToolCall {
|
|
259
|
+
return new SwitchModeToolCall().fromBinary(bytes, options);
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeToolCall {
|
|
263
|
+
return new SwitchModeToolCall().fromJson(jsonValue, options);
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeToolCall {
|
|
267
|
+
return new SwitchModeToolCall().fromJsonString(jsonString, options);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
static equals(a: SwitchModeToolCall | PlainMessage<SwitchModeToolCall> | undefined, b: SwitchModeToolCall | PlainMessage<SwitchModeToolCall> | undefined): boolean {
|
|
271
|
+
return proto3.util.equals(SwitchModeToolCall, a, b);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @generated from message agent.v1.SwitchModeRequestQuery
|
|
277
|
+
*/
|
|
278
|
+
export class SwitchModeRequestQuery extends Message<SwitchModeRequestQuery> {
|
|
279
|
+
/**
|
|
280
|
+
* @generated from field: agent.v1.SwitchModeArgs args = 1;
|
|
281
|
+
*/
|
|
282
|
+
args?: SwitchModeArgs;
|
|
283
|
+
|
|
284
|
+
constructor(data?: PartialMessage<SwitchModeRequestQuery>) {
|
|
285
|
+
super();
|
|
286
|
+
proto3.util.initPartial(data, this);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
290
|
+
static readonly typeName = "agent.v1.SwitchModeRequestQuery";
|
|
291
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
292
|
+
{ no: 1, name: "args", kind: "message", T: SwitchModeArgs },
|
|
293
|
+
]);
|
|
294
|
+
|
|
295
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeRequestQuery {
|
|
296
|
+
return new SwitchModeRequestQuery().fromBinary(bytes, options);
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeRequestQuery {
|
|
300
|
+
return new SwitchModeRequestQuery().fromJson(jsonValue, options);
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeRequestQuery {
|
|
304
|
+
return new SwitchModeRequestQuery().fromJsonString(jsonString, options);
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
static equals(a: SwitchModeRequestQuery | PlainMessage<SwitchModeRequestQuery> | undefined, b: SwitchModeRequestQuery | PlainMessage<SwitchModeRequestQuery> | undefined): boolean {
|
|
308
|
+
return proto3.util.equals(SwitchModeRequestQuery, a, b);
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/**
|
|
313
|
+
* @generated from message agent.v1.SwitchModeRequestResponse
|
|
314
|
+
*/
|
|
315
|
+
export class SwitchModeRequestResponse extends Message<SwitchModeRequestResponse> {
|
|
316
|
+
/**
|
|
317
|
+
* @generated from oneof agent.v1.SwitchModeRequestResponse.result
|
|
318
|
+
*/
|
|
319
|
+
result: {
|
|
320
|
+
/**
|
|
321
|
+
* @generated from field: agent.v1.SwitchModeRequestResponse_Approved approved = 1;
|
|
322
|
+
*/
|
|
323
|
+
value: SwitchModeRequestResponse_Approved;
|
|
324
|
+
case: "approved";
|
|
325
|
+
} | {
|
|
326
|
+
/**
|
|
327
|
+
* @generated from field: agent.v1.SwitchModeRequestResponse_Rejected rejected = 2;
|
|
328
|
+
*/
|
|
329
|
+
value: SwitchModeRequestResponse_Rejected;
|
|
330
|
+
case: "rejected";
|
|
331
|
+
} | { case: undefined; value?: undefined } = { case: undefined };
|
|
332
|
+
|
|
333
|
+
constructor(data?: PartialMessage<SwitchModeRequestResponse>) {
|
|
334
|
+
super();
|
|
335
|
+
proto3.util.initPartial(data, this);
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
339
|
+
static readonly typeName = "agent.v1.SwitchModeRequestResponse";
|
|
340
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
341
|
+
{ no: 1, name: "approved", kind: "message", T: SwitchModeRequestResponse_Approved, oneof: "result" },
|
|
342
|
+
{ no: 2, name: "rejected", kind: "message", T: SwitchModeRequestResponse_Rejected, oneof: "result" },
|
|
343
|
+
]);
|
|
344
|
+
|
|
345
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeRequestResponse {
|
|
346
|
+
return new SwitchModeRequestResponse().fromBinary(bytes, options);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse {
|
|
350
|
+
return new SwitchModeRequestResponse().fromJson(jsonValue, options);
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse {
|
|
354
|
+
return new SwitchModeRequestResponse().fromJsonString(jsonString, options);
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
static equals(a: SwitchModeRequestResponse | PlainMessage<SwitchModeRequestResponse> | undefined, b: SwitchModeRequestResponse | PlainMessage<SwitchModeRequestResponse> | undefined): boolean {
|
|
358
|
+
return proto3.util.equals(SwitchModeRequestResponse, a, b);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/**
|
|
363
|
+
* @generated from message agent.v1.SwitchModeRequestResponse_Approved
|
|
364
|
+
*/
|
|
365
|
+
export class SwitchModeRequestResponse_Approved extends Message<SwitchModeRequestResponse_Approved> {
|
|
366
|
+
constructor(data?: PartialMessage<SwitchModeRequestResponse_Approved>) {
|
|
367
|
+
super();
|
|
368
|
+
proto3.util.initPartial(data, this);
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
372
|
+
static readonly typeName = "agent.v1.SwitchModeRequestResponse_Approved";
|
|
373
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
374
|
+
]);
|
|
375
|
+
|
|
376
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeRequestResponse_Approved {
|
|
377
|
+
return new SwitchModeRequestResponse_Approved().fromBinary(bytes, options);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse_Approved {
|
|
381
|
+
return new SwitchModeRequestResponse_Approved().fromJson(jsonValue, options);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse_Approved {
|
|
385
|
+
return new SwitchModeRequestResponse_Approved().fromJsonString(jsonString, options);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
static equals(a: SwitchModeRequestResponse_Approved | PlainMessage<SwitchModeRequestResponse_Approved> | undefined, b: SwitchModeRequestResponse_Approved | PlainMessage<SwitchModeRequestResponse_Approved> | undefined): boolean {
|
|
389
|
+
return proto3.util.equals(SwitchModeRequestResponse_Approved, a, b);
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/**
|
|
394
|
+
* @generated from message agent.v1.SwitchModeRequestResponse_Rejected
|
|
395
|
+
*/
|
|
396
|
+
export class SwitchModeRequestResponse_Rejected extends Message<SwitchModeRequestResponse_Rejected> {
|
|
397
|
+
/**
|
|
398
|
+
* @generated from field: string reason = 1;
|
|
399
|
+
*/
|
|
400
|
+
reason = "";
|
|
401
|
+
|
|
402
|
+
constructor(data?: PartialMessage<SwitchModeRequestResponse_Rejected>) {
|
|
403
|
+
super();
|
|
404
|
+
proto3.util.initPartial(data, this);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
static readonly runtime: typeof proto3 = proto3;
|
|
408
|
+
static readonly typeName = "agent.v1.SwitchModeRequestResponse_Rejected";
|
|
409
|
+
static readonly fields: FieldList = proto3.util.newFieldList(() => [
|
|
410
|
+
{ no: 1, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
|
|
411
|
+
]);
|
|
412
|
+
|
|
413
|
+
static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SwitchModeRequestResponse_Rejected {
|
|
414
|
+
return new SwitchModeRequestResponse_Rejected().fromBinary(bytes, options);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse_Rejected {
|
|
418
|
+
return new SwitchModeRequestResponse_Rejected().fromJson(jsonValue, options);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SwitchModeRequestResponse_Rejected {
|
|
422
|
+
return new SwitchModeRequestResponse_Rejected().fromJsonString(jsonString, options);
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
static equals(a: SwitchModeRequestResponse_Rejected | PlainMessage<SwitchModeRequestResponse_Rejected> | undefined, b: SwitchModeRequestResponse_Rejected | PlainMessage<SwitchModeRequestResponse_Rejected> | undefined): boolean {
|
|
426
|
+
return proto3.util.equals(SwitchModeRequestResponse_Rejected, a, b);
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
|