amai 0.0.11 → 0.0.12

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.
package/dist/cli.cjs CHANGED
@@ -2340,6 +2340,81 @@ var connectToUserStreams = async (serverUrl) => {
2340
2340
  });
2341
2341
  return ws;
2342
2342
  };
2343
+ var toolCallSchema = zod.z.object({
2344
+ tool: zod.z.string().describe("The name of the tool to execute"),
2345
+ parameters: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Parameters for the tool")
2346
+ });
2347
+ zod.z.object({
2348
+ tool_calls: zod.z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2349
+ });
2350
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2351
+ var batchableToolExecutors = {
2352
+ deleteFile,
2353
+ grep: grepTool,
2354
+ glob: globTool,
2355
+ listDirectory: list,
2356
+ readFile: read_file,
2357
+ runTerminalCommand
2358
+ };
2359
+ var batchTool = async function(input, projectCwd) {
2360
+ const { tool_calls } = input;
2361
+ const callsToExecute = tool_calls.slice(0, 10);
2362
+ const discardedCalls = tool_calls.slice(10);
2363
+ const executeCall = async (call) => {
2364
+ try {
2365
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2366
+ return {
2367
+ tool: call.tool,
2368
+ success: false,
2369
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2370
+ };
2371
+ }
2372
+ const executor = batchableToolExecutors[call.tool];
2373
+ if (!executor) {
2374
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2375
+ return {
2376
+ tool: call.tool,
2377
+ success: false,
2378
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2379
+ };
2380
+ }
2381
+ const result = await executor(call.parameters, projectCwd);
2382
+ return {
2383
+ tool: call.tool,
2384
+ success: result.success !== false,
2385
+ // Treat undefined success as true
2386
+ result
2387
+ };
2388
+ } catch (error) {
2389
+ return {
2390
+ tool: call.tool,
2391
+ success: false,
2392
+ error: error.message || String(error)
2393
+ };
2394
+ }
2395
+ };
2396
+ const results = await Promise.all(callsToExecute.map(executeCall));
2397
+ for (const call of discardedCalls) {
2398
+ results.push({
2399
+ tool: call.tool,
2400
+ success: false,
2401
+ error: "Maximum of 10 tools allowed in batch"
2402
+ });
2403
+ }
2404
+ const successfulCalls = results.filter((r) => r.success).length;
2405
+ const failedCalls = results.length - successfulCalls;
2406
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2407
+
2408
+ Keep using the batch tool for optimal performance in your next response!`;
2409
+ return {
2410
+ success: failedCalls === 0,
2411
+ message: outputMessage,
2412
+ totalCalls: results.length,
2413
+ successful: successfulCalls,
2414
+ failed: failedCalls,
2415
+ results
2416
+ };
2417
+ };
2343
2418
 
2344
2419
  // src/server.ts
2345
2420
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2362,7 +2437,8 @@ var toolExecutors = {
2362
2437
  listDirectory: list,
2363
2438
  readFile: read_file,
2364
2439
  stringReplace: apply_patch,
2365
- runTerminalCommand
2440
+ runTerminalCommand,
2441
+ batch: batchTool
2366
2442
  };
2367
2443
  function connectToServer(serverUrl = DEFAULT_SERVER_URL) {
2368
2444
  const tokens = getTokens();
@@ -2680,7 +2756,7 @@ function getDaemonPid() {
2680
2756
  return null;
2681
2757
  }
2682
2758
  }
2683
- var VERSION = "0.0.11";
2759
+ var VERSION = "0.0.12";
2684
2760
  var PROJECT_DIR = process.cwd();
2685
2761
  var LOGO = `
2686
2762
  __ _ _ __ ___ __ _
package/dist/cli.js CHANGED
@@ -2327,6 +2327,81 @@ var connectToUserStreams = async (serverUrl) => {
2327
2327
  });
2328
2328
  return ws;
2329
2329
  };
