thoth-agents 0.11.0 → 0.13.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 (95) hide show
  1. package/README.md +16 -5
  2. package/dist/agents/agent-config.d.ts +13 -0
  3. package/dist/agents/index.d.ts +1 -1
  4. package/dist/agents/orchestrator.d.ts +1 -1
  5. package/dist/{chunk-I5TXGNSG.js → chunk-5MYXVRZZ.js} +634 -366
  6. package/dist/chunk-6O4GKDS7.js +207 -0
  7. package/dist/{chunk-RWQPMWEM.js → chunk-JLU3FSBT.js} +17 -2
  8. package/dist/chunk-MIDGZE34.js +107 -0
  9. package/dist/{chunk-HACUJFKI.js → chunk-NOLDFT7O.js} +4 -230
  10. package/dist/{chunk-5WPP6IY7.js → chunk-VVYAQTYE.js} +2 -2
  11. package/dist/{chunk-DNPKVFOB.js → chunk-YCWGTDFE.js} +604 -315
  12. package/dist/cli/config-io.d.ts +2 -2
  13. package/dist/cli/index.js +94 -41
  14. package/dist/cli/install.d.ts +1 -0
  15. package/dist/cli/opencode-profiles.d.ts +10 -0
  16. package/dist/cli/opencode-skill-consent.d.ts +5 -0
  17. package/dist/cli/operations/opencode.d.ts +2 -1
  18. package/dist/cli/operations/types.d.ts +1 -0
  19. package/dist/cli/owned-skills.d.ts +16 -0
  20. package/dist/cli/paths.d.ts +1 -1
  21. package/dist/cli/providers.d.ts +1 -1
  22. package/dist/cli/system.d.ts +3 -1
  23. package/dist/cli/thoth-mem-install.d.ts +10 -10
  24. package/dist/cli/tui/index.js +53 -5
  25. package/dist/cli/tui/operations.d.ts +2 -0
  26. package/dist/cli/types.d.ts +2 -4
  27. package/dist/config/loader.d.ts +2 -5
  28. package/dist/config/schema.d.ts +0 -53
  29. package/dist/harness/adapters/opencode.d.ts +1 -1
  30. package/dist/hooks/delegate-task-retry/hook.d.ts +8 -8
  31. package/dist/hooks/foreground-fallback/index.d.ts +14 -69
  32. package/dist/hooks/index.d.ts +0 -2
  33. package/dist/hooks/json-error-recovery/hook.d.ts +2 -15
  34. package/dist/hooks/oracle-gate-verdict/hook.d.ts +4 -11
  35. package/dist/index.d.ts +7 -4
  36. package/dist/index.js +1603 -1408
  37. package/dist/opencode/agents.d.ts +3 -0
  38. package/dist/opencode/command.d.ts +3 -0
  39. package/dist/opencode/context.d.ts +36 -0
  40. package/dist/opencode/delegation-hooks.d.ts +3 -0
  41. package/dist/opencode/mcp.d.ts +3 -0
  42. package/dist/opencode/permission-rules.d.ts +9 -0
  43. package/dist/opencode/permissions.d.ts +3 -0
  44. package/dist/opencode/profile-rpc-handlers.d.ts +3 -0
  45. package/dist/opencode/profile-rpc.d.ts +688 -0
  46. package/dist/opencode/profile-runtime.d.ts +3 -0
  47. package/dist/opencode/profile-sessions.d.ts +18 -0
  48. package/dist/opencode/profiles/editor.d.ts +44 -0
  49. package/dist/opencode/profiles/index.d.ts +18 -0
  50. package/dist/opencode/profiles/resolver.d.ts +12 -0
  51. package/dist/opencode/profiles/store.d.ts +63 -0
  52. package/dist/opencode/profiles/types.d.ts +26 -0
  53. package/dist/opencode/session-hooks.d.ts +3 -0
  54. package/dist/opencode/session-state.d.ts +39 -0
  55. package/dist/opencode/skills.d.ts +3 -0
  56. package/dist/opencode/tool-overrides/evaluator.d.ts +13 -0
  57. package/dist/opencode/tool-overrides/index.d.ts +5 -0
  58. package/dist/opencode/tool-overrides/store.d.ts +38 -0
  59. package/dist/opencode/tool-overrides/types.d.ts +32 -0
  60. package/dist/opencode/tool-overrides/validation.d.ts +5 -0
  61. package/dist/opencode/tool-overrides/wildcard.d.ts +3 -0
  62. package/dist/opencode/tool-rpc-handlers.d.ts +3 -0
  63. package/dist/opencode/tool-rpc.d.ts +428 -0
  64. package/dist/opencode/tools.d.ts +3 -0
  65. package/dist/pi.js +3 -3
  66. package/dist/tools/ast-grep/cli.d.ts +1 -0
  67. package/dist/tools/ast-grep/index.d.ts +108 -2
  68. package/dist/tools/ast-grep/tools.d.ts +107 -3
  69. package/dist/tools/define-tool.d.ts +23 -0
  70. package/dist/tools/lsp/tools.d.ts +97 -5
  71. package/dist/tui/fixtures.d.ts +2 -0
  72. package/dist/tui/flow.d.ts +16 -0
  73. package/dist/tui/index.d.ts +7 -0
  74. package/dist/tui/index.js +1384 -0
  75. package/dist/tui/model.d.ts +84 -0
  76. package/dist/tui/tools/fixtures.d.ts +3 -0
  77. package/dist/tui/tools/flow.d.ts +11 -0
  78. package/dist/tui/tools/model.d.ts +97 -0
  79. package/dist/utils/index.d.ts +0 -1
  80. package/package.json +18 -3
  81. package/plugin/.claude-plugin/plugin.json +1 -1
  82. package/plugin/.codex-plugin/plugin.json +1 -1
  83. package/plugin/skills/thoth-sdd/SKILL.md +8 -2
  84. package/plugin/skills/thoth-sdd/scripts/validate-result.mjs +28 -2
  85. package/skills/thoth-sdd/SKILL.md +8 -2
  86. package/skills/thoth-sdd/scripts/validate-result.mjs +28 -2
  87. package/thoth-agents.schema.json +0 -96
  88. package/dist/chunk-62L3ORXN.js +0 -30
  89. package/dist/delegation/project-id.d.ts +0 -10
  90. package/dist/hooks/auto-update-checker/checker.d.ts +0 -23
  91. package/dist/hooks/auto-update-checker/constants.d.ts +0 -11
  92. package/dist/hooks/auto-update-checker/index.d.ts +0 -17
  93. package/dist/hooks/auto-update-checker/types.d.ts +0 -22
  94. package/dist/utils/tmux-session-manager.d.ts +0 -63
  95. package/dist/utils/tmux.d.ts +0 -32
