iosm-cli 0.2.7 → 0.2.9

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 (149) hide show
  1. package/CHANGELOG.md +61 -1
  2. package/README.md +4 -4
  3. package/dist/cli/args.d.ts.map +1 -1
  4. package/dist/cli/args.js +12 -4
  5. package/dist/cli/args.js.map +1 -1
  6. package/dist/core/agent-profiles.d.ts.map +1 -1
  7. package/dist/core/agent-profiles.js +15 -2
  8. package/dist/core/agent-profiles.js.map +1 -1
  9. package/dist/core/agent-session.d.ts +3 -0
  10. package/dist/core/agent-session.d.ts.map +1 -1
  11. package/dist/core/agent-session.js +214 -2
  12. package/dist/core/agent-session.js.map +1 -1
  13. package/dist/core/sdk.d.ts +2 -2
  14. package/dist/core/sdk.d.ts.map +1 -1
  15. package/dist/core/sdk.js +7 -4
  16. package/dist/core/sdk.js.map +1 -1
  17. package/dist/core/settings-manager.d.ts +57 -0
  18. package/dist/core/settings-manager.d.ts.map +1 -1
  19. package/dist/core/settings-manager.js +197 -0
  20. package/dist/core/settings-manager.js.map +1 -1
  21. package/dist/core/shadow-guard.d.ts.map +1 -1
  22. package/dist/core/shadow-guard.js +12 -1
  23. package/dist/core/shadow-guard.js.map +1 -1
  24. package/dist/core/system-prompt.d.ts.map +1 -1
  25. package/dist/core/system-prompt.js +109 -4
  26. package/dist/core/system-prompt.js.map +1 -1
  27. package/dist/core/tools/db-run.d.ts +84 -0
  28. package/dist/core/tools/db-run.d.ts.map +1 -0
  29. package/dist/core/tools/db-run.js +690 -0
  30. package/dist/core/tools/db-run.js.map +1 -0
  31. package/dist/core/tools/git-common.d.ts +45 -0
  32. package/dist/core/tools/git-common.d.ts.map +1 -0
  33. package/dist/core/tools/git-common.js +185 -0
  34. package/dist/core/tools/git-common.js.map +1 -0
  35. package/dist/core/tools/git-read.d.ts +15 -13
  36. package/dist/core/tools/git-read.d.ts.map +1 -1
  37. package/dist/core/tools/git-read.js +101 -153
  38. package/dist/core/tools/git-read.js.map +1 -1
  39. package/dist/core/tools/git-write.d.ts +75 -0
  40. package/dist/core/tools/git-write.d.ts.map +1 -0
  41. package/dist/core/tools/git-write.js +298 -0
  42. package/dist/core/tools/git-write.js.map +1 -0
  43. package/dist/core/tools/index.d.ts +91 -1
  44. package/dist/core/tools/index.d.ts.map +1 -1
  45. package/dist/core/tools/index.js +26 -0
  46. package/dist/core/tools/index.js.map +1 -1
  47. package/dist/core/tools/lint-run.d.ts +42 -0
  48. package/dist/core/tools/lint-run.d.ts.map +1 -0
  49. package/dist/core/tools/lint-run.js +276 -0
  50. package/dist/core/tools/lint-run.js.map +1 -0
  51. package/dist/core/tools/task.js +1 -1
  52. package/dist/core/tools/task.js.map +1 -1
  53. package/dist/core/tools/test-run.d.ts +36 -0
  54. package/dist/core/tools/test-run.d.ts.map +1 -0
  55. package/dist/core/tools/test-run.js +255 -0
  56. package/dist/core/tools/test-run.js.map +1 -0
  57. package/dist/core/tools/typecheck-run.d.ts +44 -0
  58. package/dist/core/tools/typecheck-run.d.ts.map +1 -0
  59. package/dist/core/tools/typecheck-run.js +343 -0
  60. package/dist/core/tools/typecheck-run.js.map +1 -0
  61. package/dist/core/tools/verification-runner.d.ts +53 -0
  62. package/dist/core/tools/verification-runner.d.ts.map +1 -0
  63. package/dist/core/tools/verification-runner.js +235 -0
  64. package/dist/core/tools/verification-runner.js.map +1 -0
  65. package/dist/core/tools/web-search.d.ts +72 -0
  66. package/dist/core/tools/web-search.d.ts.map +1 -0
  67. package/dist/core/tools/web-search.js +702 -0
  68. package/dist/core/tools/web-search.js.map +1 -0
  69. package/dist/index.d.ts +2 -2
  70. package/dist/index.d.ts.map +1 -1
  71. package/dist/index.js +1 -1
  72. package/dist/index.js.map +1 -1
  73. package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
  74. package/dist/modes/interactive/components/branch-summary-message.js +2 -1
  75. package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
  76. package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
  77. package/dist/modes/interactive/components/compaction-summary-message.js +2 -1
  78. package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
  79. package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
  80. package/dist/modes/interactive/components/config-selector.js +7 -2
  81. package/dist/modes/interactive/components/config-selector.js.map +1 -1
  82. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  83. package/dist/modes/interactive/components/custom-message.js +2 -1
  84. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  85. package/dist/modes/interactive/components/mcp-selector.d.ts.map +1 -1
  86. package/dist/modes/interactive/components/mcp-selector.js +3 -1
  87. package/dist/modes/interactive/components/mcp-selector.js.map +1 -1
  88. package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
  89. package/dist/modes/interactive/components/model-selector.js +12 -2
  90. package/dist/modes/interactive/components/model-selector.js.map +1 -1
  91. package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
  92. package/dist/modes/interactive/components/oauth-selector.js +11 -0
  93. package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
  94. package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
  95. package/dist/modes/interactive/components/scoped-models-selector.js +16 -5
  96. package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
  97. package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
  98. package/dist/modes/interactive/components/session-selector.js +4 -2
  99. package/dist/modes/interactive/components/session-selector.js.map +1 -1
  100. package/dist/modes/interactive/components/settings-selector.d.ts +25 -0
  101. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  102. package/dist/modes/interactive/components/settings-selector.js +182 -2
  103. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  104. package/dist/modes/interactive/components/show-images-selector.d.ts.map +1 -1
  105. package/dist/modes/interactive/components/show-images-selector.js +7 -2
  106. package/dist/modes/interactive/components/show-images-selector.js.map +1 -1
  107. package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
  108. package/dist/modes/interactive/components/skill-invocation-message.js +4 -2
  109. package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
  110. package/dist/modes/interactive/components/subagent-message.d.ts.map +1 -1
  111. package/dist/modes/interactive/components/subagent-message.js +3 -1
  112. package/dist/modes/interactive/components/subagent-message.js.map +1 -1
  113. package/dist/modes/interactive/components/task-plan-message.d.ts.map +1 -1
  114. package/dist/modes/interactive/components/task-plan-message.js +2 -1
  115. package/dist/modes/interactive/components/task-plan-message.js.map +1 -1
  116. package/dist/modes/interactive/components/theme-selector.d.ts.map +1 -1
  117. package/dist/modes/interactive/components/theme-selector.js +7 -2
  118. package/dist/modes/interactive/components/theme-selector.js.map +1 -1
  119. package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
  120. package/dist/modes/interactive/components/thinking-selector.js +7 -2
  121. package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
  122. package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
  123. package/dist/modes/interactive/components/tool-execution.js +25 -7
  124. package/dist/modes/interactive/components/tool-execution.js.map +1 -1
  125. package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
  126. package/dist/modes/interactive/components/tree-selector.js +18 -3
  127. package/dist/modes/interactive/components/tree-selector.js.map +1 -1
  128. package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
  129. package/dist/modes/interactive/components/user-message-selector.js +8 -0
  130. package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
  131. package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
  132. package/dist/modes/interactive/components/user-message.js +2 -1
  133. package/dist/modes/interactive/components/user-message.js.map +1 -1
  134. package/dist/modes/interactive/interactive-mode.d.ts +8 -0
  135. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  136. package/dist/modes/interactive/interactive-mode.js +622 -11
  137. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  138. package/dist/modes/interactive/theme/dark.json +39 -38
  139. package/dist/modes/interactive/theme/light.json +29 -29
  140. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  141. package/dist/modes/interactive/theme/theme.js +16 -25
  142. package/dist/modes/interactive/theme/theme.js.map +1 -1
  143. package/dist/modes/interactive/theme/universal.json +85 -0
  144. package/docs/cli-reference.md +32 -2
  145. package/docs/configuration.md +86 -2
  146. package/docs/development-and-testing.md +1 -1
  147. package/docs/interactive-mode.md +8 -3
  148. package/docs/rpc-json-sdk.md +1 -1
  149. package/package.json +1 -1