2330
+ var toolCallSchema = z.object({
2331
+ tool: z.string().describe("The name of the tool to execute"),
2332
+ parameters: z.record(z.string(), z.unknown()).describe("Parameters for the tool")
2333
+ });
2334
+ z.object({
2335
+ tool_calls: z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2336
+ });
2337
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2338
+ var batchableToolExecutors = {
2339
+ deleteFile,
2340
+ grep: grepTool,
2341
+ glob: globTool,
2342
+ listDirectory: list,
2343
+ readFile: read_file,
2344
+ runTerminalCommand
2345
+ };
2346
+ var batchTool = async function(input, projectCwd) {
2347
+ const { tool_calls } = input;
2348
+ const callsToExecute = tool_calls.slice(0, 10);
2349
+ const discardedCalls = tool_calls.slice(10);
2350
+ const executeCall = async (call) => {
2351
+ try {
2352
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2353
+ return {
2354
+ tool: call.tool,
2355
+ success: false,
2356
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2357
+ };
2358
+ }
2359
+ const executor = batchableToolExecutors[call.tool];
2360
+ if (!executor) {
2361
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2362
+ return {
2363
+ tool: call.tool,
2364
+ success: false,
2365
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2366
+ };
2367
+ }
2368
+ const result = await executor(call.parameters, projectCwd);
2369
+ return {
2370
+ tool: call.tool,
2371
+ success: result.success !== false,
2372
+ // Treat undefined success as true
2373
+ result
2374
+ };
2375
+ } catch (error) {
2376
+ return {
2377
+ tool: call.tool,
2378
+ success: false,
2379
+ error: error.message || String(error)
2380
+ };
2381
+ }
2382
+ };
2383
+ const results = await Promise.all(callsToExecute.map(executeCall));
2384
+ for (const call of discardedCalls) {
2385
+ results.push({
2386
+ tool: call.tool,
2387
+ success: false,
2388
+ error: "Maximum of 10 tools allowed in batch"
2389
+ });
2390
+ }
2391
+ const successfulCalls = results.filter((r) => r.success).length;
2392
+ const failedCalls = results.length - successfulCalls;
2393
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2394
+
2395
+ Keep using the batch tool for optimal performance in your next response!`;
2396
+ return {
2397
+ success: failedCalls === 0,
2398
+ message: outputMessage,
2399
+ totalCalls: results.length,
2400
+ successful: successfulCalls,
2401
+ failed: failedCalls,
2402
+ results
2403
+ };
2404
+ };
2330
2405
 
2331
2406
  // src/server.ts
2332
2407
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2349,7 +2424,8 @@ var toolExecutors = {
2349
2424
  listDirectory: list,
2350
2425
  readFile: read_file,
2351
2426
  stringReplace: apply_patch,
2352
- runTerminalCommand
2427
+ runTerminalCommand,
2428
+ batch: batchTool
2353
2429
  };
2354
2430
  function connectToServer(serverUrl = DEFAULT_SERVER_URL) {
2355
2431
  const tokens = getTokens();
@@ -2667,7 +2743,7 @@ function getDaemonPid() {
2667
2743
  return null;
2668
2744
  }
2669
2745
  }
2670
- var VERSION = "0.0.11";
2746
+ var VERSION = "0.0.12";
2671
2747
  var PROJECT_DIR = process.cwd();
2672
2748
  var LOGO = `
2673
2749
  __ _ _ __ ___ __ _
@@ -2206,6 +2206,81 @@ var connectToUserStreams = async (serverUrl) => {
2206
2206
  });
2207
2207
  return ws;
2208
2208
  };
