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