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,52 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/grep_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
+ import { GrepArgs, GrepResult } from "./grep_exec_pb.js";
9
+
10
+ /**
11
+ * @generated from message agent.v1.GrepToolCall
12
+ */
13
+ export class GrepToolCall extends Message<GrepToolCall> {
14
+ /**
15
+ * @generated from field: agent.v1.GrepArgs args = 1;
16
+ */
17
+ args?: GrepArgs;
18
+
19
+ /**
20
+ * @generated from field: agent.v1.GrepResult result = 2;
21
+ */
22
+ result?: GrepResult;
23
+
24
+ constructor(data?: PartialMessage<GrepToolCall>) {
25
+ super();
26
+ proto3.util.initPartial(data, this);
27
+ }
28
+
29
+ static readonly runtime: typeof proto3 = proto3;
30
+ static readonly typeName = "agent.v1.GrepToolCall";
31
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
32
+ { no: 1, name: "args", kind: "message", T: GrepArgs },
33
+ { no: 2, name: "result", kind: "message", T: GrepResult },
34
+ ]);
35
+
36
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GrepToolCall {
37
+ return new GrepToolCall().fromBinary(bytes, options);
38
+ }
39
+
40
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GrepToolCall {
41
+ return new GrepToolCall().fromJson(jsonValue, options);
42
+ }
43
+
44
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GrepToolCall {
45
+ return new GrepToolCall().fromJsonString(jsonString, options);
46
+ }
47
+
48
+ static equals(a: GrepToolCall | PlainMessage<GrepToolCall> | undefined, b: GrepToolCall | PlainMessage<GrepToolCall> | undefined): boolean {
49
+ return proto3.util.equals(GrepToolCall, a, b);
50
+ }
51
+ }
52
+
@@ -0,0 +1,281 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/kv.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
+ import { Error, SpanContext } from "./utils_pb.js";
9
+
10
+ /**
11
+ * @generated from message agent.v1.GetBlobArgs
12
+ */
13
+ export class GetBlobArgs extends Message<GetBlobArgs> {
14
+ /**
15
+ * @generated from field: bytes blob_id = 1;
16
+ */
17
+ blobId = new Uint8Array(0);
18
+
19
+ constructor(data?: PartialMessage<GetBlobArgs>) {
20
+ super();
21
+ proto3.util.initPartial(data, this);
22
+ }
23
+
24
+ static readonly runtime: typeof proto3 = proto3;
25
+ static readonly typeName = "agent.v1.GetBlobArgs";
26
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
27
+ { no: 1, name: "blob_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
28
+ ]);
29
+
30
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBlobArgs {
31
+ return new GetBlobArgs().fromBinary(bytes, options);
32
+ }
33
+
34
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBlobArgs {
35
+ return new GetBlobArgs().fromJson(jsonValue, options);
36
+ }
37
+
38
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBlobArgs {
39
+ return new GetBlobArgs().fromJsonString(jsonString, options);
40
+ }
41
+
42
+ static equals(a: GetBlobArgs | PlainMessage<GetBlobArgs> | undefined, b: GetBlobArgs | PlainMessage<GetBlobArgs> | undefined): boolean {
43
+ return proto3.util.equals(GetBlobArgs, a, b);
44
+ }
45
+ }
46
+
47
+ /**
48
+ * @generated from message agent.v1.GetBlobResult
49
+ */
50
+ export class GetBlobResult extends Message<GetBlobResult> {
51
+ /**
52
+ * @generated from field: optional bytes blob_data = 1;
53
+ */
54
+ blobData?: Uint8Array;
55
+
56
+ constructor(data?: PartialMessage<GetBlobResult>) {
57
+ super();
58
+ proto3.util.initPartial(data, this);
59
+ }
60
+
61
+ static readonly runtime: typeof proto3 = proto3;
62
+ static readonly typeName = "agent.v1.GetBlobResult";
63
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
64
+ { no: 1, name: "blob_data", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
65
+ ]);
66
+
67
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): GetBlobResult {
68
+ return new GetBlobResult().fromBinary(bytes, options);
69
+ }
70
+
71
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): GetBlobResult {
72
+ return new GetBlobResult().fromJson(jsonValue, options);
73
+ }
74
+
75
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): GetBlobResult {
76
+ return new GetBlobResult().fromJsonString(jsonString, options);
77
+ }
78
+
79
+ static equals(a: GetBlobResult | PlainMessage<GetBlobResult> | undefined, b: GetBlobResult | PlainMessage<GetBlobResult> | undefined): boolean {
80
+ return proto3.util.equals(GetBlobResult, a, b);
81
+ }
82
+ }
83
+
84
+ /**
85
+ * @generated from message agent.v1.SetBlobArgs
86
+ */
87
+ export class SetBlobArgs extends Message<SetBlobArgs> {
88
+ /**
89
+ * @generated from field: bytes blob_id = 1;
90
+ */
91
+ blobId = new Uint8Array(0);
92
+
93
+ /**
94
+ * @generated from field: bytes blob_data = 2;
95
+ */
96
+ blobData = new Uint8Array(0);
97
+
98
+ constructor(data?: PartialMessage<SetBlobArgs>) {
99
+ super();
100
+ proto3.util.initPartial(data, this);
101
+ }
102
+
103
+ static readonly runtime: typeof proto3 = proto3;
104
+ static readonly typeName = "agent.v1.SetBlobArgs";
105
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
106
+ { no: 1, name: "blob_id", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
107
+ { no: 2, name: "blob_data", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
108
+ ]);
109
+
110
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetBlobArgs {
111
+ return new SetBlobArgs().fromBinary(bytes, options);
112
+ }
113
+
114
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetBlobArgs {
115
+ return new SetBlobArgs().fromJson(jsonValue, options);
116
+ }
117
+
118
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetBlobArgs {
119
+ return new SetBlobArgs().fromJsonString(jsonString, options);
120
+ }
121
+
122
+ static equals(a: SetBlobArgs | PlainMessage<SetBlobArgs> | undefined, b: SetBlobArgs | PlainMessage<SetBlobArgs> | undefined): boolean {
123
+ return proto3.util.equals(SetBlobArgs, a, b);
124
+ }
125
+ }
126
+
127
+ /**
128
+ * @generated from message agent.v1.SetBlobResult
129
+ */
130
+ export class SetBlobResult extends Message<SetBlobResult> {
131
+ /**
132
+ * @generated from field: optional agent.v1.Error error = 1;
133
+ */
134
+ error?: Error;
135
+
136
+ constructor(data?: PartialMessage<SetBlobResult>) {
137
+ super();
138
+ proto3.util.initPartial(data, this);
139
+ }
140
+
141
+ static readonly runtime: typeof proto3 = proto3;
142
+ static readonly typeName = "agent.v1.SetBlobResult";
143
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
144
+ { no: 1, name: "error", kind: "message", T: Error, opt: true },
145
+ ]);
146
+
147
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): SetBlobResult {
148
+ return new SetBlobResult().fromBinary(bytes, options);
149
+ }
150
+
151
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): SetBlobResult {
152
+ return new SetBlobResult().fromJson(jsonValue, options);
153
+ }
154
+
155
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): SetBlobResult {
156
+ return new SetBlobResult().fromJsonString(jsonString, options);
157
+ }
158
+
159
+ static equals(a: SetBlobResult | PlainMessage<SetBlobResult> | undefined, b: SetBlobResult | PlainMessage<SetBlobResult> | undefined): boolean {
160
+ return proto3.util.equals(SetBlobResult, a, b);
161
+ }
162
+ }
163
+
164
+ /**
165
+ * @generated from message agent.v1.KvServerMessage
166
+ */
167
+ export class KvServerMessage extends Message<KvServerMessage> {
168
+ /**
169
+ * @generated from field: uint32 id = 1;
170
+ */
171
+ id = 0;
172
+
173
+ /**
174
+ * @generated from field: optional agent.v1.SpanContext span_context = 4;
175
+ */
176
+ spanContext?: SpanContext;
177
+
178
+ /**
179
+ * @generated from oneof agent.v1.KvServerMessage.message
180
+ */
181
+ message: {
182
+ /**
183
+ * @generated from field: agent.v1.GetBlobArgs get_blob_args = 2;
184
+ */
185
+ value: GetBlobArgs;
186
+ case: "getBlobArgs";
187
+ } | {
188
+ /**
189
+ * @generated from field: agent.v1.SetBlobArgs set_blob_args = 3;
190
+ */
191
+ value: SetBlobArgs;
192
+ case: "setBlobArgs";
193
+ } | { case: undefined; value?: undefined } = { case: undefined };
194
+
195
+ constructor(data?: PartialMessage<KvServerMessage>) {
196
+ super();
197
+ proto3.util.initPartial(data, this);
198
+ }
199
+
200
+ static readonly runtime: typeof proto3 = proto3;
201
+ static readonly typeName = "agent.v1.KvServerMessage";
202
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
203
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
204
+ { no: 4, name: "span_context", kind: "message", T: SpanContext, opt: true },
205
+ { no: 2, name: "get_blob_args", kind: "message", T: GetBlobArgs, oneof: "message" },
206
+ { no: 3, name: "set_blob_args", kind: "message", T: SetBlobArgs, oneof: "message" },
207
+ ]);
208
+
209
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): KvServerMessage {
210
+ return new KvServerMessage().fromBinary(bytes, options);
211
+ }
212
+
213
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): KvServerMessage {
214
+ return new KvServerMessage().fromJson(jsonValue, options);
215
+ }
216
+
217
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): KvServerMessage {
218
+ return new KvServerMessage().fromJsonString(jsonString, options);
219
+ }
220
+
221
+ static equals(a: KvServerMessage | PlainMessage<KvServerMessage> | undefined, b: KvServerMessage | PlainMessage<KvServerMessage> | undefined): boolean {
222
+ return proto3.util.equals(KvServerMessage, a, b);
223
+ }
224
+ }
225
+
226
+ /**
227
+ * @generated from message agent.v1.KvClientMessage
228
+ */
229
+ export class KvClientMessage extends Message<KvClientMessage> {
230
+ /**
231
+ * @generated from field: uint32 id = 1;
232
+ */
233
+ id = 0;
234
+
235
+ /**
236
+ * @generated from oneof agent.v1.KvClientMessage.message
237
+ */
238
+ message: {
239
+ /**
240
+ * @generated from field: agent.v1.GetBlobResult get_blob_result = 2;
241
+ */
242
+ value: GetBlobResult;
243
+ case: "getBlobResult";
244
+ } | {
245
+ /**
246
+ * @generated from field: agent.v1.SetBlobResult set_blob_result = 3;
247
+ */
248
+ value: SetBlobResult;
249
+ case: "setBlobResult";
250
+ } | { case: undefined; value?: undefined } = { case: undefined };
251
+
252
+ constructor(data?: PartialMessage<KvClientMessage>) {
253
+ super();
254
+ proto3.util.initPartial(data, this);
255
+ }
256
+
257
+ static readonly runtime: typeof proto3 = proto3;
258
+ static readonly typeName = "agent.v1.KvClientMessage";
259
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
260
+ { no: 1, name: "id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
261
+ { no: 2, name: "get_blob_result", kind: "message", T: GetBlobResult, oneof: "message" },
262
+ { no: 3, name: "set_blob_result", kind: "message", T: SetBlobResult, oneof: "message" },
263
+ ]);
264
+
265
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): KvClientMessage {
266
+ return new KvClientMessage().fromBinary(bytes, options);
267
+ }
268
+
269
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): KvClientMessage {
270
+ return new KvClientMessage().fromJson(jsonValue, options);
271
+ }
272
+
273
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): KvClientMessage {
274
+ return new KvClientMessage().fromJsonString(jsonString, options);
275
+ }
276
+
277
+ static equals(a: KvClientMessage | PlainMessage<KvClientMessage> | undefined, b: KvClientMessage | PlainMessage<KvClientMessage> | undefined): boolean {
278
+ return proto3.util.equals(KvClientMessage, a, b);
279
+ }
280
+ }
281
+
@@ -0,0 +1,295 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/ls_exec.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
+ import { SandboxPolicy } from "./sandbox_pb.js";
9
+ import { LsDirectoryTreeNode } from "./selected_context_pb.js";
10
+
11
+ /**
12
+ * @generated from message agent.v1.LsArgs
13
+ */
14
+ export class LsArgs extends Message<LsArgs> {
15
+ /**
16
+ * @generated from field: string path = 1;
17
+ */
18
+ path = "";
19
+
20
+ /**
21
+ * @generated from field: repeated string ignore = 2;
22
+ */
23
+ ignore: string[] = [];
24
+
25
+ /**
26
+ * @generated from field: string tool_call_id = 3;
27
+ */
28
+ toolCallId = "";
29
+
30
+ /**
31
+ * @generated from field: optional agent.v1.SandboxPolicy sandbox_policy = 4;
32
+ */
33
+ sandboxPolicy?: SandboxPolicy;
34
+
35
+ /**
36
+ * @generated from field: optional uint32 timeout_ms = 5;
37
+ */
38
+ timeoutMs?: number;
39
+
40
+ constructor(data?: PartialMessage<LsArgs>) {
41
+ super();
42
+ proto3.util.initPartial(data, this);
43
+ }
44
+
45
+ static readonly runtime: typeof proto3 = proto3;
46
+ static readonly typeName = "agent.v1.LsArgs";
47
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
48
+ { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
49
+ { no: 2, name: "ignore", kind: "scalar", T: 9 /* ScalarType.STRING */, repeated: true },
50
+ { no: 3, name: "tool_call_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
51
+ { no: 4, name: "sandbox_policy", kind: "message", T: SandboxPolicy, opt: true },
52
+ { no: 5, name: "timeout_ms", kind: "scalar", T: 13 /* ScalarType.UINT32 */, opt: true },
53
+ ]);
54
+
55
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsArgs {
56
+ return new LsArgs().fromBinary(bytes, options);
57
+ }
58
+
59
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsArgs {
60
+ return new LsArgs().fromJson(jsonValue, options);
61
+ }
62
+
63
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsArgs {
64
+ return new LsArgs().fromJsonString(jsonString, options);
65
+ }
66
+
67
+ static equals(a: LsArgs | PlainMessage<LsArgs> | undefined, b: LsArgs | PlainMessage<LsArgs> | undefined): boolean {
68
+ return proto3.util.equals(LsArgs, a, b);
69
+ }
70
+ }
71
+
72
+ /**
73
+ * @generated from message agent.v1.LsResult
74
+ */
75
+ export class LsResult extends Message<LsResult> {
76
+ /**
77
+ * @generated from oneof agent.v1.LsResult.result
78
+ */
79
+ result: {
80
+ /**
81
+ * @generated from field: agent.v1.LsSuccess success = 1;
82
+ */
83
+ value: LsSuccess;
84
+ case: "success";
85
+ } | {
86
+ /**
87
+ * @generated from field: agent.v1.LsError error = 2;
88
+ */
89
+ value: LsError;
90
+ case: "error";
91
+ } | {
92
+ /**
93
+ * @generated from field: agent.v1.LsRejected rejected = 3;
94
+ */
95
+ value: LsRejected;
96
+ case: "rejected";
97
+ } | {
98
+ /**
99
+ * @generated from field: agent.v1.LsTimeout timeout = 4;
100
+ */
101
+ value: LsTimeout;
102
+ case: "timeout";
103
+ } | { case: undefined; value?: undefined } = { case: undefined };
104
+
105
+ constructor(data?: PartialMessage<LsResult>) {
106
+ super();
107
+ proto3.util.initPartial(data, this);
108
+ }
109
+
110
+ static readonly runtime: typeof proto3 = proto3;
111
+ static readonly typeName = "agent.v1.LsResult";
112
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
113
+ { no: 1, name: "success", kind: "message", T: LsSuccess, oneof: "result" },
114
+ { no: 2, name: "error", kind: "message", T: LsError, oneof: "result" },
115
+ { no: 3, name: "rejected", kind: "message", T: LsRejected, oneof: "result" },
116
+ { no: 4, name: "timeout", kind: "message", T: LsTimeout, oneof: "result" },
117
+ ]);
118
+
119
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsResult {
120
+ return new LsResult().fromBinary(bytes, options);
121
+ }
122
+
123
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsResult {
124
+ return new LsResult().fromJson(jsonValue, options);
125
+ }
126
+
127
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsResult {
128
+ return new LsResult().fromJsonString(jsonString, options);
129
+ }
130
+
131
+ static equals(a: LsResult | PlainMessage<LsResult> | undefined, b: LsResult | PlainMessage<LsResult> | undefined): boolean {
132
+ return proto3.util.equals(LsResult, a, b);
133
+ }
134
+ }
135
+
136
+ /**
137
+ * @generated from message agent.v1.LsSuccess
138
+ */
139
+ export class LsSuccess extends Message<LsSuccess> {
140
+ /**
141
+ * @generated from field: agent.v1.LsDirectoryTreeNode directory_tree_root = 1;
142
+ */
143
+ directoryTreeRoot?: LsDirectoryTreeNode;
144
+
145
+ constructor(data?: PartialMessage<LsSuccess>) {
146
+ super();
147
+ proto3.util.initPartial(data, this);
148
+ }
149
+
150
+ static readonly runtime: typeof proto3 = proto3;
151
+ static readonly typeName = "agent.v1.LsSuccess";
152
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
153
+ { no: 1, name: "directory_tree_root", kind: "message", T: LsDirectoryTreeNode },
154
+ ]);
155
+
156
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsSuccess {
157
+ return new LsSuccess().fromBinary(bytes, options);
158
+ }
159
+
160
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsSuccess {
161
+ return new LsSuccess().fromJson(jsonValue, options);
162
+ }
163
+
164
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsSuccess {
165
+ return new LsSuccess().fromJsonString(jsonString, options);
166
+ }
167
+
168
+ static equals(a: LsSuccess | PlainMessage<LsSuccess> | undefined, b: LsSuccess | PlainMessage<LsSuccess> | undefined): boolean {
169
+ return proto3.util.equals(LsSuccess, a, b);
170
+ }
171
+ }
172
+
173
+ /**
174
+ * @generated from message agent.v1.LsError
175
+ */
176
+ export class LsError extends Message<LsError> {
177
+ /**
178
+ * @generated from field: string path = 1;
179
+ */
180
+ path = "";
181
+
182
+ /**
183
+ * @generated from field: string error = 2;
184
+ */
185
+ error = "";
186
+
187
+ constructor(data?: PartialMessage<LsError>) {
188
+ super();
189
+ proto3.util.initPartial(data, this);
190
+ }
191
+
192
+ static readonly runtime: typeof proto3 = proto3;
193
+ static readonly typeName = "agent.v1.LsError";
194
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
195
+ { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
196
+ { no: 2, name: "error", kind: "scalar", T: 9 /* ScalarType.STRING */ },
197
+ ]);
198
+
199
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsError {
200
+ return new LsError().fromBinary(bytes, options);
201
+ }
202
+
203
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsError {
204
+ return new LsError().fromJson(jsonValue, options);
205
+ }
206
+
207
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsError {
208
+ return new LsError().fromJsonString(jsonString, options);
209
+ }
210
+
211
+ static equals(a: LsError | PlainMessage<LsError> | undefined, b: LsError | PlainMessage<LsError> | undefined): boolean {
212
+ return proto3.util.equals(LsError, a, b);
213
+ }
214
+ }
215
+
216
+ /**
217
+ * @generated from message agent.v1.LsRejected
218
+ */
219
+ export class LsRejected extends Message<LsRejected> {
220
+ /**
221
+ * @generated from field: string path = 1;
222
+ */
223
+ path = "";
224
+
225
+ /**
226
+ * @generated from field: string reason = 2;
227
+ */
228
+ reason = "";
229
+
230
+ constructor(data?: PartialMessage<LsRejected>) {
231
+ super();
232
+ proto3.util.initPartial(data, this);
233
+ }
234
+
235
+ static readonly runtime: typeof proto3 = proto3;
236
+ static readonly typeName = "agent.v1.LsRejected";
237
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
238
+ { no: 1, name: "path", kind: "scalar", T: 9 /* ScalarType.STRING */ },
239
+ { no: 2, name: "reason", kind: "scalar", T: 9 /* ScalarType.STRING */ },
240
+ ]);
241
+
242
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsRejected {
243
+ return new LsRejected().fromBinary(bytes, options);
244
+ }
245
+
246
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsRejected {
247
+ return new LsRejected().fromJson(jsonValue, options);
248
+ }
249
+
250
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsRejected {
251
+ return new LsRejected().fromJsonString(jsonString, options);
252
+ }
253
+
254
+ static equals(a: LsRejected | PlainMessage<LsRejected> | undefined, b: LsRejected | PlainMessage<LsRejected> | undefined): boolean {
255
+ return proto3.util.equals(LsRejected, a, b);
256
+ }
257
+ }
258
+
259
+ /**
260
+ * @generated from message agent.v1.LsTimeout
261
+ */
262
+ export class LsTimeout extends Message<LsTimeout> {
263
+ /**
264
+ * @generated from field: agent.v1.LsDirectoryTreeNode directory_tree_root = 1;
265
+ */
266
+ directoryTreeRoot?: LsDirectoryTreeNode;
267
+
268
+ constructor(data?: PartialMessage<LsTimeout>) {
269
+ super();
270
+ proto3.util.initPartial(data, this);
271
+ }
272
+
273
+ static readonly runtime: typeof proto3 = proto3;
274
+ static readonly typeName = "agent.v1.LsTimeout";
275
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
276
+ { no: 1, name: "directory_tree_root", kind: "message", T: LsDirectoryTreeNode },
277
+ ]);
278
+
279
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsTimeout {
280
+ return new LsTimeout().fromBinary(bytes, options);
281
+ }
282
+
283
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsTimeout {
284
+ return new LsTimeout().fromJson(jsonValue, options);
285
+ }
286
+
287
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsTimeout {
288
+ return new LsTimeout().fromJsonString(jsonString, options);
289
+ }
290
+
291
+ static equals(a: LsTimeout | PlainMessage<LsTimeout> | undefined, b: LsTimeout | PlainMessage<LsTimeout> | undefined): boolean {
292
+ return proto3.util.equals(LsTimeout, a, b);
293
+ }
294
+ }
295
+
@@ -0,0 +1,52 @@
1
+ // @generated by protoc-gen-es v1.10.0 with parameter "target=ts"
2
+ // @generated from file agent/v1/ls_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
+ import { LsArgs, LsResult } from "./ls_exec_pb.js";
9
+
10
+ /**
11
+ * @generated from message agent.v1.LsToolCall
12
+ */
13
+ export class LsToolCall extends Message<LsToolCall> {
14
+ /**
15
+ * @generated from field: agent.v1.LsArgs args = 1;
16
+ */
17
+ args?: LsArgs;
18
+
19
+ /**
20
+ * @generated from field: agent.v1.LsResult result = 2;
21
+ */
22
+ result?: LsResult;
23
+
24
+ constructor(data?: PartialMessage<LsToolCall>) {
25
+ super();
26
+ proto3.util.initPartial(data, this);
27
+ }
28
+
29
+ static readonly runtime: typeof proto3 = proto3;
30
+ static readonly typeName = "agent.v1.LsToolCall";
31
+ static readonly fields: FieldList = proto3.util.newFieldList(() => [
32
+ { no: 1, name: "args", kind: "message", T: LsArgs },
33
+ { no: 2, name: "result", kind: "message", T: LsResult },
34
+ ]);
35
+
36
+ static fromBinary(bytes: Uint8Array, options?: Partial<BinaryReadOptions>): LsToolCall {
37
+ return new LsToolCall().fromBinary(bytes, options);
38
+ }
39
+
40
+ static fromJson(jsonValue: JsonValue, options?: Partial<JsonReadOptions>): LsToolCall {
41
+ return new LsToolCall().fromJson(jsonValue, options);
42
+ }
43
+
44
+ static fromJsonString(jsonString: string, options?: Partial<JsonReadOptions>): LsToolCall {
45
+ return new LsToolCall().fromJsonString(jsonString, options);
46
+ }
47
+
48
+ static equals(a: LsToolCall | PlainMessage<LsToolCall> | undefined, b: LsToolCall | PlainMessage<LsToolCall> | undefined): boolean {
49
+ return proto3.util.equals(LsToolCall, a, b);
50
+ }
51
+ }
52
+