2209
+ var toolCallSchema = zod.z.object({
2210
+ tool: zod.z.string().describe("The name of the tool to execute"),
2211
+ parameters: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Parameters for the tool")
2212
+ });
2213
+ zod.z.object({
2214
+ tool_calls: zod.z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2215
+ });
2216
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2217
+ var batchableToolExecutors = {
2218
+ deleteFile,
2219
+ grep: grepTool,
2220
+ glob: globTool,
2221
+ listDirectory: list,
2222
+ readFile: read_file,
2223
+ runTerminalCommand
2224
+ };
2225
+ var batchTool = async function(input, projectCwd) {
2226
+ const { tool_calls } = input;
2227
+ const callsToExecute = tool_calls.slice(0, 10);
2228
+ const discardedCalls = tool_calls.slice(10);
2229
+ const executeCall = async (call) => {
2230
+ try {
2231
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2232
+ return {
2233
+ tool: call.tool,
2234
+ success: false,
2235
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2236
+ };
2237
+ }
2238
+ const executor = batchableToolExecutors[call.tool];
2239
+ if (!executor) {
2240
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2241
+ return {
2242
+ tool: call.tool,
2243
+ success: false,
2244
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2245
+ };
2246
+ }
2247
+ const result = await executor(call.parameters, projectCwd);
2248
+ return {
2249
+ tool: call.tool,
2250
+ success: result.success !== false,
2251
+ // Treat undefined success as true
2252
+ result
2253
+ };
2254
+ } catch (error) {
2255
+ return {
2256
+ tool: call.tool,
2257
+ success: false,
2258
+ error: error.message || String(error)
2259
+ };
2260
+ }
2261
+ };
2262
+ const results = await Promise.all(callsToExecute.map(executeCall));
2263
+ for (const call of discardedCalls) {
2264
+ results.push({
2265
+ tool: call.tool,
2266
+ success: false,
2267
+ error: "Maximum of 10 tools allowed in batch"
2268
+ });
2269
+ }
2270
+ const successfulCalls = results.filter((r) => r.success).length;
2271
+ const failedCalls = results.length - successfulCalls;
2272
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2273
+
2274
+ Keep using the batch tool for optimal performance in your next response!`;
2275
+ return {
2276
+ success: failedCalls === 0,
2277
+ message: outputMessage,
2278
+ totalCalls: results.length,
2279
+ successful: successfulCalls,
2280
+ failed: failedCalls,
2281
+ results
2282
+ };
2283
+ };
2209
2284
 
2210
2285
  // src/server.ts
2211
2286
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2228,7 +2303,8 @@ var toolExecutors = {
2228
2303
  listDirectory: list,
2229
2304
  readFile: read_file,
2230
2305
  stringReplace: apply_patch,
2231
- runTerminalCommand
2306
+ runTerminalCommand,
2307
+ batch: batchTool
2232
2308
  };
2233
2309
  function connectToServer(serverUrl = DEFAULT_SERVER_URL) {
2234
2310
  const tokens = getTokens();
@@ -2195,6 +2195,81 @@ var connectToUserStreams = async (serverUrl) => {
2195
2195
  });
2196
2196
  return ws;
2197
2197
  };
2198
+ var toolCallSchema = z.object({
2199
+ tool: z.string().describe("The name of the tool to execute"),
2200
+ parameters: z.record(z.string(), z.unknown()).describe("Parameters for the tool")
2201
+ });
2202
+ z.object({
2203
+ tool_calls: z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2204
+ });
2205
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2206
+ var batchableToolExecutors = {
2207
+ deleteFile,
2208
+ grep: grepTool,
2209
+ glob: globTool,
2210
+ listDirectory: list,
2211
+ readFile: read_file,
2212
+ runTerminalCommand
2213
+ };
2214
+ var batchTool = async function(input, projectCwd) {
2215
+ const { tool_calls } = input;
2216
+ const callsToExecute = tool_calls.slice(0, 10);
2217
+ const discardedCalls = tool_calls.slice(10);
2218
+ const executeCall = async (call) => {
2219
+ try {
2220
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2221
+ return {
2222
+ tool: call.tool,
2223
+ success: false,
2224
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2225
+ };
2226
+ }
2227
+ const executor = batchableToolExecutors[call.tool];
2228
+ if (!executor) {
2229
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2230
+ return {
2231
+ tool: call.tool,
2232
+ success: false,
2233
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2234
+ };
2235
+ }
2236
+ const result = await executor(call.parameters, projectCwd);
2237
+ return {
2238
+ tool: call.tool,
2239
+ success: result.success !== false,
2240
+ // Treat undefined success as true
2241
+ result
2242
+ };
2243
+ } catch (error) {
2244
+ return {
2245
+ tool: call.tool,
2246
+ success: false,
2247
+ error: error.message || String(error)
2248
+ };
2249
+ }
2250
+ };
2251
+ const results = await Promise.all(callsToExecute.map(executeCall));
2252
+ for (const call of discardedCalls) {
2253
+ results.push({
2254
+ tool: call.tool,
2255
+ success: false,
2256
+ error: "Maximum of 10 tools allowed in batch"
2257
+ });
2258
+ }
2259
+ const successfulCalls = results.filter((r) => r.success).length;
2260
+ const failedCalls = results.length - successfulCalls;
2261
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2262
+
2263
+ Keep using the batch tool for optimal performance in your next response!`;
2264
+ return {
2265
+ success: failedCalls === 0,
2266
+ message: outputMessage,
2267
+ totalCalls: results.length,
2268
+ successful: successfulCalls,
2269
+ failed: failedCalls,
2270
+ results
2271
+ };
2272
+ };
2198
2273
 