@@ -0,0 +1,298 @@
1
+ import { Type } from "@sinclair/typebox";
2
+ import { resolveToCwd } from "./path-utils.js";
3
+ import { DEFAULT_GIT_TIMEOUT_SECONDS, normalizeFiles, normalizePositiveInt, normalizeRefLike, normalizeRequiredString, requireRefLike, resolveGitCommandOptions, runGitAndFormatOutput, } from "./git-common.js";
4
+ const gitWriteSchema = Type.Object({
5
+ action: Type.Union([
6
+ Type.Literal("add"),
7
+ Type.Literal("restore"),
8
+ Type.Literal("reset_index"),
9
+ Type.Literal("commit"),
10
+ Type.Literal("switch"),
11
+ Type.Literal("branch_create"),
12
+ Type.Literal("fetch"),
13
+ Type.Literal("pull"),
14
+ Type.Literal("push"),
15
+ Type.Literal("stash_push"),
16
+ Type.Literal("stash_pop"),
17
+ Type.Literal("stash_apply"),
18
+ Type.Literal("stash_drop"),
19
+ Type.Literal("stash_list"),
20
+ ], {
21
+ description: "Git write action: add | restore | reset_index | commit | switch | branch_create | fetch | pull | push | stash_push | stash_pop | stash_apply | stash_drop | stash_list.",
22
+ }),
23
+ path: Type.Optional(Type.String({ description: "Repository working directory (default: current directory)." })),
24
+ all: Type.Optional(Type.Boolean({ description: "For add action: stage all tracked and untracked changes." })),
25
+ update: Type.Optional(Type.Boolean({ description: "For add action: stage modified/deleted tracked files." })),
26
+ files: Type.Optional(Type.Array(Type.String(), { description: "For add/restore/reset_index action: file paths." })),
27
+ staged: Type.Optional(Type.Boolean({ description: "For restore action: restore index instead of working tree." })),
28
+ source: Type.Optional(Type.String({ description: "For restore action: source ref (e.g., HEAD)." })),
29
+ ref: Type.Optional(Type.String({ description: "For reset_index action: reference commit (default: HEAD)." })),
30
+ message: Type.Optional(Type.String({ description: "For commit/stash_push action: message." })),
31
+ allow_empty: Type.Optional(Type.Boolean({ description: "For commit action: allow empty commit." })),
32
+ branch: Type.Optional(Type.String({ description: "For switch/branch_create action: branch name." })),
33
+ start_point: Type.Optional(Type.String({ description: "For branch_create action: start point (default: HEAD)." })),
34
+ remote: Type.Optional(Type.String({ description: "For fetch/pull/push action: remote name (default: origin)." })),
35
+ ff_only: Type.Optional(Type.Boolean({ description: "For pull action: require fast-forward merge (default: true)." })),
36
+ prune: Type.Optional(Type.Boolean({ description: "For fetch action: prune deleted remote refs." })),
37
+ set_upstream: Type.Optional(Type.Boolean({ description: "For push action: set upstream for branch." })),
38
+ tags: Type.Optional(Type.Boolean({ description: "For fetch/push action: include tags." })),
39
+ include_untracked: Type.Optional(Type.Boolean({ description: "For stash_push action: include untracked files." })),
40
+ keep_index: Type.Optional(Type.Boolean({ description: "For stash_push action: keep index unchanged." })),
41
+ stash_ref: Type.Optional(Type.String({ description: "For stash_pop/stash_apply/stash_drop action: stash ref (default: stash@{0})." })),
42
+ limit: Type.Optional(Type.Number({ description: "For stash_list action: max entries (default: 20, max: 200)." })),
43
+ timeout: Type.Optional(Type.Number({ description: "Timeout in seconds (default: 30)." })),
44
+ });
45
+ const DEFAULT_STASH_LIST_LIMIT = 20;
46
+ const MAX_STASH_LIST_LIMIT = 200;
47
+ const DEFAULT_REMOTE = "origin";
48
+ const DEFAULT_GIT_WRITE_NETWORK_ENABLED = false;
49
+ function normalizeGitWriteRuntimeConfig(config) {
50
+ return {
51
+ networkEnabled: typeof config?.networkEnabled === "boolean"
52
+ ? config.networkEnabled
53
+ : DEFAULT_GIT_WRITE_NETWORK_ENABLED,
54
+ };
55
+ }
56
+ function buildAddArgs(input) {
57
+ const useAll = input.all === true;
58
+ const useUpdate = input.update === true;
59
+ const hasFiles = (input.files?.length ?? 0) > 0;
60
+ const modeCount = (useAll ? 1 : 0) + (useUpdate ? 1 : 0) + (hasFiles ? 1 : 0);
61
+ if (modeCount !== 1) {
62
+ throw new Error("git_write add requires exactly one mode: all=true, update=true, or files[].");
63
+ }
64
+ const args = ["add"];
65
+ if (useAll) {
66
+ args.push("--all");
67
+ return args;
68
+ }
69
+ if (useUpdate) {
70
+ args.push("--update");
71
+ return args;
72
+ }
73
+ const files = normalizeFiles(input.files, "files");
74
+ args.push("--", ...files);
75
+ return args;
76
+ }
77
+ function buildRestoreArgs(input) {
78
+ const files = normalizeFiles(input.files, "files");
79
+ const args = ["restore"];
80
+ if (input.staged) {
81
+ args.push("--staged");
82
+ }
83
+ const source = normalizeRefLike(input.source, "source");
84
+ if (source) {
85
+ args.push(`--source=${source}`);
86
+ }
87
+ args.push("--", ...files);
88
+ return args;
89
+ }
90
+ function buildResetIndexArgs(input) {
91
+ const files = normalizeFiles(input.files, "files");
92
+ const ref = requireRefLike(input.ref ?? "HEAD", "ref");
93
+ return ["reset", ref, "--", ...files];
94
+ }
95
+ function buildCommitArgs(input) {
96
+ const message = normalizeRequiredString(input.message, "message");
97
+ const args = ["commit", "-m", message];
98
+ if (input.allow_empty) {
99
+ args.push("--allow-empty");
100
+ }
101
+ return args;
102
+ }
103
+ function buildSwitchArgs(input) {
104
+ const branch = requireRefLike(input.branch, "branch");
105
+ return ["switch", branch];
106
+ }
107
+ function buildBranchCreateArgs(input) {
108
+ const branch = requireRefLike(input.branch, "branch");
109
+ const startPoint = requireRefLike(input.start_point ?? "HEAD", "start_point");
110
+ return ["branch", branch, startPoint];
111
+ }
112
+ function buildFetchArgs(input) {
113
+ const remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, "remote");
114
+ const args = ["fetch"];
115
+ if (input.prune) {
116
+ args.push("--prune");
117
+ }
118
+ if (input.tags) {
119
+ args.push("--tags");
120
+ }
121
+ args.push(remote);
122
+ return args;
123
+ }
124
+ function buildPullArgs(input) {
125
+ const remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, "remote");
126
+ const args = ["pull"];
127
+ if (input.ff_only ?? true) {
128
+ args.push("--ff-only");
129
+ }
130
+ args.push(remote);
131
+ const branch = normalizeRefLike(input.branch, "branch");
132
+ if (branch) {
133
+ args.push(branch);
134
+ }
135
+ return args;
136
+ }
137
+ function buildPushArgs(input) {
138
+ const remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, "remote");
139
+ const args = ["push"];
140
+ if (input.set_upstream) {
141
+ args.push("--set-upstream");
142
+ }
143
+ if (input.tags) {
144
+ args.push("--tags");
145
+ }
146
+ args.push(remote);
147
+ const branch = normalizeRefLike(input.branch, "branch");
148
+ if (branch) {
149
+ args.push(branch);
150
+ }
151
+ return args;
152
+ }
153
+ function buildStashPushArgs(input) {
154
+ const args = ["stash", "push"];
155
+ if (input.include_untracked) {
156
+ args.push("--include-untracked");
157
+ }
158
+ if (input.keep_index) {
159
+ args.push("--keep-index");
160
+ }
161
+ if (input.message !== undefined) {
162
+ const message = normalizeRequiredString(input.message, "message");
163
+ args.push("-m", message);
164
+ }
165
+ return args;
166
+ }
167
+ function buildStashEntryActionArgs(input, action) {
168
+ const stashRef = requireRefLike(input.stash_ref ?? "stash@{0}", "stash_ref");
169
+ return ["stash", action, stashRef];
170
+ }
171
+ function buildStashListArgs(input) {
172
+ const limit = Math.min(MAX_STASH_LIST_LIMIT, normalizePositiveInt(input.limit, DEFAULT_STASH_LIST_LIMIT, "limit"));
173
+ return ["stash", "list", `--max-count=${limit}`, "--date=iso", "--pretty=format:%gd%x09%H%x09%ad%x09%s"];
174
+ }
175
+ function buildGitWriteArgs(input) {
176
+ switch (input.action) {
177
+ case "add":
178
+ return buildAddArgs(input);
179
+ case "restore":
180
+ return buildRestoreArgs(input);
181
+ case "reset_index":
182
+ return buildResetIndexArgs(input);
183
+ case "commit":
184
+ return buildCommitArgs(input);
185
+ case "switch":
186
+ return buildSwitchArgs(input);
187
+ case "branch_create":
188
+ return buildBranchCreateArgs(input);
189
+ case "fetch":
190
+ return buildFetchArgs(input);
191
+ case "pull":
192
+ return buildPullArgs(input);
193
+ case "push":
194
+ return buildPushArgs(input);
195
+ case "stash_push":
196
+ return buildStashPushArgs(input);
197
+ case "stash_pop":
198
+ return buildStashEntryActionArgs(input, "pop");
199
+ case "stash_apply":
200
+ return buildStashEntryActionArgs(input, "apply");
201
+ case "stash_drop":
202
+ return buildStashEntryActionArgs(input, "drop");
203
+ case "stash_list":
204
+ return buildStashListArgs(input);
205
+ default:
206
+ throw new Error(`Unsupported git_write action: ${input.action}`);
207
+ }
208
+ }
209
+ function isNetworkAction(action) {
210
+ return action === "fetch" || action === "pull" || action === "push";
211
+ }
212
+ function buildGitNetworkEnv(githubToken) {
213
+ const env = {
214
+ GIT_TERMINAL_PROMPT: "0",
215
+ };
216
+ const token = githubToken?.trim();
217
+ if (!token) {
218
+ return env;
219
+ }
220
+ const basic = Buffer.from(`x-access-token:${token}`, "utf-8").toString("base64");
221
+ const existingCountRaw = process.env.GIT_CONFIG_COUNT;
222
+ const existingCountParsed = existingCountRaw ? Number.parseInt(existingCountRaw, 10) : Number.NaN;
223
+ const existingCount = Number.isFinite(existingCountParsed) && existingCountParsed >= 0 ? existingCountParsed : 0;
224
+ const keyIndex = existingCount;
225
+ env.GIT_CONFIG_COUNT = String(existingCount + 1);
226
+ env[`GIT_CONFIG_KEY_${keyIndex}`] = "http.https://github.com/.extraheader";
227
+ env[`GIT_CONFIG_VALUE_${keyIndex}`] = `AUTHORIZATION: basic ${basic}`;
228
+ return env;
229
+ }
230
+ export function createGitWriteTool(cwd, options) {
231
+ const { hasCommand, runCommand } = resolveGitCommandOptions(options);
232
+ const permissionGuard = options?.permissionGuard;
233
+ const resolveRuntimeConfig = options?.resolveRuntimeConfig;
234
+ const resolveGithubToken = options?.resolveGithubToken;
235
+ return {
236
+ name: "git_write",
237
+ label: "git_write",
238
+ description: "Structured git mutation tool. Actions: add, restore, reset_index, commit, switch, branch_create, fetch, pull, push, stash_push, stash_pop, stash_apply, stash_drop, stash_list. Network actions are disabled by default and require explicit runtime enablement.",
239
+ parameters: gitWriteSchema,
240
+ execute: async (_toolCallId, input, signal) => {
241
+ if (!hasCommand("git")) {
242
+ throw new Error("git command is not available.");
243
+ }
244
+ const runtimeConfig = normalizeGitWriteRuntimeConfig(resolveRuntimeConfig?.());
245
+ const networkAction = isNetworkAction(input.action);
246
+ if (networkAction && !runtimeConfig.networkEnabled) {
247
+ throw new Error("git_write network actions are disabled. Enable Github tools network access in settings.");
248
+ }
249
+ const repoCwd = resolveToCwd(input.path || ".", cwd);
250
+ const args = buildGitWriteArgs(input);
251
+ const timeoutSeconds = normalizePositiveInt(input.timeout, DEFAULT_GIT_TIMEOUT_SECONDS, "timeout");
252
+ const env = networkAction ? buildGitNetworkEnv(resolveGithubToken?.()) : undefined;
253
+ if (permissionGuard) {
254
+ const allowed = await permissionGuard({
255
+ toolName: "git_write",
256
+ cwd,
257
+ input: {
258
+ action: input.action,
259
+ path: input.path,
260
+ repoCwd,
261
+ args,
262
+ timeoutSeconds,
263
+ networkAction,
264
+ },
265
+ summary: `git ${args.join(" ")}`,
266
+ });
267
+ if (!allowed) {
268
+ throw new Error("Permission denied for git_write operation.");
269
+ }
270
+ }
271
+ const result = await runGitAndFormatOutput({
272
+ toolName: "git_write",
273
+ action: input.action,
274
+ args,
275
+ cwd: repoCwd,
276
+ timeoutSeconds,
277
+ runCommand,
278
+ signal,
279
+ env,
280
+ });
281
+ const details = {
282
+ action: input.action,
283
+ command: "git",
284
+ args,
285
+ cwd: repoCwd,
286
+ exitCode: result.exitCode,
287
+ captureTruncated: result.captureTruncated || undefined,
288
+ truncation: result.truncation,
289
+ };
290
+ return {
291
+ content: [{ type: "text", text: result.output }],
292
+ details,
293
+ };
294
+ },
295
+ };
296
+ }
297
+ export const gitWriteTool = createGitWriteTool(process.cwd());
298
+ //# sourceMappingURL=git-write.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git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AAE,MAAM,CAAC,MAAM,EAAE,CAAC;gBAChD,OAAO;aACP,CAAC;QACH,CAAC;KACD,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,YAAY,GAAG,kBAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport { type Static, Type } from \"@sinclair/typebox\";\nimport { resolveToCwd } from \"./path-utils.js\";\nimport {\n\tDEFAULT_GIT_TIMEOUT_SECONDS,\n\tnormalizeFiles,\n\tnormalizePositiveInt,\n\tnormalizeRefLike,\n\tnormalizeRequiredString,\n\trequireRefLike,\n\tresolveGitCommandOptions,\n\trunGitAndFormatOutput,\n\ttype GitCommandOptions,\n} from \"./git-common.js\";\nimport type { ToolPermissionGuard } from \"./permissions.js\";\nimport type { TruncationResult } from \"./truncate.js\";\n\nconst gitWriteSchema = Type.Object({\n\taction: Type.Union(\n\t\t[\n\t\t\tType.Literal(\"add\"),\n\t\t\tType.Literal(\"restore\"),\n\t\t\tType.Literal(\"reset_index\"),\n\t\t\tType.Literal(\"commit\"),\n\t\t\tType.Literal(\"switch\"),\n\t\t\tType.Literal(\"branch_create\"),\n\t\t\tType.Literal(\"fetch\"),\n\t\t\tType.Literal(\"pull\"),\n\t\t\tType.Literal(\"push\"),\n\t\t\tType.Literal(\"stash_push\"),\n\t\t\tType.Literal(\"stash_pop\"),\n\t\t\tType.Literal(\"stash_apply\"),\n\t\t\tType.Literal(\"stash_drop\"),\n\t\t\tType.Literal(\"stash_list\"),\n\t\t],\n\t\t{\n\t\t\tdescription:\n\t\t\t\t\"Git write action: add | restore | reset_index | commit | switch | branch_create | fetch | pull | push | stash_push | stash_pop | stash_apply | stash_drop | stash_list.\",\n\t\t},\n\t),\n\tpath: Type.Optional(Type.String({ description: \"Repository working directory (default: current directory).\" })),\n\tall: Type.Optional(Type.Boolean({ description: \"For add action: stage all tracked and untracked changes.\" })),\n\tupdate: Type.Optional(Type.Boolean({ description: \"For add action: stage modified/deleted tracked files.\" })),\n\tfiles: Type.Optional(Type.Array(Type.String(), { description: \"For add/restore/reset_index action: file paths.\" })),\n\tstaged: Type.Optional(Type.Boolean({ description: \"For restore action: restore index instead of working tree.\" })),\n\tsource: Type.Optional(Type.String({ description: \"For restore action: source ref (e.g., HEAD).\" })),\n\tref: Type.Optional(Type.String({ description: \"For reset_index action: reference commit (default: HEAD).\" })),\n\tmessage: Type.Optional(Type.String({ description: \"For commit/stash_push action: message.\" })),\n\tallow_empty: Type.Optional(Type.Boolean({ description: \"For commit action: allow empty commit.\" })),\n\tbranch: Type.Optional(Type.String({ description: \"For switch/branch_create action: branch name.\" })),\n\tstart_point: Type.Optional(Type.String({ description: \"For branch_create action: start point (default: HEAD).\" })),\n\tremote: Type.Optional(Type.String({ description: \"For fetch/pull/push action: remote name (default: origin).\" })),\n\tff_only: Type.Optional(Type.Boolean({ description: \"For pull action: require fast-forward merge (default: true).\" })),\n\tprune: Type.Optional(Type.Boolean({ description: \"For fetch action: prune deleted remote refs.\" })),\n\tset_upstream: Type.Optional(Type.Boolean({ description: \"For push action: set upstream for branch.\" })),\n\ttags: Type.Optional(Type.Boolean({ description: \"For fetch/push action: include tags.\" })),\n\tinclude_untracked: Type.Optional(\n\t\tType.Boolean({ description: \"For stash_push action: include untracked files.\" }),\n\t),\n\tkeep_index: Type.Optional(Type.Boolean({ description: \"For stash_push action: keep index unchanged.\" })),\n\tstash_ref: Type.Optional(\n\t\tType.String({ description: \"For stash_pop/stash_apply/stash_drop action: stash ref (default: stash@{0}).\" }),\n\t),\n\tlimit: Type.Optional(Type.Number({ description: \"For stash_list action: max entries (default: 20, max: 200).\" })),\n\ttimeout: Type.Optional(Type.Number({ description: \"Timeout in seconds (default: 30).\" })),\n});\n\nexport type GitWriteToolInput = Static<typeof gitWriteSchema>;\n\nconst DEFAULT_STASH_LIST_LIMIT = 20;\nconst MAX_STASH_LIST_LIMIT = 200;\nconst DEFAULT_REMOTE = \"origin\";\nconst DEFAULT_GIT_WRITE_NETWORK_ENABLED = false;\n\ntype GitWriteAction = GitWriteToolInput[\"action\"];\n\nexport interface GitWriteToolDetails {\n\taction: GitWriteAction;\n\tcommand: string;\n\targs: string[];\n\tcwd: string;\n\texitCode: number;\n\tcaptureTruncated?: boolean;\n\ttruncation?: TruncationResult;\n}\n\nexport interface GitWriteRuntimeConfig {\n\tnetworkEnabled: boolean;\n}\n\nexport interface GitWriteToolOptions extends GitCommandOptions {\n\tpermissionGuard?: ToolPermissionGuard;\n\tresolveRuntimeConfig?: () => Partial<GitWriteRuntimeConfig> | GitWriteRuntimeConfig;\n\tresolveGithubToken?: () => string | undefined;\n}\n\nfunction normalizeGitWriteRuntimeConfig(\n\tconfig: Partial<GitWriteRuntimeConfig> | GitWriteRuntimeConfig | undefined,\n): GitWriteRuntimeConfig {\n\treturn {\n\t\tnetworkEnabled:\n\t\t\ttypeof config?.networkEnabled === \"boolean\"\n\t\t\t\t? config.networkEnabled\n\t\t\t\t: DEFAULT_GIT_WRITE_NETWORK_ENABLED,\n\t};\n}\n\nfunction buildAddArgs(input: GitWriteToolInput): string[] {\n\tconst useAll = input.all === true;\n\tconst useUpdate = input.update === true;\n\tconst hasFiles = (input.files?.length ?? 0) > 0;\n\tconst modeCount = (useAll ? 1 : 0) + (useUpdate ? 1 : 0) + (hasFiles ? 1 : 0);\n\tif (modeCount !== 1) {\n\t\tthrow new Error(\"git_write add requires exactly one mode: all=true, update=true, or files[].\");\n\t}\n\tconst args = [\"add\"];\n\tif (useAll) {\n\t\targs.push(\"--all\");\n\t\treturn args;\n\t}\n\tif (useUpdate) {\n\t\targs.push(\"--update\");\n\t\treturn args;\n\t}\n\tconst files = normalizeFiles(input.files, \"files\");\n\targs.push(\"--\", ...files);\n\treturn args;\n}\n\nfunction buildRestoreArgs(input: GitWriteToolInput): string[] {\n\tconst files = normalizeFiles(input.files, \"files\");\n\tconst args = [\"restore\"];\n\tif (input.staged) {\n\t\targs.push(\"--staged\");\n\t}\n\tconst source = normalizeRefLike(input.source, \"source\");\n\tif (source) {\n\t\targs.push(`--source=${source}`);\n\t}\n\targs.push(\"--\", ...files);\n\treturn args;\n}\n\nfunction buildResetIndexArgs(input: GitWriteToolInput): string[] {\n\tconst files = normalizeFiles(input.files, \"files\");\n\tconst ref = requireRefLike(input.ref ?? \"HEAD\", \"ref\");\n\treturn [\"reset\", ref, \"--\", ...files];\n}\n\nfunction buildCommitArgs(input: GitWriteToolInput): string[] {\n\tconst message = normalizeRequiredString(input.message, \"message\");\n\tconst args = [\"commit\", \"-m\", message];\n\tif (input.allow_empty) {\n\t\targs.push(\"--allow-empty\");\n\t}\n\treturn args;\n}\n\nfunction buildSwitchArgs(input: GitWriteToolInput): string[] {\n\tconst branch = requireRefLike(input.branch, \"branch\");\n\treturn [\"switch\", branch];\n}\n\nfunction buildBranchCreateArgs(input: GitWriteToolInput): string[] {\n\tconst branch = requireRefLike(input.branch, \"branch\");\n\tconst startPoint = requireRefLike(input.start_point ?? \"HEAD\", \"start_point\");\n\treturn [\"branch\", branch, startPoint];\n}\n\nfunction buildFetchArgs(input: GitWriteToolInput): string[] {\n\tconst remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, \"remote\");\n\tconst args = [\"fetch\"];\n\tif (input.prune) {\n\t\targs.push(\"--prune\");\n\t}\n\tif (input.tags) {\n\t\targs.push(\"--tags\");\n\t}\n\targs.push(remote);\n\treturn args;\n}\n\nfunction buildPullArgs(input: GitWriteToolInput): string[] {\n\tconst remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, \"remote\");\n\tconst args = [\"pull\"];\n\tif (input.ff_only ?? true) {\n\t\targs.push(\"--ff-only\");\n\t}\n\targs.push(remote);\n\tconst branch = normalizeRefLike(input.branch, \"branch\");\n\tif (branch) {\n\t\targs.push(branch);\n\t}\n\treturn args;\n}\n\nfunction buildPushArgs(input: GitWriteToolInput): string[] {\n\tconst remote = requireRefLike(input.remote ?? DEFAULT_REMOTE, \"remote\");\n\tconst args = [\"push\"];\n\tif (input.set_upstream) {\n\t\targs.push(\"--set-upstream\");\n\t}\n\tif (input.tags) {\n\t\targs.push(\"--tags\");\n\t}\n\targs.push(remote);\n\tconst branch = normalizeRefLike(input.branch, \"branch\");\n\tif (branch) {\n\t\targs.push(branch);\n\t}\n\treturn args;\n}\n\nfunction buildStashPushArgs(input: GitWriteToolInput): string[] {\n\tconst args = [\"stash\", \"push\"];\n\tif (input.include_untracked) {\n\t\targs.push(\"--include-untracked\");\n\t}\n\tif (input.keep_index) {\n\t\targs.push(\"--keep-index\");\n\t}\n\tif (input.message !== undefined) {\n\t\tconst message = normalizeRequiredString(input.message, \"message\");\n\t\targs.push(\"-m\", message);\n\t}\n\treturn args;\n}\n\nfunction buildStashEntryActionArgs(input: GitWriteToolInput, action: \"pop\" | \"apply\" | \"drop\"): string[] {\n\tconst stashRef = requireRefLike(input.stash_ref ?? \"stash@{0}\", \"stash_ref\");\n\treturn [\"stash\", action, stashRef];\n}\n\nfunction buildStashListArgs(input: GitWriteToolInput): string[] {\n\tconst limit = Math.min(MAX_STASH_LIST_LIMIT, normalizePositiveInt(input.limit, DEFAULT_STASH_LIST_LIMIT, \"limit\"));\n\treturn [\"stash\", \"list\", `--max-count=${limit}`, \"--date=iso\", \"--pretty=format:%gd%x09%H%x09%ad%x09%s\"];\n}\n\nfunction buildGitWriteArgs(input: GitWriteToolInput): string[] {\n\tswitch (input.action) {\n\t\tcase \"add\":\n\t\t\treturn buildAddArgs(input);\n\t\tcase \"restore\":\n\t\t\treturn buildRestoreArgs(input);\n\t\tcase \"reset_index\":\n\t\t\treturn buildResetIndexArgs(input);\n\t\tcase \"commit\":\n\t\t\treturn buildCommitArgs(input);\n\t\tcase \"switch\":\n\t\t\treturn buildSwitchArgs(input);\n\t\tcase \"branch_create\":\n\t\t\treturn buildBranchCreateArgs(input);\n\t\tcase \"fetch\":\n\t\t\treturn buildFetchArgs(input);\n\t\tcase \"pull\":\n\t\t\treturn buildPullArgs(input);\n\t\tcase \"push\":\n\t\t\treturn buildPushArgs(input);\n\t\tcase \"stash_push\":\n\t\t\treturn buildStashPushArgs(input);\n\t\tcase \"stash_pop\":\n\t\t\treturn buildStashEntryActionArgs(input, \"pop\");\n\t\tcase \"stash_apply\":\n\t\t\treturn buildStashEntryActionArgs(input, \"apply\");\n\t\tcase \"stash_drop\":\n\t\t\treturn buildStashEntryActionArgs(input, \"drop\");\n\t\tcase \"stash_list\":\n\t\t\treturn buildStashListArgs(input);\n\t\tdefault:\n\t\t\tthrow new Error(`Unsupported git_write action: ${(input as { action: string }).action}`);\n\t}\n}\n\nfunction isNetworkAction(action: GitWriteAction): boolean {\n\treturn action === \"fetch\" || action === \"pull\" || action === \"push\";\n}\n\nfunction buildGitNetworkEnv(githubToken: string | undefined): NodeJS.ProcessEnv {\n\tconst env: NodeJS.ProcessEnv = {\n\t\tGIT_TERMINAL_PROMPT: \"0\",\n\t};\n\n\tconst token = githubToken?.trim();\n\tif (!token) {\n\t\treturn env;\n\t}\n\n\tconst basic = Buffer.from(`x-access-token:${token}`, \"utf-8\").toString(\"base64\");\n\tconst existingCountRaw = process.env.GIT_CONFIG_COUNT;\n\tconst existingCountParsed = existingCountRaw ? Number.parseInt(existingCountRaw, 10) : Number.NaN;\n\tconst existingCount = Number.isFinite(existingCountParsed) && existingCountParsed >= 0 ? existingCountParsed : 0;\n\tconst keyIndex = existingCount;\n\n\tenv.GIT_CONFIG_COUNT = String(existingCount + 1);\n\tenv[`GIT_CONFIG_KEY_${keyIndex}`] = \"http.https://github.com/.extraheader\";\n\tenv[`GIT_CONFIG_VALUE_${keyIndex}`] = `AUTHORIZATION: basic ${basic}`;\n\treturn env;\n}\n\nexport function createGitWriteTool(cwd: string, options?: GitWriteToolOptions): AgentTool<typeof gitWriteSchema> {\n\tconst { hasCommand, runCommand } = resolveGitCommandOptions(options);\n\tconst permissionGuard = options?.permissionGuard;\n\tconst resolveRuntimeConfig = options?.resolveRuntimeConfig;\n\tconst resolveGithubToken = options?.resolveGithubToken;\n\n\treturn {\n\t\tname: \"git_write\",\n\t\tlabel: \"git_write\",\n\t\tdescription:\n\t\t\t\"Structured git mutation tool. Actions: add, restore, reset_index, commit, switch, branch_create, fetch, pull, push, stash_push, stash_pop, stash_apply, stash_drop, stash_list. Network actions are disabled by default and require explicit runtime enablement.\",\n\t\tparameters: gitWriteSchema,\n\t\texecute: async (_toolCallId: string, input: GitWriteToolInput, signal?: AbortSignal) => {\n\t\t\tif (!hasCommand(\"git\")) {\n\t\t\t\tthrow new Error(\"git command is not available.\");\n\t\t\t}\n\n\t\t\tconst runtimeConfig = normalizeGitWriteRuntimeConfig(resolveRuntimeConfig?.());\n\t\t\tconst networkAction = isNetworkAction(input.action);\n\t\t\tif (networkAction && !runtimeConfig.networkEnabled) {\n\t\t\t\tthrow new Error(\"git_write network actions are disabled. Enable Github tools network access in settings.\");\n\t\t\t}\n\n\t\t\tconst repoCwd = resolveToCwd(input.path || \".\", cwd);\n\t\t\tconst args = buildGitWriteArgs(input);\n\t\t\tconst timeoutSeconds = normalizePositiveInt(input.timeout, DEFAULT_GIT_TIMEOUT_SECONDS, \"timeout\");\n\t\t\tconst env = networkAction ? buildGitNetworkEnv(resolveGithubToken?.()) : undefined;\n\n\t\t\t\tif (permissionGuard) {\n\t\t\t\t\tconst allowed = await permissionGuard({\n\t\t\t\t\t\ttoolName: \"git_write\",\n\t\t\t\t\t\tcwd,\n\t\t\t\t\t\tinput: {\n\t\t\t\t\t\t\taction: input.action,\n\t\t\t\t\t\t\tpath: input.path,\n\t\t\t\t\t\t\trepoCwd,\n\t\t\t\t\t\t\targs,\n\t\t\t\t\t\t\ttimeoutSeconds,\n\t\t\t\t\t\t\tnetworkAction,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tsummary: `git ${args.join(\" \")}`,\n\t\t\t\t\t});\n\t\t\t\t\tif (!allowed) {\n\t\t\t\t\t\tthrow new Error(\"Permission denied for git_write operation.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\tconst result = await runGitAndFormatOutput({\n\t\t\t\ttoolName: \"git_write\",\n\t\t\t\taction: input.action,\n\t\t\t\targs,\n\t\t\t\tcwd: repoCwd,\n\t\t\t\ttimeoutSeconds,\n\t\t\t\trunCommand,\n\t\t\t\tsignal,\n\t\t\t\tenv,\n\t\t\t});\n\n\t\t\tconst details: GitWriteToolDetails = {\n\t\t\t\taction: input.action,\n\t\t\t\tcommand: \"git\",\n\t\t\t\targs,\n\t\t\t\tcwd: repoCwd,\n\t\t\t\texitCode: result.exitCode,\n\t\t\t\tcaptureTruncated: result.captureTruncated || undefined,\n\t\t\t\ttruncation: result.truncation,\n\t\t\t};\n\n\t\t\treturn {\n\t\t\t\tcontent: [{ type: \"text\", text: result.output }],\n\t\t\t\tdetails,\n\t\t\t};\n\t\t},\n\t};\n}\n\nexport const gitWriteTool = createGitWriteTool(process.cwd());\n"]}
@@ -3,13 +3,17 @@ export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type Ba
3
3
  export { type CombyToolInput, combyTool, createCombyTool, } from "./comby.js";
