human-to-code 0.1.12 → 0.1.13

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.
@@ -0,0 +1,348 @@
1
+ /** Project-confined tool runtime for the interactive agent engine. */
2
+ export interface AgentDiffLine {
3
+ kind: "context" | "add" | "remove";
4
+ text: string;
5
+ }
6
+ export type AgentToolActivity = {
7
+ kind: "output";
8
+ name: string;
9
+ text: string;
10
+ } | {
11
+ kind: "diff";
12
+ path: string;
13
+ lines: AgentDiffLine[];
14
+ };
15
+ export interface AgentToolRuntimeOptions {
16
+ root: string;
17
+ onActivity?: (event: AgentToolActivity) => void;
18
+ }
19
+ export declare class AgentToolRuntime {
20
+ #private;
21
+ readonly root: string;
22
+ constructor(options: AgentToolRuntimeOptions);
23
+ ls(input: Record<string, unknown>): Promise<string>;
24
+ read(input: Record<string, unknown>): Promise<string>;
25
+ write(input: Record<string, unknown>): Promise<string>;
26
+ edit(input: Record<string, unknown>): Promise<string>;
27
+ multiEdit(input: Record<string, unknown>): Promise<string>;
28
+ glob(input: Record<string, unknown>): Promise<string>;
29
+ grep(input: Record<string, unknown>): Promise<string>;
30
+ notebookEdit(input: Record<string, unknown>): Promise<string>;
31
+ bash(input: Record<string, unknown>): Promise<string>;
32
+ bashOutput(input: Record<string, unknown>): string;
33
+ killBash(input: Record<string, unknown>): string;
34
+ webFetch(input: Record<string, unknown>): Promise<string>;
35
+ webSearch(input: Record<string, unknown>): Promise<string>;
36
+ cleanup(): Promise<void>;
37
+ }
38
+ export declare const AGENT_TOOL_SCHEMAS: {
39
+ readonly Task: {
40
+ readonly type: "object";
41
+ readonly properties: {
42
+ readonly description: {
43
+ readonly type: "string";
44
+ };
45
+ readonly prompt: {
46
+ readonly type: "string";
47
+ };
48
+ readonly subagent_type: {
49
+ readonly type: "string";
50
+ readonly enum: readonly ["general-purpose", "implementer", "reviewer"];
51
+ };
52
+ };
53
+ readonly required: readonly ["description", "prompt", "subagent_type"];
54
+ readonly additionalProperties: false;
55
+ };
56
+ readonly Bash: {
57
+ readonly type: "object";
58
+ readonly properties: {
59
+ readonly command: {
60
+ readonly type: "string";
61
+ };
62
+ readonly timeout: {
63
+ readonly type: "number";
64
+ };
65
+ readonly description: {
66
+ readonly type: "string";
67
+ };
68
+ readonly run_in_background: {
69
+ readonly type: "boolean";
70
+ };
71
+ };
72
+ readonly required: readonly ["command"];
73
+ readonly additionalProperties: false;
74
+ };
75
+ readonly Glob: {
76
+ readonly type: "object";
77
+ readonly properties: {
78
+ readonly pattern: {
79
+ readonly type: "string";
80
+ };
81
+ readonly path: {
82
+ readonly type: "string";
83
+ };
84
+ };
85
+ readonly required: readonly ["pattern"];
86
+ readonly additionalProperties: false;
87
+ };
88
+ readonly Grep: {
89
+ readonly type: "object";
90
+ readonly properties: {
91
+ readonly pattern: {
92
+ readonly type: "string";
93
+ };
94
+ readonly path: {
95
+ readonly type: "string";
96
+ };
97
+ readonly glob: {
98
+ readonly type: "string";
99
+ };
100
+ readonly output_mode: {
101
+ readonly type: "string";
102
+ readonly enum: readonly ["content", "files_with_matches", "count"];
103
+ };
104
+ readonly "-B": {
105
+ readonly type: "number";
106
+ };
107
+ readonly "-A": {
108
+ readonly type: "number";
109
+ };
110
+ readonly "-C": {
111
+ readonly type: "number";
112
+ };
113
+ readonly "-n": {
114
+ readonly type: "boolean";
115
+ };
116
+ readonly "-i": {
117
+ readonly type: "boolean";
118
+ };
119
+ readonly type: {
120
+ readonly type: "string";
121
+ };
122
+ readonly head_limit: {
123
+ readonly type: "number";
124
+ };
125
+ readonly multiline: {
126
+ readonly type: "boolean";
127
+ };
128
+ };
129
+ readonly required: readonly ["pattern"];
130
+ readonly additionalProperties: false;
131
+ };
132
+ readonly LS: {
133
+ readonly type: "object";
134
+ readonly properties: {
135
+ readonly path: {
136
+ readonly type: "string";
137
+ };
138
+ readonly ignore: {
139
+ readonly type: "array";
140
+ readonly items: {
141
+ readonly type: "string";
142
+ };
143
+ };
144
+ };
145
+ readonly required: readonly ["path"];
146
+ readonly additionalProperties: false;
147
+ };
148
+ readonly ExitPlanMode: {
149
+ readonly type: "object";
150
+ readonly properties: {
151
+ readonly plan: {
152
+ readonly type: "string";
153
+ };
154
+ };
155
+ readonly required: readonly ["plan"];
156
+ readonly additionalProperties: false;
157
+ };
158
+ readonly Read: {
159
+ readonly type: "object";
160
+ readonly properties: {
161
+ readonly file_path: {
162
+ readonly type: "string";
163
+ };
164
+ readonly offset: {
165
+ readonly type: "number";
166
+ };
167
+ readonly limit: {
168
+ readonly type: "number";
169
+ };
170
+ };
171
+ readonly required: readonly ["file_path"];
172
+ readonly additionalProperties: false;
173
+ };
174
+ readonly Edit: {
175
+ readonly type: "object";
176
+ readonly properties: {
177
+ readonly file_path: {
178
+ readonly type: "string";
179
+ };
180
+ readonly old_string: {
181
+ readonly type: "string";
182
+ };
183
+ readonly new_string: {
184
+ readonly type: "string";
185
+ };
186
+ readonly replace_all: {
187
+ readonly type: "boolean";
188
+ };
189
+ };
190
+ readonly required: readonly ["file_path", "old_string", "new_string"];
191
+ readonly additionalProperties: false;
192
+ };
193
+ readonly MultiEdit: {
194
+ readonly type: "object";
195
+ readonly properties: {
196
+ readonly file_path: {
197
+ readonly type: "string";
198
+ };
199
+ readonly edits: {
200
+ readonly type: "array";
201
+ readonly minItems: 1;
202
+ readonly items: {
203
+ readonly type: "object";
204
+ readonly properties: {
205
+ readonly old_string: {
206
+ readonly type: "string";
207
+ };
208
+ readonly new_string: {
209
+ readonly type: "string";
210
+ };
211
+ readonly replace_all: {
212
+ readonly type: "boolean";
213
+ };
214
+ };
215
+ readonly required: readonly ["old_string", "new_string"];
216
+ readonly additionalProperties: false;
217
+ };
218
+ };
219
+ };
220
+ readonly required: readonly ["file_path", "edits"];
221
+ readonly additionalProperties: false;
222
+ };
223
+ readonly Write: {
224
+ readonly type: "object";
225
+ readonly properties: {
226
+ readonly file_path: {
227
+ readonly type: "string";
228
+ };
229
+ readonly content: {
230
+ readonly type: "string";
231
+ };
232
+ };
233
+ readonly required: readonly ["file_path", "content"];
234
+ readonly additionalProperties: false;
235
+ };
236
+ readonly NotebookEdit: {
237
+ readonly type: "object";
238
+ readonly properties: {
239
+ readonly notebook_path: {
240
+ readonly type: "string";
241
+ };
242
+ readonly cell_id: {
243
+ readonly type: "string";
244
+ };
245
+ readonly new_source: {
246
+ readonly type: "string";
247
+ };
248
+ readonly cell_type: {
249
+ readonly type: "string";
250
+ readonly enum: readonly ["code", "markdown"];
251
+ };
252
+ readonly edit_mode: {
253
+ readonly type: "string";
254
+ readonly enum: readonly ["replace", "insert", "delete"];
255
+ };
256
+ };
257
+ readonly required: readonly ["notebook_path", "new_source"];
258
+ readonly additionalProperties: false;
259
+ };
260
+ readonly WebFetch: {
261
+ readonly type: "object";
262
+ readonly properties: {
263
+ readonly url: {
264
+ readonly type: "string";
265
+ readonly format: "uri";
266
+ };
267
+ readonly prompt: {
268
+ readonly type: "string";
269
+ };
270
+ };
271
+ readonly required: readonly ["url", "prompt"];
272
+ readonly additionalProperties: false;
273
+ };
274
+ readonly TodoWrite: {
275
+ readonly type: "object";
276
+ readonly properties: {
277
+ readonly todos: {
278
+ readonly type: "array";
279
+ readonly items: {
280
+ readonly type: "object";
281
+ readonly properties: {
282
+ readonly content: {
283
+ readonly type: "string";
284
+ };
285
+ readonly status: {
286
+ readonly type: "string";
287
+ readonly enum: readonly ["pending", "in_progress", "completed"];
288
+ };
289
+ readonly id: {
290
+ readonly type: "string";
291
+ };
292
+ };
293
+ readonly required: readonly ["content", "status", "id"];
294
+ readonly additionalProperties: false;
295
+ };
296
+ };
297
+ };
298
+ readonly required: readonly ["todos"];
299
+ readonly additionalProperties: false;
300
+ };
301
+ readonly WebSearch: {
302
+ readonly type: "object";
303
+ readonly properties: {
304
+ readonly query: {
305
+ readonly type: "string";
306
+ readonly minLength: 2;
307
+ };
308
+ readonly allowed_domains: {
309
+ readonly type: "array";
310
+ readonly items: {
311
+ readonly type: "string";
312
+ };
313
+ };
314
+ readonly blocked_domains: {
315
+ readonly type: "array";
316
+ readonly items: {
317
+ readonly type: "string";
318
+ };
319
+ };
320
+ };
321
+ readonly required: readonly ["query"];
322
+ readonly additionalProperties: false;
323
+ };
324
+ readonly BashOutput: {
325
+ readonly type: "object";
326
+ readonly properties: {
327
+ readonly bash_id: {
328
+ readonly type: "string";
329
+ };
330
+ readonly filter: {
331
+ readonly type: "string";
332
+ };
333
+ };
334
+ readonly required: readonly ["bash_id"];
335
+ readonly additionalProperties: false;
336
+ };
337
+ readonly KillBash: {
338
+ readonly type: "object";
339
+ readonly properties: {
340
+ readonly shell_id: {
341
+ readonly type: "string";
342
+ };
343
+ };
344
+ readonly required: readonly ["shell_id"];
345
+ readonly additionalProperties: false;
346
+ };
347
+ };
348
+ //# sourceMappingURL=agent-tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-tools.d.ts","sourceRoot":"","sources":["../../src/pipeline/agent-tools.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAoBtE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;IACnC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,iBAAiB,GACzB;IAAE,IAAI,EAAE,QAAQ,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAC9C;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,CAAC;AAE3D,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;CACjD;AAgKD,qBAAa,gBAAgB;;IAC3B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;gBAKV,OAAO,EAAE,uBAAuB;IA4CtC,EAAE,CAAC,KAAK,EA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