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,588 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/ask_question_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.AskQuestionToolCall
11
+ */
12
+ export class AskQuestionToolCall extends Message<AskQuestionToolCall> {
13
+ /**
14
+ * @generated from field: agent.v1.AskQuestionArgs args = 1;
15
+ */
16
+ args?: AskQuestionArgs;
17
+
18
+ /**
19
+ * @generated from field: agent.v1.AskQuestionResult result = 2;
20
+ */
21
+ result?: AskQuestionResult;
22
+
23
+ constructor(data?: PartialMessage<AskQuestionToolCall>) {
24
+ super();
25
+ proto3.util.initPartial(data, this);
26
+ }
27
+
28
+ static readonly runtime: typeof proto3 = proto3;
29
+ static readonly typeName = "agent.v1.AskQuestionToolCall";
30
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
31
+ { no: 1, name: "args", kind: "message", T: AskQuestionArgs },
32
+ { no: 2, name: "result", kind: "message", T: AskQuestionResult },
33
+ ]);
34
+
35
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionToolCall {
36
+ return new AskQuestionToolCall().fromBinary(bytes, options);
37
+ }
38
+
39
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionToolCall {
40
+ return new AskQuestionToolCall().fromJson(jsonValue, options);
41
+ }
42
+
43
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionToolCall {
44
+ return new AskQuestionToolCall().fromJsonString(jsonString, options);
45
+ }
46
+
47
+ static equals(a: AskQuestionToolCall | PlainMessage<AskQuestionToolCall> | undefined, b: AskQuestionToolCall | PlainMessage<AskQuestionToolCall> | undefined): boolean {
48
+ return proto3.util.equals(AskQuestionToolCall, a, b);
49
+ }
50
+ }
51
+
52
+ /**
53
+ * @generated from message agent.v1.AskQuestionArgs
54
+ */
55
+ export class AskQuestionArgs extends Message<AskQuestionArgs> {
56
+ /**
57
+ * @generated from field: string title = 1;
58
+ */
59
+ title = "";
60
+
61
+ /**
62
+ * @generated from field: repeated agent.v1.AskQuestionArgs_Question questions = 2;
63
+ */
64
+ questions: AskQuestionArgs_Question[] = [];
65
+
66
+ /**
67
+ * @generated from field: bool run_async = 5;
68
+ */
69
+ runAsync = false;
70
+
71
+ /**
72
+ * @generated from field: string async_original_tool_call_id = 6;
73
+ */
74
+ asyncOriginalToolCallId = "";
75
+
76
+ constructor(data?: PartialMessage<AskQuestionArgs>) {
77
+ super();
78
+ proto3.util.initPartial(data, this);
79
+ }
80
+
81
+ static readonly runtime: typeof proto3 = proto3;
82
+ static readonly typeName = "agent.v1.AskQuestionArgs";
83
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
84
+ { no: 1, name: "title", kind: "scalar", T: 9 /* ScalarType.STRING */ },
85
+ { no: 2, name: "questions", kind: "message", T: AskQuestionArgs_Question, repeated: true },
86
+ { no: 5, name: "run_async", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
87
+ { no: 6, name: "async_original_tool_call_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
88
+ ]);
89
+
90
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionArgs {
91
+ return new AskQuestionArgs().fromBinary(bytes, options);
92
+ }
93
+
94
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionArgs {
95
+ return new AskQuestionArgs().fromJson(jsonValue, options);
96
+ }
97
+
98
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionArgs {
99
+ return new AskQuestionArgs().fromJsonString(jsonString, options);
100
+ }
101
+
102
+ static equals(a: AskQuestionArgs | PlainMessage<AskQuestionArgs> | undefined, b: AskQuestionArgs | PlainMessage<AskQuestionArgs> | undefined): boolean {
103
+ return proto3.util.equals(AskQuestionArgs, a, b);
104
+ }
105
+ }
106
+
107
+ /**
108
+ * @generated from message agent.v1.AskQuestionArgs_Question
109
+ */
110
+ export class AskQuestionArgs_Question extends Message<AskQuestionArgs_Question> {
111
+ /**
112
+ * @generated from field: string id = 1;
113
+ */
114
+ id = "";
115
+
116
+ /**
117
+ * @generated from field: string prompt = 2;
118
+ */
119
+ prompt = "";
120
+
121
+ /**
122
+ * @generated from field: repeated agent.v1.AskQuestionArgs_Option options = 3;
123
+ */
124
+ options: AskQuestionArgs_Option[] = [];
125
+
126
+ /**
127
+ * @generated from field: bool allow_multiple = 4;
128
+ */
129
+ allowMultiple = false;
130
+
131
+ constructor(data?: PartialMessage<AskQuestionArgs_Question>) {
132
+ super();
133
+ proto3.util.initPartial(data, this);
134
+ }
135
+
136
+ static readonly runtime: typeof proto3 = proto3;
137
+ static readonly typeName = "agent.v1.AskQuestionArgs_Question";
138
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
139
+ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
140
+ { no: 2, name: "prompt", kind: "scalar", T: 9 /* ScalarType.STRING */ },
141
+ { no: 3, name: "options", kind: "message", T: AskQuestionArgs_Option, repeated: true },
142
+ { no: 4, name: "allow_multiple", kind: "scalar", T: 8 /* ScalarType.BOOL */ },
143
+ ]);
144
+
145
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionArgs_Question {
146
+ return new AskQuestionArgs_Question().fromBinary(bytes, options);
147
+ }
148
+
149
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionArgs_Question {
150
+ return new AskQuestionArgs_Question().fromJson(jsonValue, options);
151
+ }
152
+
153
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionArgs_Question {
154
+ return new AskQuestionArgs_Question().fromJsonString(jsonString, options);
155
+ }
156
+
157
+ static equals(a: AskQuestionArgs_Question | PlainMessage<AskQuestionArgs_Question> | undefined, b: AskQuestionArgs_Question | PlainMessage<AskQuestionArgs_Question> | undefined): boolean {
158
+ return proto3.util.equals(AskQuestionArgs_Question, a, b);
159
+ }
160
+ }
161
+
162
+ /**
163
+ * @generated from message agent.v1.AskQuestionArgs_Option
164
+ */
165
+ export class AskQuestionArgs_Option extends Message<AskQuestionArgs_Option> {
166
+ /**
167
+ * @generated from field: string id = 1;
168
+ */
169
+ id = "";
170
+
171
+ /**
172
+ * @generated from field: string label = 2;
173
+ */
174
+ label = "";
175
+
176
+ constructor(data?: PartialMessage<AskQuestionArgs_Option>) {
177
+ super();
178
+ proto3.util.initPartial(data, this);
179
+ }
180
+
181
+ static readonly runtime: typeof proto3 = proto3;
182
+ static readonly typeName = "agent.v1.AskQuestionArgs_Option";
183
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
184
+ { no: 1, name: "id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
185
+ { no: 2, name: "label", kind: "scalar", T: 9 /* ScalarType.STRING */ },
186
+ ]);
187
+
188
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionArgs_Option {
189
+ return new AskQuestionArgs_Option().fromBinary(bytes, options);
190
+ }
191
+
192
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionArgs_Option {
193
+ return new AskQuestionArgs_Option().fromJson(jsonValue, options);
194
+ }
195
+
196
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionArgs_Option {
197
+ return new AskQuestionArgs_Option().fromJsonString(jsonString, options);
198
+ }
199
+
200
+ static equals(a: AskQuestionArgs_Option | PlainMessage<AskQuestionArgs_Option> | undefined, b: AskQuestionArgs_Option | PlainMessage<AskQuestionArgs_Option> | undefined): boolean {
201
+ return proto3.util.equals(AskQuestionArgs_Option, a, b);
202
+ }
203
+ }
204
+
205
+ /**
206
+ * @generated from message agent.v1.AskQuestionAsync
207
+ */
208
+ export class AskQuestionAsync extends Message<AskQuestionAsync> {
209
+ constructor(data?: PartialMessage<AskQuestionAsync>) {
210
+ super();
211
+ proto3.util.initPartial(data, this);
212
+ }
213
+
214
+ static readonly runtime: typeof proto3 = proto3;
215
+ static readonly typeName = "agent.v1.AskQuestionAsync";
216
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
217
+ ]);
218
+
219
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionAsync {
220
+ return new AskQuestionAsync().fromBinary(bytes, options);
221
+ }
222
+
223
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionAsync {
224
+ return new AskQuestionAsync().fromJson(jsonValue, options);
225
+ }
226
+
227
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionAsync {
228
+ return new AskQuestionAsync().fromJsonString(jsonString, options);
229
+ }
230
+
231
+ static equals(a: AskQuestionAsync | PlainMessage<AskQuestionAsync> | undefined, b: AskQuestionAsync | PlainMessage<AskQuestionAsync> | undefined): boolean {
232
+ return proto3.util.equals(AskQuestionAsync, a, b);
233
+ }
234
+ }
235
+
236
+ /**
237
+ * @generated from message agent.v1.AskQuestionResult
238
+ */
239
+ export class AskQuestionResult extends Message<AskQuestionResult> {
240
+ /**
241
+ * @generated from oneof agent.v1.AskQuestionResult.result
242
+ */
243
+ result: {
244
+ /**
245
+ * @generated from field: agent.v1.AskQuestionSuccess success = 1;
246
+ */
247
+ value: AskQuestionSuccess;
248
+ case: "success";
249
+ } | {
250
+ /**
251
+ * @generated from field: agent.v1.AskQuestionError error = 2;
252
+ */
253
+ value: AskQuestionError;
254
+ case: "error";
255
+ } | {
256
+ /**
257
+ * @generated from field: agent.v1.AskQuestionRejected rejected = 3;
258
+ */
259
+ value: AskQuestionRejected;
260
+ case: "rejected";
261
+ } | {
262
+ /**
263
+ * @generated from field: agent.v1.AskQuestionAsync async = 4;
264
+ */
265
+ value: AskQuestionAsync;
266
+ case: "async";
267
+ } | { case: undefined; value?: undefined } = { case: undefined };
268
+
269
+ constructor(data?: PartialMessage<AskQuestionResult>) {
270
+ super();
271
+ proto3.util.initPartial(data, this);
272
+ }
273
+
274
+ static readonly runtime: typeof proto3 = proto3;
275
+ static readonly typeName = "agent.v1.AskQuestionResult";
276
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
277
+ { no: 1, name: "success", kind: "message", T: AskQuestionSuccess, oneof: "result" },
278
+ { no: 2, name: "error", kind: "message", T: AskQuestionError, oneof: "result" },
279
+ { no: 3, name: "rejected", kind: "message", T: AskQuestionRejected, oneof: "result" },
280
+ { no: 4, name: "async", kind: "message", T: AskQuestionAsync, oneof: "result" },
281
+ ]);
282
+
283
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionResult {
284
+ return new AskQuestionResult().fromBinary(bytes, options);
285
+ }
286
+
287
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionResult {
288
+ return new AskQuestionResult().fromJson(jsonValue, options);
289
+ }
290
+
291
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionResult {
292
+ return new AskQuestionResult().fromJsonString(jsonString, options);
293
+ }
294
+
295
+ static equals(a: AskQuestionResult | PlainMessage<AskQuestionResult> | undefined, b: AskQuestionResult | PlainMessage<AskQuestionResult> | undefined): boolean {
296
+ return proto3.util.equals(AskQuestionResult, a, b);
297
+ }
298
+ }
299
+
300
+ /**
301
+ * @generated from message agent.v1.AskQuestionSuccess
302
+ */
303
+ export class AskQuestionSuccess extends Message<AskQuestionSuccess> {
304
+ /**
305
+ * @generated from field: repeated agent.v1.AskQuestionSuccess_Answer answers = 1;
306
+ */
307
+ answers: AskQuestionSuccess_Answer[] = [];
308
+
309
+ constructor(data?: PartialMessage<AskQuestionSuccess>) {
310
+ super();
311
+ proto3.util.initPartial(data, this);
312
+ }
313
+
314
+ static readonly runtime: typeof proto3 = proto3;
315
+ static readonly typeName = "agent.v1.AskQuestionSuccess";
316
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
317
+ { no: 1, name: "answers", kind: "message", T: AskQuestionSuccess_Answer, repeated: true },
318
+ ]);
319
+
320
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionSuccess {
321
+ return new AskQuestionSuccess().fromBinary(bytes, options);
322
+ }
323
+
324
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionSuccess {
325
+ return new AskQuestionSuccess().fromJson(jsonValue, options);
326
+ }
327
+
328
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionSuccess {
329
+ return new AskQuestionSuccess().fromJsonString(jsonString, options);
330
+ }
331
+
332
+ static equals(a: AskQuestionSuccess | PlainMessage<AskQuestionSuccess> | undefined, b: AskQuestionSuccess | PlainMessage<AskQuestionSuccess> | undefined): boolean {
333
+ return proto3.util.equals(AskQuestionSuccess, a, b);
334
+ }
335
+ }
336
+
337
+ /**
338
+ * @generated from message agent.v1.AskQuestionSuccess_Answer
339
+ */
340
+ export class AskQuestionSuccess_Answer extends Message<AskQuestionSuccess_Answer> {
341
+ /**
342
+ * @generated from field: string question_id = 1;
343
+ */
344
+ questionId = "";
345
+
346
+ /**
347
+ * @generated from field: repeated string selected_option_ids = 2;
348
+ */
349
+ selectedOptionIds: string[] = [];
350
+
351
+ /**
352
+ * @generated from field: string freeform_text = 3;
353
+ */
354
+ freeformText = "";
355
+
356
+ constructor(data?: PartialMessage<AskQuestionSuccess_Answer>) {
357
+ super();
358
+ proto3.util.initPartial(data, this);
359
+ }
360
+
361
+ static readonly runtime: typeof proto3 = proto3;
362
+ static readonly typeName = "agent.v1.AskQuestionSuccess_Answer";
363
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
364
+ { no: 1, name: "question_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
365
+ { no: 2, name: "selected_option_ids", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
366
+ { no: 3, name: "freeform_text", kind: "scalar", T: 9 /* ScalarType.STRING */ },
367
+ ]);
368
+
369
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionSuccess_Answer {
370
+ return new AskQuestionSuccess_Answer().fromBinary(bytes, options);
371
+ }
372
+
373
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionSuccess_Answer {
374
+ return new AskQuestionSuccess_Answer().fromJson(jsonValue, options);
375
+ }
376
+
377
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionSuccess_Answer {
378
+ return new AskQuestionSuccess_Answer().fromJsonString(jsonString, options);
379
+ }
380
+
381
+ static equals(a: AskQuestionSuccess_Answer | PlainMessage<AskQuestionSuccess_Answer> | undefined, b: AskQuestionSuccess_Answer | PlainMessage<AskQuestionSuccess_Answer> | undefined): boolean {
382
+ return proto3.util.equals(AskQuestionSuccess_Answer, a, b);
383
+ }
384
+ }
385
+
386
+ /**
387
+ * @generated from message agent.v1.AskQuestionError
388
+ */
389
+ export class AskQuestionError extends Message<AskQuestionError> {
390
+ /**
391
+ * @generated from field: string error_message = 1;
392
+ */
393
+ errorMessage = "";
394
+
395
+ constructor(data?: PartialMessage<AskQuestionError>) {
396
+ super();
397
+ proto3.util.initPartial(data, this);
398
+ }
399
+
400
+ static readonly runtime: typeof proto3 = proto3;
401
+ static readonly typeName = "agent.v1.AskQuestionError";
402
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
403
+ { no: 1, name: "error_message", kind: "scalar", T: 9 /* ScalarType.STRING */ },
404
+ ]);
405
+
406
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionError {
407
+ return new AskQuestionError().fromBinary(bytes, options);
408
+ }
409
+
410
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionError {
411
+ return new AskQuestionError().fromJson(jsonValue, options);
412
+ }
413
+
414
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionError {
415
+ return new AskQuestionError().fromJsonString(jsonString, options);
416
+ }
417
+
418
+ static equals(a: AskQuestionError | PlainMessage<AskQuestionError> | undefined, b: AskQuestionError | PlainMessage<AskQuestionError> | undefined): boolean {
419
+ return proto3.util.equals(AskQuestionError, a, b);
420
+ }
421
+ }
422
+
423
+ /**
424
+ * @generated from message agent.v1.AskQuestionRejected
425
+ */
426
+ export class AskQuestionRejected extends Message<AskQuestionRejected> {
427
+ /**
428
+ * @generated from field: string reason = 1;
429
+ */
430
+ reason = "";
431
+
432
+ constructor(data?: PartialMessage<AskQuestionRejected>) {
433
+ super();
434
+ proto3.util.initPartial(data, this);
435
+ }
436
+
437
+ static readonly runtime: typeof proto3 = proto3;
438
+ static readonly typeName = "agent.v1.AskQuestionRejected";
439
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
440
+ { no: 1, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
441
+ ]);
442
+
443
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionRejected {
444
+ return new AskQuestionRejected().fromBinary(bytes, options);
445
+ }
446
+
447
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionRejected {
448
+ return new AskQuestionRejected().fromJson(jsonValue, options);
449
+ }
450
+
451
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionRejected {
452
+ return new AskQuestionRejected().fromJsonString(jsonString, options);
453
+ }
454
+
455
+ static equals(a: AskQuestionRejected | PlainMessage<AskQuestionRejected> | undefined, b: AskQuestionRejected | PlainMessage<AskQuestionRejected> | undefined): boolean {
456
+ return proto3.util.equals(AskQuestionRejected, a, b);
457
+ }
458
+ }
459
+
460
+ /**
461
+ * @generated from message agent.v1.AskQuestionInteractionQuery
462
+ */
463
+ export class AskQuestionInteractionQuery extends Message<AskQuestionInteractionQuery> {
464
+ /**
465
+ * @generated from field: agent.v1.AskQuestionArgs args = 1;
466
+ */
467
+ args?: AskQuestionArgs;
468
+
469
+ /**
470
+ * @generated from field: string tool_call_id = 2;
471
+ */
472
+ toolCallId = "";
473
+
474
+ constructor(data?: PartialMessage<AskQuestionInteractionQuery>) {
475
+ super();
476
+ proto3.util.initPartial(data, this);
477
+ }
478
+
479
+ static readonly runtime: typeof proto3 = proto3;
480
+ static readonly typeName = "agent.v1.AskQuestionInteractionQuery";
481
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
482
+ { no: 1, name: "args", kind: "message", T: AskQuestionArgs },
483
+ { no: 2, name: "tool_call_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
484
+ ]);
485
+
486
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionInteractionQuery {
487
+ return new AskQuestionInteractionQuery().fromBinary(bytes, options);
488
+ }
489
+
490
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionInteractionQuery {
491
+ return new AskQuestionInteractionQuery().fromJson(jsonValue, options);
492
+ }
493
+
494
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionInteractionQuery {
495
+ return new AskQuestionInteractionQuery().fromJsonString(jsonString, options);
496
+ }
497
+
498
+ static equals(a: AskQuestionInteractionQuery | PlainMessage<AskQuestionInteractionQuery> | undefined, b: AskQuestionInteractionQuery | PlainMessage<AskQuestionInteractionQuery> | undefined): boolean {
499
+ return proto3.util.equals(AskQuestionInteractionQuery, a, b);
500
+ }
501
+ }
502
+
503
+ /**
504
+ * @generated from message agent.v1.AskQuestionInteractionResponse
505
+ */
506
+ export class AskQuestionInteractionResponse extends Message<AskQuestionInteractionResponse> {
507
+ /**
508
+ * @generated from field: agent.v1.AskQuestionResult result = 1;
509
+ */
510
+ result?: AskQuestionResult;
511
+
512
+ constructor(data?: PartialMessage<AskQuestionInteractionResponse>) {
513
+ super();
514
+ proto3.util.initPartial(data, this);
515
+ }
516
+
517
+ static readonly runtime: typeof proto3 = proto3;
518
+ static readonly typeName = "agent.v1.AskQuestionInteractionResponse";
519
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
520
+ { no: 1, name: "result", kind: "message", T: AskQuestionResult },
521
+ ]);
522
+
523
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AskQuestionInteractionResponse {
524
+ return new AskQuestionInteractionResponse().fromBinary(bytes, options);
525
+ }
526
+
527
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AskQuestionInteractionResponse {
528
+ return new AskQuestionInteractionResponse().fromJson(jsonValue, options);
529
+ }
530
+
531
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AskQuestionInteractionResponse {
532
+ return new AskQuestionInteractionResponse().fromJsonString(jsonString, options);
533
+ }
534
+
535
+ static equals(a: AskQuestionInteractionResponse | PlainMessage<AskQuestionInteractionResponse> | undefined, b: AskQuestionInteractionResponse | PlainMessage<AskQuestionInteractionResponse> | undefined): boolean {
536
+ return proto3.util.equals(AskQuestionInteractionResponse, a, b);
537
+ }
538
+ }
539
+
540
+ /**
541
+ * @generated from message agent.v1.AsyncAskQuestionCompletionAction
542
+ */
543
+ export class AsyncAskQuestionCompletionAction extends Message<AsyncAskQuestionCompletionAction> {
544
+ /**
545
+ * @generated from field: string original_tool_call_id = 1;
546
+ */
547
+ originalToolCallId = "";
548
+
549
+ /**
550
+ * @generated from field: agent.v1.AskQuestionArgs original_args = 2;
551
+ */
552
+ originalArgs?: AskQuestionArgs;
553
+
554
+ /**
555
+ * @generated from field: agent.v1.AskQuestionResult result = 3;
556
+ */
557
+ result?: AskQuestionResult;
558
+
559
+ constructor(data?: PartialMessage<AsyncAskQuestionCompletionAction>) {
560
+ super();
561
+ proto3.util.initPartial(data, this);
562
+ }
563
+
564
+ static readonly runtime: typeof proto3 = proto3;
565
+ static readonly typeName = "agent.v1.AsyncAskQuestionCompletionAction";
566
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
567
+ { no: 1, name: "original_tool_call_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
568
+ { no: 2, name: "original_args", kind: "message", T: AskQuestionArgs },
569
+ { no: 3, name: "result", kind: "message", T: AskQuestionResult },
570
+ ]);
571
+
572
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): AsyncAskQuestionCompletionAction {
573
+ return new AsyncAskQuestionCompletionAction().fromBinary(bytes, options);
574
+ }
575
+
576
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): AsyncAskQuestionCompletionAction {
577
+ return new AsyncAskQuestionCompletionAction().fromJson(jsonValue, options);
578
+ }
579
+
580
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): AsyncAskQuestionCompletionAction {
581
+ return new AsyncAskQuestionCompletionAction().fromJsonString(jsonString, options);
582
+ }
583
+
584
+ static equals(a: AsyncAskQuestionCompletionAction | PlainMessage<AsyncAskQuestionCompletionAction> | undefined, b: AsyncAskQuestionCompletionAction | PlainMessage<AsyncAskQuestionCompletionAction> | undefined): boolean {
585
+ return proto3.util.equals(AsyncAskQuestionCompletionAction, a, b);
586
+ }
587
+ }
588
+