4
4
  export { createEditTool, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, editTool, } from "./edit.js";
5
5
  export { createFetchTool, type FetchToolDetails, type FetchToolInput, type FetchToolOptions, type FetchMethod, type FetchResponseFormat, DEFAULT_FETCH_TIMEOUT_SECONDS, DEFAULT_FETCH_MAX_BYTES, DEFAULT_FETCH_MAX_REDIRECTS, getAllowedFetchMethodsForProfile, fetchTool, } from "./fetch.js";
6
+ export { createWebSearchTool, type WebSearchAttemptDetail, type WebSearchAttemptStatus, type WebSearchFallbackMode, type WebSearchProvider, type WebSearchProviderMode, type WebSearchRuntimeConfig, type WebSearchSafeSearch, type WebSearchSearchDepth, type WebSearchToolDetails, type WebSearchToolInput, type WebSearchToolOptions, DEFAULT_WEB_SEARCH_MAX_RESULTS, DEFAULT_WEB_SEARCH_TIMEOUT_SECONDS, webSearchTool, } from "./web-search.js";
6
7
  export { type ExternalCliToolDetails, type ExternalCliToolInput, type ExternalCliToolOptions, createExternalCliTool, } from "./external-cli.js";
7
8
  export { createFdTool, type FdToolInput, fdTool, } from "./fd.js";