2199
2274
  // src/server.ts
2200
2275
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2217,7 +2292,8 @@ var toolExecutors = {
2217
2292
  listDirectory: list,
2218
2293
  readFile: read_file,
2219
2294
  stringReplace: apply_patch,
2220
- runTerminalCommand
2295
+ runTerminalCommand,
2296
+ batch: batchTool
2221
2297
  };
2222
2298
  function connectToServer(serverUrl = DEFAULT_SERVER_URL) {
2223
2299
  const tokens = getTokens();
package/dist/server.cjs CHANGED
@@ -2206,6 +2206,81 @@ var connectToUserStreams = async (serverUrl) => {
2206
2206
  });
2207
2207
  return ws;
2208
2208
  };
2209
+ var toolCallSchema = zod.z.object({
2210
+ tool: zod.z.string().describe("The name of the tool to execute"),
2211
+ parameters: zod.z.record(zod.z.string(), zod.z.unknown()).describe("Parameters for the tool")
2212
+ });
2213
+ zod.z.object({
2214
+ tool_calls: zod.z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2215
+ });
2216
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2217
+ var batchableToolExecutors = {
2218
+ deleteFile,
2219
+ grep: grepTool,
2220
+ glob: globTool,
2221
+ listDirectory: list,
2222
+ readFile: read_file,
2223
+ runTerminalCommand
2224
+ };
2225
+ var batchTool = async function(input, projectCwd) {
2226
+ const { tool_calls } = input;
2227
+ const callsToExecute = tool_calls.slice(0, 10);
2228
+ const discardedCalls = tool_calls.slice(10);
2229
+ const executeCall = async (call) => {
2230
+ try {
2231
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2232
+ return {
2233
+ tool: call.tool,
2234
+ success: false,
2235
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2236
+ };
2237
+ }
2238
+ const executor = batchableToolExecutors[call.tool];
2239
+ if (!executor) {
2240
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2241
+ return {
2242
+ tool: call.tool,
2243
+ success: false,
2244
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2245
+ };
2246
+ }
2247
+ const result = await executor(call.parameters, projectCwd);
2248
+ return {
2249
+ tool: call.tool,
2250
+ success: result.success !== false,
2251
+ // Treat undefined success as true
2252
+ result
2253
+ };
2254
+ } catch (error) {
2255
+ return {
2256
+ tool: call.tool,
2257
+ success: false,
2258
+ error: error.message || String(error)
2259
+ };
2260
+ }
2261
+ };
2262
+ const results = await Promise.all(callsToExecute.map(executeCall));
2263
+ for (const call of discardedCalls) {
2264
+ results.push({
2265
+ tool: call.tool,
2266
+ success: false,
2267
+ error: "Maximum of 10 tools allowed in batch"
2268
+ });
2269
+ }
2270
+ const successfulCalls = results.filter((r) => r.success).length;
2271
+ const failedCalls = results.length - successfulCalls;
2272
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2273
+
2274
+ Keep using the batch tool for optimal performance in your next response!`;
2275
+ return {
2276
+ success: failedCalls === 0,
2277
+ message: outputMessage,
2278
+ totalCalls: results.length,
2279
+ successful: successfulCalls,
2280
+ failed: failedCalls,
2281
+ results
2282
+ };
2283
+ };
2209
2284
 
2210
2285
  // src/server.ts
2211
2286
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2228,7 +2303,8 @@ var toolExecutors = {
2228
2303
  listDirectory: list,
2229
2304
  readFile: read_file,
2230
2305
  stringReplace: apply_patch,
2231
- runTerminalCommand
2306
+ runTerminalCommand,
2307
+ batch: batchTool
2232
2308
  };
2233
2309
  function getConnectionStatus(ws) {
2234
2310
  return ws.readyState === WebSocket2__default.default.CONNECTING ? "connecting" : ws.readyState === WebSocket2__default.default.OPEN ? "open" : ws.readyState === WebSocket2__default.default.CLOSING ? "closing" : "closed";
package/dist/server.js CHANGED
@@ -2195,6 +2195,81 @@ var connectToUserStreams = async (serverUrl) => {
2195
2195
  });
2196
2196
  return ws;
2197
2197
  };
2198
+ var toolCallSchema = z.object({
2199
+ tool: z.string().describe("The name of the tool to execute"),
2200
+ parameters: z.record(z.string(), z.unknown()).describe("Parameters for the tool")
2201
+ });
2202
+ z.object({
2203
+ tool_calls: z.array(toolCallSchema).min(1, "Provide at least one tool call").max(10, "Maximum of 10 tools allowed in batch").describe("Array of tool calls to execute in parallel")
2204
+ });
2205
+ var DISALLOWED_TOOLS = /* @__PURE__ */ new Set(["batch"]);
2206
+ var batchableToolExecutors = {
2207
+ deleteFile,
2208
+ grep: grepTool,
2209
+ glob: globTool,
2210
+ listDirectory: list,
2211
+ readFile: read_file,
2212
+ runTerminalCommand
2213
+ };
2214
+ var batchTool = async function(input, projectCwd) {
2215
+ const { tool_calls } = input;
2216
+ const callsToExecute = tool_calls.slice(0, 10);
2217
+ const discardedCalls = tool_calls.slice(10);
2218
+ const executeCall = async (call) => {
2219
+ try {
2220
+ if (DISALLOWED_TOOLS.has(call.tool)) {
2221
+ return {
2222
+ tool: call.tool,
2223
+ success: false,
2224
+ error: `Tool '${call.tool}' is not allowed in batch. Disallowed tools: ${Array.from(DISALLOWED_TOOLS).join(", ")}`
2225
+ };
2226
+ }
2227
+ const executor = batchableToolExecutors[call.tool];
2228
+ if (!executor) {
2229
+ const availableTools = Object.keys(batchableToolExecutors).join(", ");
2230
+ return {
2231
+ tool: call.tool,
2232
+ success: false,
2233
+ error: `Tool '${call.tool}' not found. Available tools for batching: ${availableTools}`
2234
+ };
2235
+ }
2236
+ const result = await executor(call.parameters, projectCwd);
2237
+ return {
2238
+ tool: call.tool,
2239
+ success: result.success !== false,
2240
+ // Treat undefined success as true
2241
+ result
2242
+ };
2243
+ } catch (error) {
2244
+ return {
2245
+ tool: call.tool,
2246
+ success: false,
2247
+ error: error.message || String(error)
2248
+ };
2249
+ }
2250
+ };
2251
+ const results = await Promise.all(callsToExecute.map(executeCall));
2252
+ for (const call of discardedCalls) {
2253
+ results.push({
2254
+ tool: call.tool,
2255
+ success: false,
2256
+ error: "Maximum of 10 tools allowed in batch"
2257
+ });
2258
+ }
2259
+ const successfulCalls = results.filter((r) => r.success).length;
2260
+ const failedCalls = results.length - successfulCalls;
2261
+ const outputMessage = failedCalls > 0 ? `Executed ${successfulCalls}/${results.length} tools successfully. ${failedCalls} failed.` : `All ${successfulCalls} tools executed successfully.
2262
+
2263
+ Keep using the batch tool for optimal performance in your next response!`;
2264
+ return {
2265
+ success: failedCalls === 0,
2266
+ message: outputMessage,
2267
+ totalCalls: results.length,
2268
+ successful: successfulCalls,
2269
+ failed: failedCalls,
2270
+ results
2271
+ };
2272
+ };
2198
2273
 
2199
2274
  // src/server.ts
2200
2275
  var INITIAL_RECONNECT_DELAY2 = 1e3;
@@ -2217,7 +2292,8 @@ var toolExecutors = {
2217
2292
  listDirectory: list,
2218
2293
  readFile: read_file,
2219
2294
  stringReplace: apply_patch,
2220
- runTerminalCommand
2295
+ runTerminalCommand,
2296
+ batch: batchTool
2221
2297
  };
2222
2298
  function getConnectionStatus(ws) {
2223
2299
  return ws.readyState === WebSocket2.CONNECTING ? "connecting" : ws.readyState === WebSocket2.OPEN ? "open" : ws.readyState === WebSocket2.CLOSING ? "closing" : "closed";
package/package.json CHANGED
@@ -1,62 +1,62 @@
1
1
  {
2
- "name": "amai",
3
- "type": "module",
4
- "version": "0.0.11",
5
- "description": "ama cli",
6
- "keywords": [
7
- "ama",
8
- "cli",
9
- "agent",
10
- "local",
11
- "tools"
12
- ],
13
- "author": "",
14
- "license": "ISC",
15
- "repository": {
16
- "type": "git"
2
+ "name": "amai",
3
+ "type": "module",
4
+ "version": "0.0.12",
5
+ "description": "ama cli",
6
+ "keywords": [
7
+ "ama",
8
+ "cli",
9
+ "agent",
10
+ "local",
11
+ "tools"
12
+ ],
13
+ "author": "",
14
+ "license": "ISC",
15
+ "repository": {
16
+ "type": "git"
17
+ },
18
+ "prepare": "bun run build",
19
+ "bin": {
20
+ "amai": "./dist/cli.js"
21
+ },
22
+ "main": "./dist/cli.js",
23
+ "types": "./dist/cli.d.ts",
24
+ "exports": {
25
+ "./server": {
26
+ "types": "./dist/server.d.ts",
27
+ "import": "./dist/server.js",
28
+ "require": "./dist/server.cjs"
17
29
  },
18
- "prepare": "bun run build",
19
- "bin": {
20
- "amai": "./dist/cli.js"
21
- },
22
- "main": "./dist/cli.js",
23
- "types": "./dist/cli.d.ts",
24
- "exports": {
25
- "./server": {
26
- "types": "./dist/server.d.ts",
27
- "import": "./dist/server.js",
28
- "require": "./dist/server.cjs"
29
- },
30
- "./dist/*": "./dist/*.js",
31
- "./dist/*.js": "./dist/*.js"
32
- },
33
- "browser": "dist/client.global.js",
34
- "files": [
35
- "dist"
36
- ],
37
- "scripts": {
38
- "dev": "tsup --watch",
39
- "build": "rm -rf dist && NODE_ENV=production tsup",
40
- "prepublishOnly": "bun run build",
41
- "install-global": "bun run build && npm link || bun link"
42
- },
43
- "devDependencies": {
44
- "@types/bun": "latest",
45
- "@types/ws": "^8.18.1"
46
- },
47
- "peerDependencies": {
48
- "typescript": "^5"
49
- },
50
- "dependencies": {
51
- "@hono/node-server": "^1.19.7",
52
- "hono": "^4.10.7",
53
- "picocolors": "^1.1.1",
54
- "react-grab": "^0.0.74",
55
- "tsup": "^8.5.1",
56
- "ws": "^8.18.3",
57
- "zod": "^4.1.13"
58
- },
59
- "publishConfig": {
60
- "access": "public"
61
- }
62
- }
30
+ "./dist/*": "./dist/*.js",
31
+ "./dist/*.js": "./dist/*.js"
32
+ },
33
+ "browser": "dist/client.global.js",
34
+ "files": [
35
+ "dist"
36
+ ],
37
+ "scripts": {
38
+ "dev": "tsup --watch",
39
+ "build": "rm -rf dist && NODE_ENV=production tsup",
40
+ "prepublishOnly": "bun run build",
41
+ "install-global": "bun run build && npm link || bun link"
42
+ },
43
+ "devDependencies": {
44
+ "@types/bun": "latest",
45
+ "@types/ws": "^8.18.1"
46
+ },
47
+ "peerDependencies": {
48
+ "typescript": "^5"
49
+ },
50
+ "dependencies": {
51
+ "@hono/node-server": "^1.19.7",
52
+ "hono": "^4.10.7",
53
+ "picocolors": "^1.1.1",
54
+ "react-grab": "^0.0.74",
55
+ "tsup": "^8.5.1",
56
+ "ws": "^8.18.3",
57
+ "zod": "^4.1.13"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ }
62
+ }