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,688 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/mcp_resource_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.ListMcpResourcesToolCall
11
+ */
12
+ export class ListMcpResourcesToolCall extends Message<ListMcpResourcesToolCall> {
13
+ /**
14
+ * @generated from field: agent.v1.ListMcpResourcesExecArgs args = 1;
15
+ */
16
+ args?: ListMcpResourcesExecArgs;
17
+
18
+ /**
19
+ * @generated from field: agent.v1.ListMcpResourcesExecResult result = 2;
20
+ */
21
+ result?: ListMcpResourcesExecResult;
22
+
23
+ constructor(data?: PartialMessage<ListMcpResourcesToolCall>) {
24
+ super();
25
+ proto3.util.initPartial(data, this);
26
+ }
27
+
28
+ static readonly runtime: typeof proto3 = proto3;
29
+ static readonly typeName = "agent.v1.ListMcpResourcesToolCall";
30
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
31
+ { no: 1, name: "args", kind: "message", T: ListMcpResourcesExecArgs },
32
+ { no: 2, name: "result", kind: "message", T: ListMcpResourcesExecResult },
33
+ ]);
34
+
35
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesToolCall {
36
+ return new ListMcpResourcesToolCall().fromBinary(bytes, options);
37
+ }
38
+
39
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesToolCall {
40
+ return new ListMcpResourcesToolCall().fromJson(jsonValue, options);
41
+ }
42
+
43
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesToolCall {
44
+ return new ListMcpResourcesToolCall().fromJsonString(jsonString, options);
45
+ }
46
+
47
+ static equals(a: ListMcpResourcesToolCall | PlainMessage<ListMcpResourcesToolCall> | undefined, b: ListMcpResourcesToolCall | PlainMessage<ListMcpResourcesToolCall> | undefined): boolean {
48
+ return proto3.util.equals(ListMcpResourcesToolCall, a, b);
49
+ }
50
+ }
51
+
52
+ /**
53
+ * @generated from message agent.v1.ReadMcpResourceToolCall
54
+ */
55
+ export class ReadMcpResourceToolCall extends Message<ReadMcpResourceToolCall> {
56
+ /**
57
+ * @generated from field: agent.v1.ReadMcpResourceExecArgs args = 1;
58
+ */
59
+ args?: ReadMcpResourceExecArgs;
60
+
61
+ /**
62
+ * @generated from field: agent.v1.ReadMcpResourceExecResult result = 2;
63
+ */
64
+ result?: ReadMcpResourceExecResult;
65
+
66
+ constructor(data?: PartialMessage<ReadMcpResourceToolCall>) {
67
+ super();
68
+ proto3.util.initPartial(data, this);
69
+ }
70
+
71
+ static readonly runtime: typeof proto3 = proto3;
72
+ static readonly typeName = "agent.v1.ReadMcpResourceToolCall";
73
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
74
+ { no: 1, name: "args", kind: "message", T: ReadMcpResourceExecArgs },
75
+ { no: 2, name: "result", kind: "message", T: ReadMcpResourceExecResult },
76
+ ]);
77
+
78
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceToolCall {
79
+ return new ReadMcpResourceToolCall().fromBinary(bytes, options);
80
+ }
81
+
82
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceToolCall {
83
+ return new ReadMcpResourceToolCall().fromJson(jsonValue, options);
84
+ }
85
+
86
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceToolCall {
87
+ return new ReadMcpResourceToolCall().fromJsonString(jsonString, options);
88
+ }
89
+
90
+ static equals(a: ReadMcpResourceToolCall | PlainMessage<ReadMcpResourceToolCall> | undefined, b: ReadMcpResourceToolCall | PlainMessage<ReadMcpResourceToolCall> | undefined): boolean {
91
+ return proto3.util.equals(ReadMcpResourceToolCall, a, b);
92
+ }
93
+ }
94
+
95
+ /**
96
+ * @generated from message agent.v1.ListMcpResourcesExecArgs
97
+ */
98
+ export class ListMcpResourcesExecArgs extends Message<ListMcpResourcesExecArgs> {
99
+ /**
100
+ * @generated from field: optional string server = 1;
101
+ */
102
+ server?: string;
103
+
104
+ constructor(data?: PartialMessage<ListMcpResourcesExecArgs>) {
105
+ super();
106
+ proto3.util.initPartial(data, this);
107
+ }
108
+
109
+ static readonly runtime: typeof proto3 = proto3;
110
+ static readonly typeName = "agent.v1.ListMcpResourcesExecArgs";
111
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
112
+ { no: 1, name: "server", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
113
+ ]);
114
+
115
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesExecArgs {
116
+ return new ListMcpResourcesExecArgs().fromBinary(bytes, options);
117
+ }
118
+
119
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesExecArgs {
120
+ return new ListMcpResourcesExecArgs().fromJson(jsonValue, options);
121
+ }
122
+
123
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesExecArgs {
124
+ return new ListMcpResourcesExecArgs().fromJsonString(jsonString, options);
125
+ }
126
+
127
+ static equals(a: ListMcpResourcesExecArgs | PlainMessage<ListMcpResourcesExecArgs> | undefined, b: ListMcpResourcesExecArgs | PlainMessage<ListMcpResourcesExecArgs> | undefined): boolean {
128
+ return proto3.util.equals(ListMcpResourcesExecArgs, a, b);
129
+ }
130
+ }
131
+
132
+ /**
133
+ * @generated from message agent.v1.ListMcpResourcesExecResult
134
+ */
135
+ export class ListMcpResourcesExecResult extends Message<ListMcpResourcesExecResult> {
136
+ /**
137
+ * @generated from oneof agent.v1.ListMcpResourcesExecResult.result
138
+ */
139
+ result: {
140
+ /**
141
+ * @generated from field: agent.v1.ListMcpResourcesSuccess success = 1;
142
+ */
143
+ value: ListMcpResourcesSuccess;
144
+ case: "success";
145
+ } | {
146
+ /**
147
+ * @generated from field: agent.v1.ListMcpResourcesError error = 2;
148
+ */
149
+ value: ListMcpResourcesError;
150
+ case: "error";
151
+ } | {
152
+ /**
153
+ * @generated from field: agent.v1.ListMcpResourcesRejected rejected = 3;
154
+ */
155
+ value: ListMcpResourcesRejected;
156
+ case: "rejected";
157
+ } | { case: undefined; value?: undefined } = { case: undefined };
158
+
159
+ constructor(data?: PartialMessage<ListMcpResourcesExecResult>) {
160
+ super();
161
+ proto3.util.initPartial(data, this);
162
+ }
163
+
164
+ static readonly runtime: typeof proto3 = proto3;
165
+ static readonly typeName = "agent.v1.ListMcpResourcesExecResult";
166
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
167
+ { no: 1, name: "success", kind: "message", T: ListMcpResourcesSuccess, oneof: "result" },
168
+ { no: 2, name: "error", kind: "message", T: ListMcpResourcesError, oneof: "result" },
169
+ { no: 3, name: "rejected", kind: "message", T: ListMcpResourcesRejected, oneof: "result" },
170
+ ]);
171
+
172
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesExecResult {
173
+ return new ListMcpResourcesExecResult().fromBinary(bytes, options);
174
+ }
175
+
176
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesExecResult {
177
+ return new ListMcpResourcesExecResult().fromJson(jsonValue, options);
178
+ }
179
+
180
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesExecResult {
181
+ return new ListMcpResourcesExecResult().fromJsonString(jsonString, options);
182
+ }
183
+
184
+ static equals(a: ListMcpResourcesExecResult | PlainMessage<ListMcpResourcesExecResult> | undefined, b: ListMcpResourcesExecResult | PlainMessage<ListMcpResourcesExecResult> | undefined): boolean {
185
+ return proto3.util.equals(ListMcpResourcesExecResult, a, b);
186
+ }
187
+ }
188
+
189
+ /**
190
+ * @generated from message agent.v1.ListMcpResourcesExecResult_McpResource
191
+ */
192
+ export class ListMcpResourcesExecResult_McpResource extends Message<ListMcpResourcesExecResult_McpResource> {
193
+ /**
194
+ * @generated from field: string uri = 1;
195
+ */
196
+ uri = "";
197
+
198
+ /**
199
+ * @generated from field: optional string name = 2;
200
+ */
201
+ name?: string;
202
+
203
+ /**
204
+ * @generated from field: optional string description = 3;
205
+ */
206
+ description?: string;
207
+
208
+ /**
209
+ * @generated from field: optional string mime_type = 4;
210
+ */
211
+ mimeType?: string;
212
+
213
+ /**
214
+ * @generated from field: string server = 5;
215
+ */
216
+ server = "";
217
+
218
+ /**
219
+ * @generated from field: map<string, string> annotations = 6;
220
+ */
221
+ annotations: { [key: string]: string } = {};
222
+
223
+ constructor(data?: PartialMessage<ListMcpResourcesExecResult_McpResource>) {
224
+ super();
225
+ proto3.util.initPartial(data, this);
226
+ }
227
+
228
+ static readonly runtime: typeof proto3 = proto3;
229
+ static readonly typeName = "agent.v1.ListMcpResourcesExecResult_McpResource";
230
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
231
+ { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
232
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
233
+ { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
234
+ { no: 4, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
235
+ { no: 5, name: "server", kind: "scalar", T: 9 /* ScalarType.STRING */ },
236
+ { no: 6, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
237
+ ]);
238
+
239
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesExecResult_McpResource {
240
+ return new ListMcpResourcesExecResult_McpResource().fromBinary(bytes, options);
241
+ }
242
+
243
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesExecResult_McpResource {
244
+ return new ListMcpResourcesExecResult_McpResource().fromJson(jsonValue, options);
245
+ }
246
+
247
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesExecResult_McpResource {
248
+ return new ListMcpResourcesExecResult_McpResource().fromJsonString(jsonString, options);
249
+ }
250
+
251
+ static equals(a: ListMcpResourcesExecResult_McpResource | PlainMessage<ListMcpResourcesExecResult_McpResource> | undefined, b: ListMcpResourcesExecResult_McpResource | PlainMessage<ListMcpResourcesExecResult_McpResource> | undefined): boolean {
252
+ return proto3.util.equals(ListMcpResourcesExecResult_McpResource, a, b);
253
+ }
254
+ }
255
+
256
+ /**
257
+ * @generated from message agent.v1.ListMcpResourcesSuccess
258
+ */
259
+ export class ListMcpResourcesSuccess extends Message<ListMcpResourcesSuccess> {
260
+ /**
261
+ * @generated from field: repeated agent.v1.ListMcpResourcesExecResult_McpResource resources = 1;
262
+ */
263
+ resources: ListMcpResourcesExecResult_McpResource[] = [];
264
+
265
+ constructor(data?: PartialMessage<ListMcpResourcesSuccess>) {
266
+ super();
267
+ proto3.util.initPartial(data, this);
268
+ }
269
+
270
+ static readonly runtime: typeof proto3 = proto3;
271
+ static readonly typeName = "agent.v1.ListMcpResourcesSuccess";
272
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
273
+ { no: 1, name: "resources", kind: "message", T: ListMcpResourcesExecResult_McpResource, repeated: true },
274
+ ]);
275
+
276
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesSuccess {
277
+ return new ListMcpResourcesSuccess().fromBinary(bytes, options);
278
+ }
279
+
280
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesSuccess {
281
+ return new ListMcpResourcesSuccess().fromJson(jsonValue, options);
282
+ }
283
+
284
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesSuccess {
285
+ return new ListMcpResourcesSuccess().fromJsonString(jsonString, options);
286
+ }
287
+
288
+ static equals(a: ListMcpResourcesSuccess | PlainMessage<ListMcpResourcesSuccess> | undefined, b: ListMcpResourcesSuccess | PlainMessage<ListMcpResourcesSuccess> | undefined): boolean {
289
+ return proto3.util.equals(ListMcpResourcesSuccess, a, b);
290
+ }
291
+ }
292
+
293
+ /**
294
+ * @generated from message agent.v1.ListMcpResourcesError
295
+ */
296
+ export class ListMcpResourcesError extends Message<ListMcpResourcesError> {
297
+ /**
298
+ * @generated from field: string error = 1;
299
+ */
300
+ error = "";
301
+
302
+ constructor(data?: PartialMessage<ListMcpResourcesError>) {
303
+ super();
304
+ proto3.util.initPartial(data, this);
305
+ }
306
+
307
+ static readonly runtime: typeof proto3 = proto3;
308
+ static readonly typeName = "agent.v1.ListMcpResourcesError";
309
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
310
+ { no: 1, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
311
+ ]);
312
+
313
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesError {
314
+ return new ListMcpResourcesError().fromBinary(bytes, options);
315
+ }
316
+
317
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesError {
318
+ return new ListMcpResourcesError().fromJson(jsonValue, options);
319
+ }
320
+
321
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesError {
322
+ return new ListMcpResourcesError().fromJsonString(jsonString, options);
323
+ }
324
+
325
+ static equals(a: ListMcpResourcesError | PlainMessage<ListMcpResourcesError> | undefined, b: ListMcpResourcesError | PlainMessage<ListMcpResourcesError> | undefined): boolean {
326
+ return proto3.util.equals(ListMcpResourcesError, a, b);
327
+ }
328
+ }
329
+
330
+ /**
331
+ * @generated from message agent.v1.ListMcpResourcesRejected
332
+ */
333
+ export class ListMcpResourcesRejected extends Message<ListMcpResourcesRejected> {
334
+ /**
335
+ * @generated from field: string reason = 1;
336
+ */
337
+ reason = "";
338
+
339
+ constructor(data?: PartialMessage<ListMcpResourcesRejected>) {
340
+ super();
341
+ proto3.util.initPartial(data, this);
342
+ }
343
+
344
+ static readonly runtime: typeof proto3 = proto3;
345
+ static readonly typeName = "agent.v1.ListMcpResourcesRejected";
346
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
347
+ { no: 1, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
348
+ ]);
349
+
350
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ListMcpResourcesRejected {
351
+ return new ListMcpResourcesRejected().fromBinary(bytes, options);
352
+ }
353
+
354
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ListMcpResourcesRejected {
355
+ return new ListMcpResourcesRejected().fromJson(jsonValue, options);
356
+ }
357
+
358
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ListMcpResourcesRejected {
359
+ return new ListMcpResourcesRejected().fromJsonString(jsonString, options);
360
+ }
361
+
362
+ static equals(a: ListMcpResourcesRejected | PlainMessage<ListMcpResourcesRejected> | undefined, b: ListMcpResourcesRejected | PlainMessage<ListMcpResourcesRejected> | undefined): boolean {
363
+ return proto3.util.equals(ListMcpResourcesRejected, a, b);
364
+ }
365
+ }
366
+
367
+ /**
368
+ * @generated from message agent.v1.ReadMcpResourceExecArgs
369
+ */
370
+ export class ReadMcpResourceExecArgs extends Message<ReadMcpResourceExecArgs> {
371
+ /**
372
+ * @generated from field: string server = 1;
373
+ */
374
+ server = "";
375
+
376
+ /**
377
+ * @generated from field: string uri = 2;
378
+ */
379
+ uri = "";
380
+
381
+ /**
382
+ * @generated from field: optional string download_path = 3;
383
+ */
384
+ downloadPath?: string;
385
+
386
+ constructor(data?: PartialMessage<ReadMcpResourceExecArgs>) {
387
+ super();
388
+ proto3.util.initPartial(data, this);
389
+ }
390
+
391
+ static readonly runtime: typeof proto3 = proto3;
392
+ static readonly typeName = "agent.v1.ReadMcpResourceExecArgs";
393
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
394
+ { no: 1, name: "server", kind: "scalar", T: 9 /* ScalarType.STRING */ },
395
+ { no: 2, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
396
+ { no: 3, name: "download_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
397
+ ]);
398
+
399
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceExecArgs {
400
+ return new ReadMcpResourceExecArgs().fromBinary(bytes, options);
401
+ }
402
+
403
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceExecArgs {
404
+ return new ReadMcpResourceExecArgs().fromJson(jsonValue, options);
405
+ }
406
+
407
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceExecArgs {
408
+ return new ReadMcpResourceExecArgs().fromJsonString(jsonString, options);
409
+ }
410
+
411
+ static equals(a: ReadMcpResourceExecArgs | PlainMessage<ReadMcpResourceExecArgs> | undefined, b: ReadMcpResourceExecArgs | PlainMessage<ReadMcpResourceExecArgs> | undefined): boolean {
412
+ return proto3.util.equals(ReadMcpResourceExecArgs, a, b);
413
+ }
414
+ }
415
+
416
+ /**
417
+ * @generated from message agent.v1.ReadMcpResourceExecResult
418
+ */
419
+ export class ReadMcpResourceExecResult extends Message<ReadMcpResourceExecResult> {
420
+ /**
421
+ * @generated from oneof agent.v1.ReadMcpResourceExecResult.result
422
+ */
423
+ result: {
424
+ /**
425
+ * @generated from field: agent.v1.ReadMcpResourceSuccess success = 1;
426
+ */
427
+ value: ReadMcpResourceSuccess;
428
+ case: "success";
429
+ } | {
430
+ /**
431
+ * @generated from field: agent.v1.ReadMcpResourceError error = 2;
432
+ */
433
+ value: ReadMcpResourceError;
434
+ case: "error";
435
+ } | {
436
+ /**
437
+ * @generated from field: agent.v1.ReadMcpResourceRejected rejected = 3;
438
+ */
439
+ value: ReadMcpResourceRejected;
440
+ case: "rejected";
441
+ } | {
442
+ /**
443
+ * @generated from field: agent.v1.ReadMcpResourceNotFound not_found = 4;
444
+ */
445
+ value: ReadMcpResourceNotFound;
446
+ case: "notFound";
447
+ } | { case: undefined; value?: undefined } = { case: undefined };
448
+
449
+ constructor(data?: PartialMessage<ReadMcpResourceExecResult>) {
450
+ super();
451
+ proto3.util.initPartial(data, this);
452
+ }
453
+
454
+ static readonly runtime: typeof proto3 = proto3;
455
+ static readonly typeName = "agent.v1.ReadMcpResourceExecResult";
456
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
457
+ { no: 1, name: "success", kind: "message", T: ReadMcpResourceSuccess, oneof: "result" },
458
+ { no: 2, name: "error", kind: "message", T: ReadMcpResourceError, oneof: "result" },
459
+ { no: 3, name: "rejected", kind: "message", T: ReadMcpResourceRejected, oneof: "result" },
460
+ { no: 4, name: "not_found", kind: "message", T: ReadMcpResourceNotFound, oneof: "result" },
461
+ ]);
462
+
463
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceExecResult {
464
+ return new ReadMcpResourceExecResult().fromBinary(bytes, options);
465
+ }
466
+
467
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceExecResult {
468
+ return new ReadMcpResourceExecResult().fromJson(jsonValue, options);
469
+ }
470
+
471
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceExecResult {
472
+ return new ReadMcpResourceExecResult().fromJsonString(jsonString, options);
473
+ }
474
+
475
+ static equals(a: ReadMcpResourceExecResult | PlainMessage<ReadMcpResourceExecResult> | undefined, b: ReadMcpResourceExecResult | PlainMessage<ReadMcpResourceExecResult> | undefined): boolean {
476
+ return proto3.util.equals(ReadMcpResourceExecResult, a, b);
477
+ }
478
+ }
479
+
480
+ /**
481
+ * @generated from message agent.v1.ReadMcpResourceSuccess
482
+ */
483
+ export class ReadMcpResourceSuccess extends Message<ReadMcpResourceSuccess> {
484
+ /**
485
+ * @generated from field: string uri = 1;
486
+ */
487
+ uri = "";
488
+
489
+ /**
490
+ * @generated from field: optional string name = 2;
491
+ */
492
+ name?: string;
493
+
494
+ /**
495
+ * @generated from field: optional string description = 3;
496
+ */
497
+ description?: string;
498
+
499
+ /**
500
+ * @generated from field: optional string mime_type = 4;
501
+ */
502
+ mimeType?: string;
503
+
504
+ /**
505
+ * @generated from field: map<string, string> annotations = 7;
506
+ */
507
+ annotations: { [key: string]: string } = {};
508
+
509
+ /**
510
+ * @generated from field: optional string download_path = 8;
511
+ */
512
+ downloadPath?: string;
513
+
514
+ /**
515
+ * @generated from oneof agent.v1.ReadMcpResourceSuccess.content
516
+ */
517
+ content: {
518
+ /**
519
+ * @generated from field: string text = 5;
520
+ */
521
+ value: string;
522
+ case: "text";
523
+ } | {
524
+ /**
525
+ * @generated from field: bytes blob = 6;
526
+ */
527
+ value: Uint8Array;
528
+ case: "blob";
529
+ } | { case: undefined; value?: undefined } = { case: undefined };
530
+
531
+ constructor(data?: PartialMessage<ReadMcpResourceSuccess>) {
532
+ super();
533
+ proto3.util.initPartial(data, this);
534
+ }
535
+
536
+ static readonly runtime: typeof proto3 = proto3;
537
+ static readonly typeName = "agent.v1.ReadMcpResourceSuccess";
538
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
539
+ { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
540
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
541
+ { no: 3, name: "description", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
542
+ { no: 4, name: "mime_type", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
543
+ { no: 7, name: "annotations", kind: "map", K: 9 /* ScalarType.STRING */, V: {kind: "scalar", T: 9 /* ScalarType.STRING */} },
544
+ { no: 8, name: "download_path", kind: "scalar", T: 9 /* ScalarType.STRING */, opt: true },
545
+ { no: 5, name: "text", kind: "scalar", T: 9 /* ScalarType.STRING */, oneof: "content" },
546
+ { no: 6, name: "blob", kind: "scalar", T: 12 /* ScalarType.BYTES */, oneof: "content" },
547
+ ]);
548
+
549
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceSuccess {
550
+ return new ReadMcpResourceSuccess().fromBinary(bytes, options);
551
+ }
552
+
553
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceSuccess {
554
+ return new ReadMcpResourceSuccess().fromJson(jsonValue, options);
555
+ }
556
+
557
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceSuccess {
558
+ return new ReadMcpResourceSuccess().fromJsonString(jsonString, options);
559
+ }
560
+
561
+ static equals(a: ReadMcpResourceSuccess | PlainMessage<ReadMcpResourceSuccess> | undefined, b: ReadMcpResourceSuccess | PlainMessage<ReadMcpResourceSuccess> | undefined): boolean {
562
+ return proto3.util.equals(ReadMcpResourceSuccess, a, b);
563
+ }
564
+ }
565
+
566
+ /**
567
+ * @generated from message agent.v1.ReadMcpResourceError
568
+ */
569
+ export class ReadMcpResourceError extends Message<ReadMcpResourceError> {
570
+ /**
571
+ * @generated from field: string uri = 1;
572
+ */
573
+ uri = "";
574
+
575
+ /**
576
+ * @generated from field: string error = 2;
577
+ */
578
+ error = "";
579
+
580
+ constructor(data?: PartialMessage<ReadMcpResourceError>) {
581
+ super();
582
+ proto3.util.initPartial(data, this);
583
+ }
584
+
585
+ static readonly runtime: typeof proto3 = proto3;
586
+ static readonly typeName = "agent.v1.ReadMcpResourceError";
587
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
588
+ { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
589
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
590
+ ]);
591
+
592
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceError {
593
+ return new ReadMcpResourceError().fromBinary(bytes, options);
594
+ }
595
+
596
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceError {
597
+ return new ReadMcpResourceError().fromJson(jsonValue, options);
598
+ }
599
+
600
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceError {
601
+ return new ReadMcpResourceError().fromJsonString(jsonString, options);
602
+ }
603
+
604
+ static equals(a: ReadMcpResourceError | PlainMessage<ReadMcpResourceError> | undefined, b: ReadMcpResourceError | PlainMessage<ReadMcpResourceError> | undefined): boolean {
605
+ return proto3.util.equals(ReadMcpResourceError, a, b);
606
+ }
607
+ }
608
+
609
+ /**
610
+ * @generated from message agent.v1.ReadMcpResourceRejected
611
+ */
612
+ export class ReadMcpResourceRejected extends Message<ReadMcpResourceRejected> {
613
+ /**
614
+ * @generated from field: string uri = 1;
615
+ */
616
+ uri = "";
617
+
618
+ /**
619
+ * @generated from field: string reason = 2;
620
+ */
621
+ reason = "";
622
+
623
+ constructor(data?: PartialMessage<ReadMcpResourceRejected>) {
624
+ super();
625
+ proto3.util.initPartial(data, this);
626
+ }
627
+
628
+ static readonly runtime: typeof proto3 = proto3;
629
+ static readonly typeName = "agent.v1.ReadMcpResourceRejected";
630
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
631
+ { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
632
+ { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
633
+ ]);
634
+
635
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceRejected {
636
+ return new ReadMcpResourceRejected().fromBinary(bytes, options);
637
+ }
638
+
639
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceRejected {
640
+ return new ReadMcpResourceRejected().fromJson(jsonValue, options);
641
+ }
642
+
643
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceRejected {
644
+ return new ReadMcpResourceRejected().fromJsonString(jsonString, options);
645
+ }
646
+
647
+ static equals(a: ReadMcpResourceRejected | PlainMessage<ReadMcpResourceRejected> | undefined, b: ReadMcpResourceRejected | PlainMessage<ReadMcpResourceRejected> | undefined): boolean {
648
+ return proto3.util.equals(ReadMcpResourceRejected, a, b);
649
+ }
650
+ }
651
+
652
+ /**
653
+ * @generated from message agent.v1.ReadMcpResourceNotFound
654
+ */
655
+ export class ReadMcpResourceNotFound extends Message<ReadMcpResourceNotFound> {
656
+ /**
657
+ * @generated from field: string uri = 1;
658
+ */
659
+ uri = "";
660
+
661
+ constructor(data?: PartialMessage<ReadMcpResourceNotFound>) {
662
+ super();
663
+ proto3.util.initPartial(data, this);
664
+ }
665
+
666
+ static readonly runtime: typeof proto3 = proto3;
667
+ static readonly typeName = "agent.v1.ReadMcpResourceNotFound";
668
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
669
+ { no: 1, name: "uri", kind: "scalar", T: 9 /* ScalarType.STRING */ },
670
+ ]);
671
+
672
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): ReadMcpResourceNotFound {
673
+ return new ReadMcpResourceNotFound().fromBinary(bytes, options);
674
+ }
675
+
676
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): ReadMcpResourceNotFound {
677
+ return new ReadMcpResourceNotFound().fromJson(jsonValue, options);
678
+ }
679
+
680
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): ReadMcpResourceNotFound {
681
+ return new ReadMcpResourceNotFound().fromJsonString(jsonString, options);
682
+ }
683
+
684
+ static equals(a: ReadMcpResourceNotFound | PlainMessage<ReadMcpResourceNotFound> | undefined, b: ReadMcpResourceNotFound | PlainMessage<ReadMcpResourceNotFound> | undefined): boolean {
685
+ return proto3.util.equals(ReadMcpResourceNotFound, a, b);
686
+ }
687
+ }
688
+