8
9
  export { createFindTool, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, findTool, } from "./find.js";
9
10
  export { createFsOpsTool, type FsOpsToolDetails, type FsOpsToolInput, type FsOpsToolOptions, fsOpsTool, } from "./fs-ops.js";
10
11
  export { createGrepTool, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, grepTool, } from "./grep.js";
11
12
  export { createGitReadTool, type GitReadToolDetails, type GitReadToolInput, type GitReadToolOptions, gitReadTool, } from "./git-read.js";
13
+ export { createGitWriteTool, type GitWriteToolDetails, type GitWriteToolInput, type GitWriteToolOptions, gitWriteTool, } from "./git-write.js";
12
14
  export { createJqTool, type JqToolInput, jqTool, } from "./jq.js";
15
+ export { createDbRunTool, type DbRunAction, type DbRunAdapter, type DbRunMigrateRunner, type DbRunStatus, type DbRunToolDetails, type DbRunToolInput, type DbRunToolOptions, type DbToolsConnectionConfig, type DbToolsMigrateConfig, type DbToolsRuntimeConfig, dbRunTool, DEFAULT_DB_RUN_TIMEOUT_SECONDS, } from "./db-run.js";
16
+ export { createLintRunTool, type LintRunMode, type LintRunRunner, type LintRunStatus, type LintRunToolDetails, type LintRunToolInput, lintRunTool, DEFAULT_LINT_RUN_TIMEOUT_SECONDS, } from "./lint-run.js";
13
17
  export { createLsTool, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, lsTool, } from "./ls.js";