@@ -0,0 +1,428 @@
1
+ /** Portable server/TUI contract: Zod only, no host or filesystem dependencies. */
2
+ import { z } from 'zod';
3
+ export declare const ToolRoleSchema: z.ZodEnum<{
4
+ explorer: "explorer";
5
+ librarian: "librarian";
6
+ oracle: "oracle";
7
+ designer: "designer";
8
+ worker: "worker";
9
+ }>;
10
+ export declare const ToolScopeSchema: z.ZodEnum<{
11
+ global: "global";
12
+ project: "project";
13
+ }>;
14
+ export declare const ToolEffectSchema: z.ZodEnum<{
15
+ allow: "allow";
16
+ ask: "ask";
17
+ deny: "deny";
18
+ }>;
19
+ export declare const ToolOriginSchema: z.ZodEnum<{
20
+ default: "default";
21
+ global: "global";
22
+ project: "project";
23
+ }>;
24
+ export declare const ActionOverrideSchema: z.ZodObject<{
25
+ action: z.ZodString;
26
+ effect: z.ZodEnum<{
27
+ allow: "allow";
28
+ ask: "ask";
29
+ deny: "deny";
30
+ }>;
31
+ }, z.core.$strip>;
32
+ export declare const ToolStateSchema: z.ZodObject<{
33
+ specialists: z.ZodArray<z.ZodEnum<{
34
+ explorer: "explorer";
35
+ librarian: "librarian";
36
+ oracle: "oracle";
37
+ designer: "designer";
38
+ worker: "worker";
39
+ }>>;
40
+ inventory: z.ZodArray<z.ZodObject<{
41
+ action: z.ZodString;
42
+ tools: z.ZodArray<z.ZodString>;
43
+ locked: z.ZodBoolean;
44
+ }, z.core.$strip>>;
45
+ roles: z.ZodArray<z.ZodObject<{
46
+ role: z.ZodEnum<{
47
+ explorer: "explorer";
48
+ librarian: "librarian";
49
+ oracle: "oracle";
50
+ designer: "designer";
51
+ worker: "worker";
52
+ }>;
53
+ effectiveScope: z.ZodEnum<{
54
+ default: "default";
55
+ global: "global";
56
+ project: "project";
57
+ }>;
58
+ global: z.ZodObject<{
59
+ present: z.ZodBoolean;
60
+ revision: z.ZodString;
61
+ overrides: z.ZodArray<z.ZodObject<{
62
+ action: z.ZodString;
63
+ effect: z.ZodEnum<{
64
+ allow: "allow";
65
+ ask: "ask";
66
+ deny: "deny";
67
+ }>;
68
+ matchCount: z.ZodNumber;
69
+ }, z.core.$strip>>;
70
+ }, z.core.$strip>;
71
+ project: z.ZodObject<{
72
+ present: z.ZodBoolean;
73
+ revision: z.ZodString;
74
+ overrides: z.ZodArray<z.ZodObject<{
75
+ action: z.ZodString;
76
+ effect: z.ZodEnum<{
77
+ allow: "allow";
78
+ ask: "ask";
79
+ deny: "deny";
80
+ }>;
81
+ matchCount: z.ZodNumber;
82
+ }, z.core.$strip>>;
83
+ }, z.core.$strip>;
84
+ actions: z.ZodArray<z.ZodObject<{
85
+ action: z.ZodString;
86
+ effect: z.ZodEnum<{
87
+ allow: "allow";
88
+ ask: "ask";
89
+ deny: "deny";
90
+ }>;
91
+ baseEffect: z.ZodEnum<{
92
+ allow: "allow";
93
+ ask: "ask";
94
+ deny: "deny";
95
+ }>;
96
+ origin: z.ZodEnum<{
97
+ default: "default";
98
+ global: "global";
99
+ project: "project";
100
+ }>;
101
+ locked: z.ZodBoolean;
102
+ }, z.core.$strip>>;
103
+ }, z.core.$strip>>;
104
+ warnings: z.ZodArray<z.ZodString>;
105
+ }, z.core.$strip>;
106
+ export declare const ToolErrorSchema: z.ZodObject<{
107
+ code: z.ZodEnum<{
108
+ TOOLS_CONFLICT: "TOOLS_CONFLICT";
109
+ INVALID_REQUEST: "INVALID_REQUEST";
110
+ OPERATION_FAILED: "OPERATION_FAILED";
111
+ }>;
112
+ message: z.ZodString;
113
+ }, z.core.$strip>;
114
+ export declare const toolRpc: {
115
+ readonly id: "thoth-tool-permissions";
116
+ readonly methods: {
117
+ readonly state: {
118
+ readonly input: z.ZodObject<{}, z.core.$strip>;
119
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
120
+ ok: z.ZodLiteral<true>;
121
+ value: z.ZodObject<{
122
+ specialists: z.ZodArray<z.ZodEnum<{
123
+ explorer: "explorer";
124
+ librarian: "librarian";
125
+ oracle: "oracle";
126
+ designer: "designer";
127
+ worker: "worker";
128
+ }>>;
129
+ inventory: z.ZodArray<z.ZodObject<{
130
+ action: z.ZodString;
131
+ tools: z.ZodArray<z.ZodString>;
132
+ locked: z.ZodBoolean;
133
+ }, z.core.$strip>>;
134
+ roles: z.ZodArray<z.ZodObject<{
135
+ role: z.ZodEnum<{
136
+ explorer: "explorer";
137
+ librarian: "librarian";
138
+ oracle: "oracle";
139
+ designer: "designer";
140
+ worker: "worker";
141
+ }>;
142
+ effectiveScope: z.ZodEnum<{
143
+ default: "default";
144
+ global: "global";
145
+ project: "project";
146
+ }>;
147
+ global: z.ZodObject<{
148
+ present: z.ZodBoolean;
149
+ revision: z.ZodString;
150
+ overrides: z.ZodArray<z.ZodObject<{
151
+ action: z.ZodString;
152
+ effect: z.ZodEnum<{
153
+ allow: "allow";
154
+ ask: "ask";
155
+ deny: "deny";
156
+ }>;
157
+ matchCount: z.ZodNumber;
158
+ }, z.core.$strip>>;
159
+ }, z.core.$strip>;
160
+ project: z.ZodObject<{
161
+ present: z.ZodBoolean;
162
+ revision: z.ZodString;
163
+ overrides: z.ZodArray<z.ZodObject<{
164
+ action: z.ZodString;
165
+ effect: z.ZodEnum<{
166
+ allow: "allow";
167
+ ask: "ask";
168
+ deny: "deny";
169
+ }>;
170
+ matchCount: z.ZodNumber;
171
+ }, z.core.$strip>>;
172
+ }, z.core.$strip>;
173
+ actions: z.ZodArray<z.ZodObject<{
174
+ action: z.ZodString;
175
+ effect: z.ZodEnum<{
176
+ allow: "allow";
177
+ ask: "ask";
178
+ deny: "deny";
179
+ }>;
180
+ baseEffect: z.ZodEnum<{
181
+ allow: "allow";
182
+ ask: "ask";
183
+ deny: "deny";
184
+ }>;
185
+ origin: z.ZodEnum<{
186
+ default: "default";
187
+ global: "global";
188
+ project: "project";
189
+ }>;
190
+ locked: z.ZodBoolean;
191
+ }, z.core.$strip>>;
192
+ }, z.core.$strip>>;
193
+ warnings: z.ZodArray<z.ZodString>;
194
+ }, z.core.$strip>;
195
+ }, z.core.$strip>, z.ZodObject<{
196
+ ok: z.ZodLiteral<false>;
197
+ error: z.ZodObject<{
198
+ code: z.ZodEnum<{
199
+ TOOLS_CONFLICT: "TOOLS_CONFLICT";
200
+ INVALID_REQUEST: "INVALID_REQUEST";
201
+ OPERATION_FAILED: "OPERATION_FAILED";
202
+ }>;
203
+ message: z.ZodString;
204
+ }, z.core.$strip>;
205
+ }, z.core.$strip>], "ok">;
206
+ };
207
+ readonly save: {
208
+ readonly input: z.ZodObject<{
209
+ scope: z.ZodEnum<{
210
+ global: "global";
211
+ project: "project";
212
+ }>;
213
+ role: z.ZodEnum<{
214
+ explorer: "explorer";
215
+ librarian: "librarian";
216
+ oracle: "oracle";
217
+ designer: "designer";
218
+ worker: "worker";
219
+ }>;
220
+ baseRevision: z.ZodString;
221
+ overrides: z.ZodArray<z.ZodObject<{
222
+ action: z.ZodString;
223
+ effect: z.ZodEnum<{
224
+ allow: "allow";
225
+ ask: "ask";
226
+ deny: "deny";
227
+ }>;
228
+ }, z.core.$strip>>;
229
+ }, z.core.$strip>;
230
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
231
+ ok: z.ZodLiteral<true>;
232
+ value: z.ZodObject<{
233
+ specialists: z.ZodArray<z.ZodEnum<{
234
+ explorer: "explorer";
235
+ librarian: "librarian";
236
+ oracle: "oracle";
237
+ designer: "designer";
238
+ worker: "worker";
239
+ }>>;
240
+ inventory: z.ZodArray<z.ZodObject<{
241
+ action: z.ZodString;
242
+ tools: z.ZodArray<z.ZodString>;
243
+ locked: z.ZodBoolean;
244
+ }, z.core.$strip>>;
245
+ roles: z.ZodArray<z.ZodObject<{
246
+ role: z.ZodEnum<{
247
+ explorer: "explorer";
248
+ librarian: "librarian";
249
+ oracle: "oracle";
250
+ designer: "designer";
251
+ worker: "worker";
252
+ }>;
253
+ effectiveScope: z.ZodEnum<{
254
+ default: "default";
255
+ global: "global";
256
+ project: "project";
257
+ }>;
258
+ global: z.ZodObject<{
259
+ present: z.ZodBoolean;
260
+ revision: z.ZodString;
261
+ overrides: z.ZodArray<z.ZodObject<{
262
+ action: z.ZodString;
263
+ effect: z.ZodEnum<{
264
+ allow: "allow";
265
+ ask: "ask";
266
+ deny: "deny";
267
+ }>;
268
+ matchCount: z.ZodNumber;
269
+ }, z.core.$strip>>;
270
+ }, z.core.$strip>;
271
+ project: z.ZodObject<{
272
+ present: z.ZodBoolean;
273
+ revision: z.ZodString;
274
+ overrides: z.ZodArray<z.ZodObject<{
275
+ action: z.ZodString;
276
+ effect: z.ZodEnum<{
277
+ allow: "allow";
278
+ ask: "ask";
279
+ deny: "deny";
280
+ }>;
281
+ matchCount: z.ZodNumber;
282
+ }, z.core.$strip>>;
283
+ }, z.core.$strip>;
284
+ actions: z.ZodArray<z.ZodObject<{
285
+ action: z.ZodString;
286
+ effect: z.ZodEnum<{
287
+ allow: "allow";
288
+ ask: "ask";
289
+ deny: "deny";
290
+ }>;
291
+ baseEffect: z.ZodEnum<{
292
+ allow: "allow";
293
+ ask: "ask";
294
+ deny: "deny";
295
+ }>;
296
+ origin: z.ZodEnum<{
297
+ default: "default";
298
+ global: "global";
299
+ project: "project";
300
+ }>;
301
+ locked: z.ZodBoolean;
302
+ }, z.core.$strip>>;
303
+ }, z.core.$strip>>;
304
+ warnings: z.ZodArray<z.ZodString>;
305
+ }, z.core.$strip>;
306
+ }, z.core.$strip>, z.ZodObject<{
307
+ ok: z.ZodLiteral<false>;
308
+ error: z.ZodObject<{
309
+ code: z.ZodEnum<{
310
+ TOOLS_CONFLICT: "TOOLS_CONFLICT";
311
+ INVALID_REQUEST: "INVALID_REQUEST";
312
+ OPERATION_FAILED: "OPERATION_FAILED";
313
+ }>;
314
+ message: z.ZodString;
315
+ }, z.core.$strip>;
316
+ }, z.core.$strip>], "ok">;
317
+ };
318
+ readonly reset: {
319
+ readonly input: z.ZodObject<{
320
+ scope: z.ZodEnum<{
321
+ global: "global";
322
+ project: "project";
323
+ }>;
324
+ role: z.ZodEnum<{
325
+ explorer: "explorer";
326
+ librarian: "librarian";
327
+ oracle: "oracle";
328
+ designer: "designer";
329
+ worker: "worker";
330
+ }>;
331
+ baseRevision: z.ZodString;
332
+ }, z.core.$strip>;
333
+ readonly output: z.ZodDiscriminatedUnion<[z.ZodObject<{
334
+ ok: z.ZodLiteral<true>;
335
+ value: z.ZodObject<{
336
+ specialists: z.ZodArray<z.ZodEnum<{
337
+ explorer: "explorer";
338
+ librarian: "librarian";
339
+ oracle: "oracle";
340
+ designer: "designer";
341
+ worker: "worker";
342
+ }>>;
343
+ inventory: z.ZodArray<z.ZodObject<{
344
+ action: z.ZodString;
345
+ tools: z.ZodArray<z.ZodString>;
346
+ locked: z.ZodBoolean;
347
+ }, z.core.$strip>>;
348
+ roles: z.ZodArray<z.ZodObject<{
349
+ role: z.ZodEnum<{
350
+ explorer: "explorer";
351
+ librarian: "librarian";
352
+ oracle: "oracle";
353
+ designer: "designer";
354
+ worker: "worker";
355
+ }>;
356
+ effectiveScope: z.ZodEnum<{
357
+ default: "default";
358
+ global: "global";
359
+ project: "project";
360
+ }>;
361
+ global: z.ZodObject<{
362
+ present: z.ZodBoolean;
363
+ revision: z.ZodString;
364
+ overrides: z.ZodArray<z.ZodObject<{
365
+ action: z.ZodString;
366
+ effect: z.ZodEnum<{
367
+ allow: "allow";
368
+ ask: "ask";
369
+ deny: "deny";
370
+ }>;
371
+ matchCount: z.ZodNumber;
372
+ }, z.core.$strip>>;
373
+ }, z.core.$strip>;
374
+ project: z.ZodObject<{
375
+ present: z.ZodBoolean;
376
+ revision: z.ZodString;
377
+ overrides: z.ZodArray<z.ZodObject<{
378
+ action: z.ZodString;
379
+ effect: z.ZodEnum<{
380
+ allow: "allow";
381
+ ask: "ask";
382
+ deny: "deny";
383
+ }>;
384
+ matchCount: z.ZodNumber;
385
+ }, z.core.$strip>>;
386
+ }, z.core.$strip>;
387
+ actions: z.ZodArray<z.ZodObject<{
388
+ action: z.ZodString;
389
+ effect: z.ZodEnum<{
390
+ allow: "allow";
391
+ ask: "ask";
392
+ deny: "deny";
393
+ }>;
394
+ baseEffect: z.ZodEnum<{
395
+ allow: "allow";
396
+ ask: "ask";
397
+ deny: "deny";
398
+ }>;
399
+ origin: z.ZodEnum<{
400
+ default: "default";
401
+ global: "global";
402
+ project: "project";
403
+ }>;
404
+ locked: z.ZodBoolean;
405
+ }, z.core.$strip>>;
406
+ }, z.core.$strip>>;
407
+ warnings: z.ZodArray<z.ZodString>;
408
+ }, z.core.$strip>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ ok: z.ZodLiteral<false>;
411
+ error: z.ZodObject<{
412
+ code: z.ZodEnum<{
413
+ TOOLS_CONFLICT: "TOOLS_CONFLICT";
414
+ INVALID_REQUEST: "INVALID_REQUEST";
415
+ OPERATION_FAILED: "OPERATION_FAILED";
416
+ }>;
417
+ message: z.ZodString;
418
+ }, z.core.$strip>;
419
+ }, z.core.$strip>], "ok">;
420
+ };
421
+ };
422
+ readonly events: {};
423
+ };
424
+ export type ToolState = z.infer<typeof ToolStateSchema>;
425
+ export type ToolError = z.infer<typeof ToolErrorSchema>;
426
+ export type ToolRpcMethod = keyof typeof toolRpc.methods;
427
+ export type ToolRpcInput<M extends ToolRpcMethod> = z.infer<(typeof toolRpc.methods)[M]['input']>;
428
+ export type ToolRpcOutput<M extends ToolRpcMethod> = z.infer<(typeof toolRpc.methods)[M]['output']>;
@@ -0,0 +1,3 @@
1
+ import type { Plugin } from '@opencode/plugin';
2
+ import type { OpenCodeDependencies } from './context';
3
+ export declare function registerTools(ctx: Plugin.Context, _deps: OpenCodeDependencies): Promise<void>;
package/dist/pi.js CHANGED
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  formatGateVerdict,
3
3
  summarizeGateResult
