@wrongstack/tools 0.268.0 → 0.269.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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/batch-tool-use.ts"],"names":[],"mappings":";AAyBO,IAAM,gBAAA,GAAgE;AAAA,EAC3E,IAAA,EAAM,gBAAA;AAAA,EACN,QAAA,EAAU,MAAA;AAAA,EACV,WAAA,EACE,8GAAA;AAAA,EACF,SAAA,EACE,qWAAA;AAAA,EAKF,UAAA,EAAY,SAAA;AAAA,EACZ,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,YAAA,EAAc,CAAC,iBAAiB,CAAA;AAAA,EAChC,IAAA,EAAM,MAAA;AAAA,EACN,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,QAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACV,KAAA,EAAO;AAAA,QACL,IAAA,EAAM,OAAA;AAAA,QACN,KAAA,EAAO;AAAA,UACL,IAAA,EAAM,QAAA;AAAA,UACN,UAAA,EAAY;AAAA,YACV,IAAA,EAAM,EAAE,IAAA,EAAM,QAAA,EAAS;AAAA,YACvB,KAAA,EAAO,EAAE,IAAA,EAAM,QAAA;AAAS,WAC1B;AAAA,UACA,QAAA,EAAU,CAAC,MAAM;AAAA,SACnB;AAAA,QACA,WAAA,EAAa;AAAA,OACf;AAAA,MACA,aAAA,EAAe;AAAA,QACb,IAAA,EAAM,SAAA;AAAA,QACN,WAAA,EAAa;AAAA,OACf;AAAA,MACA,QAAA,EAAU;AAAA,QACR,IAAA,EAAM,SAAA;AAAA,QACN,WAAA,EAAa;AAAA;AACf,KACF;AAAA,IACA,QAAA,EAAU,CAAC,OAAO;AAAA,GACpB;AAAA,EACA,MAAM,OAAA,CAAQ,KAAA,EAAO,GAAA,EAAK,IAAA,EAAM;AAC9B,IAAA,IAAI,CAAC,KAAA,EAAO,KAAA,IAAS,KAAA,CAAM,KA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,EACF;AACF","file":"batch-tool-use.js","sourcesContent":["import type { Tool } from '@wrongstack/core';\n\ninterface BatchToolUseInput {\n calls: {\n tool: string;\n input: Record<string, unknown>;\n }[];\n stop_on_error?: boolean | undefined;\n parallel?: boolean | undefined;\n}\n\ninterface BatchToolUseOutput {\n results: {\n tool: string;\n success: boolean;\n result?: unknown | undefined;\n error?: string | undefined;\n executionMs: number;\n }[];\n total: number;\n succeeded: number;\n failed: number;\n stop_on_error: boolean;\n}\n\nexport const batchToolUseTool: Tool<BatchToolUseInput, BatchToolUseOutput> = {\n name: 'batch_tool_use',\n category: 'Meta',\n description:\n 'Execute a batch of tool calls either sequentially or in parallel. Returns structured results for every call.',\n usageHint:\n 'ADVANCED / POWER USER TOOL:\\n\\n' +\n '- Useful when you have a clear list of independent operations to perform.\\n' +\n '- `parallel: true` (default) runs them concurrently for speed.\\n' +\n '- `stop_on_error: true` makes it fail fast on the first error.\\n' +\n 'Use with care — batching many mutating operations can be risky. Prefer explicit sequential steps for important work.',\n permission: 'confirm',\n mutating: true,\n timeoutMs: 120_000,\n capabilities: ['tool.mutate.any'],\n icon: 'meta',\n inputSchema: {\n type: 'object',\n properties: {\n calls: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n tool: { type: 'string' },\n input: { type: 'object' },\n },\n required: ['tool'],\n },\n description: 'Array of tool calls to execute',\n },\n stop_on_error: {\n type: 'boolean',\n description: 'Stop execution on first error (default: false)',\n },\n parallel: {\n type: 'boolean',\n description: 'Execute calls in parallel (default: true)',\n },\n },\n required: ['calls'],\n },\n async execute(input, ctx, opts) {\n if (!input?.calls || input.calls.length === 0) {\n return {\n results: [],\n total: 0,\n succeeded: 0,\n failed: 0,\n stop_on_error: false,\n };\n }\n\n const results: BatchToolUseOutput['results'] = [];\n let succeeded = 0;\n let failed = 0;\n\n if (input.parallel !== false) {\n const promises = input.calls.map(async (call) => executeSingle(call, ctx, opts));\n const allResults = await Promise.all(promises);\n results.push(...allResults);\n succeeded = allResults.filter((r) => r.success).length;\n failed = allResults.filter((r) => !r.success).length;\n } else {\n for (const call of input.calls) {\n const result = await executeSingle(call, ctx, opts ?? { signal: undefined as unknown as AbortSignal });\n results.push(result);\n if (result.success) {\n succeeded++;\n } else {\n failed++;\n if (input.stop_on_error) break;\n }\n }\n }\n\n return {\n results,\n total: input.calls.length,\n succeeded,\n failed,\n stop_on_error: input.stop_on_error ?? false,\n };\n },\n};\n\nasync function executeSingle(\n call: { tool: string; input: Record<string, unknown> },\n ctx: import('@wrongstack/core').Context,\n opts: { signal: AbortSignal },\n): Promise<BatchToolUseOutput['results'][0]> {\n const start = Date.now();\n const tool = ctx.tools.find((t: Tool) => t.name === call.tool);\n\n if (!tool) {\n return {\n tool: call.tool,\n success: false,\n error: `tool \"${call.tool}\" not found`,\n executionMs: Date.now() - start,\n };\n }\n\n try {\n const result = await tool.execute(call.input, ctx, opts);\n return {\n tool: call.tool,\n success: true,\n result,\n executionMs: Date.now() - start,\n };\n } catch (e) {\n return {\n tool: call.tool,\n success: false,\n error: e instanceof Error ? e.message : String(e),\n executionMs: Date.now() - start,\n };\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/batch-tool-use.ts"],"names":[],"mappings":";AAyBO,IAAM,gBAAA,GAAgE;AAAA,EAC3E,IAAA,EAAM,gBAAA;AAAA,EACN,QAAA,EAAU,MAAA;AAAA,EACV,WAAA,EACE,8GAAA;AAAA,EACF,SAAA,EACE,qWAAA;AAAA,EAKF,UAAA,EAAY,SAAA;AAAA,EACZ,QAAA,EAAU,IAAA;AAAA,EACV,SAAA,EAAW,IAAA;AAAA,EACX,YAAA,EAAc,CAAC,iBAAiB,CAAA;AAAA,EAChC,IAAA,EAAM,MAAA;AAAA,EACN,WAAA,EAAa;AAAA,IACX,IAAA,EAAM,QAAA;AAAA,IACN,UAAA,EAAY;AAAA,MACV,KAAA,EAAO;AAAA,QACL,IAAA,EAAM,OAAA;AAAA,QACN,KAAA,EAAO;AAAA,UACL,IAAA,EAAM,QAAA;AAA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AI;AAAA,KAC5B;AAAA,EACF;AAEA,EAAA,IAAI;AACF,IAAA,MAAM,SAAS,MAAM,IAAA,CAAK,QAAQ,IAAA,CAAK,KAAA,EAAO,KAAK,IAAI,CAAA;AACvD,IAAA,OAAO;AAAA,MACL,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,OAAA,EAAS,IAAA;AAAA,MACT,MAAA;AAAA,MACA,WAAA,EAAa,IAAA,CAAK,GAAA,EAAI,GAAI;AAAA,KAC5B;AAAA,EACF,SAAS,CAAA,EAAG;AACV,IAAA,OAAO;AAAA,MACL,MAAM,IAAA,CAAK,IAAA;AAAA,MACX,OAAA,EAAS,KAAA;AAAA,MACT,OAAO,CAAA,YAAa,KAAA,GAAQ,CAAA,CAAE,OAAA,GAAU,OAAO,CAAC,CAAA;AAAA,MAChD,WAAA,EAAa,IAAA,CAAK,GAAA,EAAI,GAAI;AAAA,KAC5B;AAAA,EACF;AACF","file":"batch-tool-use.js","sourcesContent":["import type { Tool } from '@wrongstack/core';\n\ninterface BatchToolUseInput {\n calls: {\n tool: string;\n input: Record<string, unknown>;\n }[];\n stop_on_error?: boolean | undefined;\n parallel?: boolean | undefined;\n}\n\ninterface BatchToolUseOutput {\n results: {\n tool: string;\n success: boolean;\n result?: unknown | undefined;\n error?: string | undefined;\n executionMs: number;\n }[];\n total: number;\n succeeded: number;\n failed: number;\n stop_on_error: boolean;\n}\n\nexport const batchToolUseTool: Tool<BatchToolUseInput, BatchToolUseOutput> = {\n name: 'batch_tool_use',\n category: 'Meta',\n description:\n 'Execute a batch of tool calls either sequentially or in parallel. Returns structured results for every call.',\n usageHint:\n 'ADVANCED / POWER USER TOOL:\\n\\n' +\n '- Useful when you have a clear list of independent operations to perform.\\n' +\n '- `parallel: true` (default) runs them concurrently for speed.\\n' +\n '- `stop_on_error: true` makes it fail fast on the first error.\\n' +\n 'Use with care — batching many mutating operations can be risky. Prefer explicit sequential steps for important work.',\n permission: 'confirm',\n mutating: true,\n timeoutMs: 120_000,\n capabilities: ['tool.mutate.any'],\n icon: 'meta',\n inputSchema: {\n type: 'object',\n properties: {\n calls: {\n type: 'array',\n items: {\n type: 'object',\n properties: {\n tool: { type: 'string' },\n input: { type: 'object' },\n },\n required: ['tool'],\n },\n description: 'Array of tool calls to execute',\n },\n stop_on_error: {\n type: 'boolean',\n description: 'Stop execution on first error (default: false)',\n },\n parallel: {\n type: 'boolean',\n description: 'Execute calls in parallel (default: true)',\n },\n },\n required: ['calls'],\n },\n async execute(input, ctx, opts) {\n if (!input?.calls || input.calls.length === 0) {\n return {\n results: [],\n total: 0,\n succeeded: 0,\n failed: 0,\n stop_on_error: false,\n };\n }\n\n const results: BatchToolUseOutput['results'] = [];\n let succeeded = 0;\n let failed = 0;\n\n if (input.parallel !== false) {\n const promises = input.calls.map(async (call) => executeSingle(call, ctx, opts));\n const allResults = await Promise.all(promises);\n results.push(...allResults);\n succeeded = allResults.filter((r) => r.success).length;\n failed = allResults.filter((r) => !r.success).length;\n } else {\n for (const call of input.calls) {\n const result = await executeSingle(call, ctx, opts ?? { signal: undefined as never as AbortSignal });\n results.push(result);\n if (result.success) {\n succeeded++;\n } else {\n failed++;\n if (input.stop_on_error) break;\n }\n }\n }\n\n return {\n results,\n total: input.calls.length,\n succeeded,\n failed,\n stop_on_error: input.stop_on_error ?? false,\n };\n },\n};\n\nasync function executeSingle(\n call: { tool: string; input: Record<string, unknown> },\n ctx: import('@wrongstack/core').Context,\n opts: { signal: AbortSignal },\n): Promise<BatchToolUseOutput['results'][0]> {\n const start = Date.now();\n const tool = ctx.tools.find((t: Tool) => t.name === call.tool);\n\n if (!tool) {\n return {\n tool: call.tool,\n success: false,\n error: `tool \"${call.tool}\" not found`,\n executionMs: Date.now() - start,\n };\n }\n\n try {\n const result = await tool.execute(call.input, ctx, opts);\n return {\n tool: call.tool,\n success: true,\n result,\n executionMs: Date.now() - start,\n };\n } catch (e) {\n return {\n tool: call.tool,\n success: false,\n error: e instanceof Error ? e.message : String(e),\n executionMs: Date.now() - start,\n };\n }\n}\n"]}
package/dist/builtin.js CHANGED
@@ -1813,7 +1813,7 @@ var IndexStore = class {
1813
1813
  throw new LockError(`SQLite lock conflict after ${MAX_LOCK_RETRIES} retries: ${msg}`);
1814
1814
  }
1815
1815
  const delay = Math.min(
1816
- LOCK_RETRY_BASE_DELAY_MS * Math.pow(2, attempt),
1816
+ LOCK_RETRY_BASE_DELAY_MS * 2 ** attempt,
1817
1817
  LOCK_RETRY_MAX_DELAY_MS
1818
1818
  );
1819
1819
  sleepSync(delay);
@@ -2106,14 +2106,15 @@ var IndexStore = class {
2106
2106
  if (!query2.trim()) {
2107
2107
  return { results: candidates.slice(0, limit), total: candidates.length };
2108
2108
  }
2109
+ const candidateById = new Map(candidates.map((c) => [c.id, c]));
2109
2110
  const bm25 = buildBm25Index(
2110
2111
  candidates.map((c) => ({ id: c.id, text: buildIndexableText(c.name, c.signature, c.docComment) }))
2111
2112
  );
2112
- const scored = bm25.score(query2, (id) => candidates.some((c) => c.id === id));
2113
+ const scored = bm25.score(query2, (id) => candidateById.has(id));
2113
2114
  scored.sort((a, b) => b.score - a.score);
2114
2115
  const qTokens = tokenise(query2);
2115
2116
  const results = scored.slice(0, limit).map(({ id, score }) => {
2116
- const c = expectDefined(candidates.find((cand) => cand.id === id));
2117
+ const c = expectDefined(candidateById.get(id));
2117
2118
  return { ...c, score, snippet: bm25.extractSnippet(id, qTokens) };
2118
2119
  });
2119
2120
  return { results, total: candidates.length };
@@ -3685,6 +3686,10 @@ async function runIndexerWithStore(store, opts) {
3685
3686
  if (!stat11.isFile()) return { file, stat: stat11, lang: "", parsed: null };
3686
3687
  const lang = detectLang(file);
3687
3688
  if (!lang) return { file, stat: stat11, lang: "", parsed: null };
3689
+ const meta = existingMeta.get(file);
3690
+ if (!force && meta && meta.mtimeMs === Math.floor(stat11.mtimeMs)) {
3691
+ return { file, stat: stat11, lang, parsed: null, skippedMeta: meta };
3692
+ }
3688
3693
  let content;
3689
3694
  try {
3690
3695
  content = await fs14.readFile(file, { encoding: "utf8", signal });
@@ -3717,6 +3722,12 @@ async function runIndexerWithStore(store, opts) {
3717
3722
  continue;
3718
3723
  }
3719
3724
  const { stat: stat11, lang, parsed } = result;
3725
+ if (result.skippedMeta) {
3726
+ langStats[lang] = (langStats[lang] ?? 0) + result.skippedMeta.symbolCount;
3727
+ symbolsIndexed += result.skippedMeta.symbolCount;
3728
+ filesIndexed++;
3729
+ continue;
3730
+ }
3720
3731
  if (!lang || !parsed) {
3721
3732
  if (lang) {
3722
3733
  store.upsertFile({ file, lang, mtimeMs: Math.floor(stat11.mtimeMs), symbolCount: 0, lastIndexed: Date.now() });
@@ -3724,13 +3735,6 @@ async function runIndexerWithStore(store, opts) {
3724
3735
  }
3725
3736
  continue;
3726
3737
  }
3727
- const meta = existingMeta.get(file);
3728
- if (!force && meta && meta.mtimeMs === Math.floor(stat11.mtimeMs)) {
3729
- langStats[lang] = (langStats[lang] ?? 0) + meta.symbolCount;
3730
- symbolsIndexed += meta.symbolCount;
3731
- filesIndexed++;
3732
- continue;
3733
- }
3734
3738
  store.deleteRefsForFile(file);
3735
3739
  store.deleteSymbolsForFile(file);
3736
3740
  if (parsed.symbols.length === 0) {