14
18
  export { createReadTool, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, readTool, } from "./read.js";
15
19
  export { createRgTool, type RgToolInput, rgTool, } from "./rg.js";
@@ -22,11 +26,16 @@ export { type ToolPermissionGuard, type ToolPermissionRequest } from "./permissi
22
26
  export { createTodoWriteTool, createTodoReadTool, todoWriteTool, todoReadTool, getTaskFilePath, type TodoTask, type TodoTaskStatus, type TodoWriteInput, type TodoReadInput, } from "./todo.js";
23
27
  export { createYqTool, type YqToolInput, yqTool, } from "./yq.js";
24
28
  export { createTaskTool, type SubagentRunner, type TaskToolProgress, type TaskToolProgressPhase, type TaskToolInput, type TaskToolDetails, } from "./task.js";
29
+ export { createTestRunTool, type TestRunRunner, type TestRunStatus, type TestRunToolDetails, type TestRunToolInput, testRunTool, DEFAULT_TEST_RUN_TIMEOUT_SECONDS, } from "./test-run.js";
30
+ export { createTypecheckRunTool, type TypecheckRunItemDetails, type TypecheckRunRunner, type TypecheckRunStatus, type TypecheckRunToolDetails, type TypecheckRunToolInput, typecheckRunTool, DEFAULT_TYPECHECK_RUN_TIMEOUT_SECONDS, } from "./typecheck-run.js";
25
31
  import type { AgentTool } from "@mariozechner/pi-agent-core";