4
- } from "./chunk-RWQPMWEM.js";
4
+ } from "./chunk-JLU3FSBT.js";
5
5
  import {
6
6
  PI_ROOT_END,
7
7
  PI_ROOT_START,
8
8
  createPiToolsPanelAdapter,
9
9
  renderPiRootInstructions,
10
10
  syncPiSpecialists
11
- } from "./chunk-5WPP6IY7.js";
11
+ } from "./chunk-VVYAQTYE.js";
12
12
  import {
13
13
  findPackageRoot
14
- } from "./chunk-DNPKVFOB.js";
14
+ } from "./chunk-YCWGTDFE.js";
15
15
 
16
16
  // src/pi.ts
17
17
  import { homedir } from "os";
@@ -1,5 +1,6 @@
1
1
  import type { CliLanguage, SgResult } from './types';
2
2
  export interface RunOptions {
3
+ signal?: AbortSignal;
3
4
  pattern: string;
4
5
  lang: CliLanguage;
5
6
  paths?: string[];
@@ -1,6 +1,112 @@
1
- import type { ToolDefinition } from '@opencode-ai/plugin';
2
1
  import { ast_grep_replace, ast_grep_search } from './tools';
3
- export declare const builtinTools: Record<string, ToolDefinition>;
2
+ export declare const builtinTools: {
3
+ ast_grep_search: {
4
+ name: string;
5
+ description: string;
6
+ input: import("zod").ZodObject<{
7
+ pattern: import("zod").ZodString;
8
+ lang: import("zod").ZodEnum<{
9
+ bash: "bash";
10
+ c: "c";
11
+ cpp: "cpp";
12
+ csharp: "csharp";
13
+ css: "css";
14
+ elixir: "elixir";
15
+ go: "go";
16
+ haskell: "haskell";
17
+ html: "html";
18
+ java: "java";
19
+ javascript: "javascript";
20
+ json: "json";
21
+ kotlin: "kotlin";
22
+ lua: "lua";
23
+ nix: "nix";
24
+ php: "php";
25
+ python: "python";
26
+ ruby: "ruby";
27
+ rust: "rust";
28
+ scala: "scala";
29
+ solidity: "solidity";
30
+ swift: "swift";
31
+ typescript: "typescript";
32
+ tsx: "tsx";
33
+ yaml: "yaml";
34
+ }>;
35
+ paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
36
+ globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
37
+ context: import("zod").ZodOptional<import("zod").ZodNumber>;
38
+ }, import("zod/v4/core").$strip>;
39
+ execute(input: {
40
+ pattern: string;
41
+ lang: "bash" | "c" | "cpp" | "csharp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "nix" | "php" | "python" | "ruby" | "rust" | "scala" | "solidity" | "swift" | "typescript" | "tsx" | "yaml";
42
+ paths?: string[] | undefined;
43
+ globs?: string[] | undefined;
44
+ context?: number | undefined;
45
+ }, context: import("@opencode/plugin/promise/tool").ToolContext): Promise<{
46
+ content: string;
47
+ metadata: {
48
+ output: string;
49
+ };
50
+ } | {
51
+ content: string;
52
+ metadata?: undefined;
53
+ }>;
54
+ };
55
+ ast_grep_replace: {
56
+ name: string;
57
+ description: string;
58
+ input: import("zod").ZodObject<{
59
+ pattern: import("zod").ZodString;
60
+ rewrite: import("zod").ZodString;
61
+ lang: import("zod").ZodEnum<{
62
+ bash: "bash";
63
+ c: "c";
64
+ cpp: "cpp";
65
+ csharp: "csharp";
66
+ css: "css";
67
+ elixir: "elixir";
68
+ go: "go";
69
+ haskell: "haskell";
70
+ html: "html";
71
+ java: "java";
72
+ javascript: "javascript";
73
+ json: "json";
74
+ kotlin: "kotlin";
75
+ lua: "lua";
76
+ nix: "nix";
77
+ php: "php";
78
+ python: "python";
79
+ ruby: "ruby";
80
+ rust: "rust";
81
+ scala: "scala";
82
+ solidity: "solidity";
83
+ swift: "swift";
84
+ typescript: "typescript";
85
+ tsx: "tsx";
86
+ yaml: "yaml";
87
+ }>;
88
+ paths: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
89
+ globs: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>;
90
+ dryRun: import("zod").ZodOptional<import("zod").ZodBoolean>;
91
+ }, import("zod/v4/core").$strip>;
92
+ execute(input: {
93
+ pattern: string;
94
+ rewrite: string;
95
+ lang: "bash" | "c" | "cpp" | "csharp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "nix" | "php" | "python" | "ruby" | "rust" | "scala" | "solidity" | "swift" | "typescript" | "tsx" | "yaml";
96
+ paths?: string[] | undefined;
97
+ globs?: string[] | undefined;
98
+ dryRun?: boolean | undefined;
99
+ }, context: import("@opencode/plugin/promise/tool").ToolContext): Promise<{
100
+ content: string;
101
+ metadata: {
102
+ output: string;
103
+ };
104
+ } | {
105
+ content: string;
106
+ metadata?: undefined;
107
+ }>;
108
+ };
109
+ };
4
110
  export { ast_grep_search, ast_grep_replace };
5
111
  export { ensureCliAvailable, getAstGrepPath, isCliAvailable, startBackgroundInit, } from './cli';
6
112
  export type { EnvironmentCheckResult } from './constants';
@@ -1,3 +1,107 @@
1
- import { type ToolDefinition } from '@opencode-ai/plugin/tool';
2
- export declare const ast_grep_search: ToolDefinition;
3
- export declare const ast_grep_replace: ToolDefinition;
1
+ import { z } from 'zod';
2
+ export declare const ast_grep_search: {
3
+ name: string;
4
+ description: string;
5
+ input: z.ZodObject<{
6
+ pattern: z.ZodString;
7
+ lang: z.ZodEnum<{
8
+ bash: "bash";
9
+ c: "c";
10
+ cpp: "cpp";
11
+ csharp: "csharp";
12
+ css: "css";
13
+ elixir: "elixir";
14
+ go: "go";
15
+ haskell: "haskell";
16
+ html: "html";
17
+ java: "java";
18
+ javascript: "javascript";
19
+ json: "json";
20
+ kotlin: "kotlin";
21
+ lua: "lua";
22
+ nix: "nix";
23
+ php: "php";
24
+ python: "python";
25
+ ruby: "ruby";
26
+ rust: "rust";
27
+ scala: "scala";
28
+ solidity: "solidity";
29
+ swift: "swift";
30
+ typescript: "typescript";
31
+ tsx: "tsx";
32
+ yaml: "yaml";
33
+ }>;
34
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
35
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
36
+ context: z.ZodOptional<z.ZodNumber>;
37
+ }, z.core.$strip>;
38
+ execute(input: {
39
+ pattern: string;
40
+ lang: "bash" | "c" | "cpp" | "csharp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "nix" | "php" | "python" | "ruby" | "rust" | "scala" | "solidity" | "swift" | "typescript" | "tsx" | "yaml";
41
+ paths?: string[] | undefined;
42
+ globs?: string[] | undefined;
43
+ context?: number | undefined;
44
+ }, context: import("@opencode/plugin/promise/tool").ToolContext): Promise<{
45
+ content: string;
46
+ metadata: {
47
+ output: string;
48
+ };
49
+ } | {
50
+ content: string;
51
+ metadata?: undefined;
52
+ }>;
53
+ };
54
+ export declare const ast_grep_replace: {
55
+ name: string;
56
+ description: string;
57
+ input: z.ZodObject<{
58
+ pattern: z.ZodString;
59
+ rewrite: z.ZodString;
60
+ lang: z.ZodEnum<{
61
+ bash: "bash";
62
+ c: "c";
63
+ cpp: "cpp";
64
+ csharp: "csharp";
65
+ css: "css";
66
+ elixir: "elixir";
67
+ go: "go";
68
+ haskell: "haskell";
69
+ html: "html";
70
+ java: "java";
71
+ javascript: "javascript";
72
+ json: "json";
73
+ kotlin: "kotlin";
74
+ lua: "lua";
75
+ nix: "nix";
76
+ php: "php";
77
+ python: "python";
78
+ ruby: "ruby";
79
+ rust: "rust";
80
+ scala: "scala";
81
+ solidity: "solidity";
82
+ swift: "swift";
83
+ typescript: "typescript";
84
+ tsx: "tsx";
85
+ yaml: "yaml";
86
+ }>;
87
+ paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
88
+ globs: z.ZodOptional<z.ZodArray<z.ZodString>>;
89
+ dryRun: z.ZodOptional<z.ZodBoolean>;
90
+ }, z.core.$strip>;
91
+ execute(input: {
92
+ pattern: string;
93
+ rewrite: string;
94
+ lang: "bash" | "c" | "cpp" | "csharp" | "css" | "elixir" | "go" | "haskell" | "html" | "java" | "javascript" | "json" | "kotlin" | "lua" | "nix" | "php" | "python" | "ruby" | "rust" | "scala" | "solidity" | "swift" | "typescript" | "tsx" | "yaml";
95
+ paths?: string[] | undefined;
96
+ globs?: string[] | undefined;
97
+ dryRun?: boolean | undefined;
98
+ }, context: import("@opencode/plugin/promise/tool").ToolContext): Promise<{
99
+ content: string;
100
+ metadata: {
101
+ output: string;
102
+ };
103
+ } | {
104
+ content: string;
105
+ metadata?: undefined;
106
+ }>;
107
+ };