26
32
  import { type BashToolOptions } from "./bash.js";
27
33
  import { type EditToolOptions } from "./edit.js";
28
34
  import { type FetchToolOptions } from "./fetch.js";
35
+ import { type WebSearchToolOptions } from "./web-search.js";
29
36
  import { type FsOpsToolOptions } from "./fs-ops.js";
37
+ import { type GitWriteToolOptions } from "./git-write.js";
38
+ import { type DbRunToolOptions } from "./db-run.js";
30
39
  import { type ReadToolOptions } from "./read.js";
31
40
  import { type SemanticSearchToolOptions } from "./semantic-search.js";
32
41
  import { type WriteToolOptions } from "./write.js";
@@ -136,8 +145,18 @@ export declare const allTools: {
136
145
  response_format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"json">, import("@sinclair/typebox").TLiteral<"text">]>>;
137
146
  max_redirects: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
138
147
  }>, any>;
148
+ web_search: AgentTool<import("@sinclair/typebox").TObject<{
149
+ query: import("@sinclair/typebox").TString;
150
+ max_results: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
151
+ include_domains: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
152
+ exclude_domains: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
153
+ topic: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
154
+ days: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
155
+ search_depth: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"basic">, import("@sinclair/typebox").TLiteral<"advanced">]>>;
156
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
157
+ }>, any>;
139
158
  git_read: AgentTool<import("@sinclair/typebox").TObject<{
140
- action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"status">, import("@sinclair/typebox").TLiteral<"diff">, import("@sinclair/typebox").TLiteral<"log">, import("@sinclair/typebox").TLiteral<"blame">]>;
159
+ action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"status">, import("@sinclair/typebox").TLiteral<"diff">, import("@sinclair/typebox").TLiteral<"log">, import("@sinclair/typebox").TLiteral<"blame">, import("@sinclair/typebox").TLiteral<"show">, import("@sinclair/typebox").TLiteral<"branch_list">, import("@sinclair/typebox").TLiteral<"remote_list">, import("@sinclair/typebox").TLiteral<"rev_parse">]>;
141
160
  path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
142
161
  file: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
143
162
  base: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -151,6 +170,34 @@ export declare const allTools: {
151
170
  ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
152
171
  line_start: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
153
172
  line_end: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
173
+ all: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
174
+ verbose: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
175
+ target: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
176
+ short: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
177
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
178
+ }>, any>;
179
+ git_write: AgentTool<import("@sinclair/typebox").TObject<{
180
+ action: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"add">, import("@sinclair/typebox").TLiteral<"restore">, import("@sinclair/typebox").TLiteral<"reset_index">, import("@sinclair/typebox").TLiteral<"commit">, import("@sinclair/typebox").TLiteral<"switch">, import("@sinclair/typebox").TLiteral<"branch_create">, import("@sinclair/typebox").TLiteral<"fetch">, import("@sinclair/typebox").TLiteral<"pull">, import("@sinclair/typebox").TLiteral<"push">, import("@sinclair/typebox").TLiteral<"stash_push">, import("@sinclair/typebox").TLiteral<"stash_pop">, import("@sinclair/typebox").TLiteral<"stash_apply">, import("@sinclair/typebox").TLiteral<"stash_drop">, import("@sinclair/typebox").TLiteral<"stash_list">]>;
181
+ path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
182
+ all: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
183
+ update: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
184
+ files: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
185
+ staged: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
186
+ source: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
187
+ ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
188
+ message: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
189
+ allow_empty: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
190
+ branch: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
191
+ start_point: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
192
+ remote: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
193
+ ff_only: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
194
+ prune: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
195
+ set_upstream: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
196
+ tags: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
197
+ include_untracked: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
198
+ keep_index: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
199
+ stash_ref: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
200
+ limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
154
201
  timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
155
202
  }>, any>;
156
203
  fs_ops: AgentTool<import("@sinclair/typebox").TObject<{
@@ -161,6 +208,43 @@ export declare const allTools: {
161
208
  recursive: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
162
209
  force: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
163
210
  }>, any>;
211
+ test_run: AgentTool<import("@sinclair/typebox").TObject<{
212
+ runner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"npm">, import("@sinclair/typebox").TLiteral<"pnpm">, import("@sinclair/typebox").TLiteral<"yarn">, import("@sinclair/typebox").TLiteral<"bun">, import("@sinclair/typebox").TLiteral<"vitest">, import("@sinclair/typebox").TLiteral<"jest">, import("@sinclair/typebox").TLiteral<"pytest">]>>;
213
+ script: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
214
+ args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
215
+ path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
216
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
217
+ }>, any>;
218
+ lint_run: AgentTool<import("@sinclair/typebox").TObject<{
219
+ runner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"npm">, import("@sinclair/typebox").TLiteral<"pnpm">, import("@sinclair/typebox").TLiteral<"yarn">, import("@sinclair/typebox").TLiteral<"bun">, import("@sinclair/typebox").TLiteral<"eslint">, import("@sinclair/typebox").TLiteral<"prettier">, import("@sinclair/typebox").TLiteral<"stylelint">]>>;
220
+ mode: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"check">, import("@sinclair/typebox").TLiteral<"fix">]>>;
221
+ script: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
222
+ targets: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
223
+ args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
224
+ path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
225
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
226
+ }>, any>;
227
+ typecheck_run: AgentTool<import("@sinclair/typebox").TObject<{
228
+ runner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"npm">, import("@sinclair/typebox").TLiteral<"pnpm">, import("@sinclair/typebox").TLiteral<"yarn">, import("@sinclair/typebox").TLiteral<"bun">, import("@sinclair/typebox").TLiteral<"tsc">, import("@sinclair/typebox").TLiteral<"vue_tsc">, import("@sinclair/typebox").TLiteral<"pyright">, import("@sinclair/typebox").TLiteral<"mypy">]>>;
229
+ script: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
230
+ targets: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
231
+ args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
232
+ path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
233
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
234
+ }>, any>;
235
+ db_run: AgentTool<import("@sinclair/typebox").TObject<{
236
+ action: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"query">, import("@sinclair/typebox").TLiteral<"exec">, import("@sinclair/typebox").TLiteral<"schema">, import("@sinclair/typebox").TLiteral<"migrate">, import("@sinclair/typebox").TLiteral<"explain">]>>;
237
+ adapter: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"postgres">, import("@sinclair/typebox").TLiteral<"mysql">, import("@sinclair/typebox").TLiteral<"sqlite">, import("@sinclair/typebox").TLiteral<"mongodb">, import("@sinclair/typebox").TLiteral<"redis">]>>;
238
+ connection: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
239
+ statement: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
240
+ format: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"table">, import("@sinclair/typebox").TLiteral<"json">, import("@sinclair/typebox").TLiteral<"raw">]>>;
241
+ allow_write: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
242
+ migrate_runner: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TLiteral<"auto">, import("@sinclair/typebox").TLiteral<"script">]>>;
243
+ script: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
244
+ args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
245
+ path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
246
+ timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
247
+ }>, any>;
164
248
  todo_write: AgentTool<import("@sinclair/typebox").TObject<{
165
249
  tasks: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
166
250
  id: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
@@ -186,8 +270,14 @@ export interface ToolsOptions {
186
270
  semantic?: SemanticSearchToolOptions;
187
271
  /** Options for the fetch tool */
188
272
  fetch?: FetchToolOptions;
273
+ /** Options for the web_search tool */
274
+ webSearch?: WebSearchToolOptions;
275
+ /** Options for the git_write tool */
276
+ gitWrite?: GitWriteToolOptions;
189
277
  /** Options for the fs_ops tool */
190
278
  fsOps?: FsOpsToolOptions;
279
+ /** Options for the db_run tool */
280
+ dbRun?: DbRunToolOptions;
191
281
  }
192
282
  /**
193
283
  * Create coding tools configured for a specific working directory.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,WAAW,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,KAAK,cAAc,EACnB,SAAS,EACT,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB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AM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAwB/E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAwB1F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAKjG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,WAAW,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,KAAK,cAAc,EACnB,SAAS,EACT,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,mBAAmB,EACxB,6BAA6B,EAC7B,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,mBAAmB,EACnB,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,sB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