@lazyingart/agintiflow 0.20.262 → 0.20.263

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazyingart/agintiflow",
3
- "version": "0.20.262",
3
+ "version": "0.20.263",
4
4
  "type": "module",
5
5
  "description": "AgInTiFlow is a project-aware agent workspace for hybrid wet-dry R&D, hardware-aware intelligence, software automation, and industrial workflows.",
6
6
  "license": "Apache-2.0",
@@ -200,6 +200,21 @@ async function main() {
200
200
  )) === JSON.stringify({ type: "function", function: { name: "apply_patch" } }),
201
201
  "DeepSeek constrained recovery relied on a prompt phrase instead of the offered tool contract"
202
202
  );
203
+ assert(
204
+ JSON.stringify(toolChoiceForProvider(
205
+ {
206
+ provider: "deepseek",
207
+ testFailureRepairActive: true,
208
+ testFailureRepairMutationRequired: true,
209
+ },
210
+ [{ role: "user", content: "Continue from the retained failing test evidence." }],
211
+ [
212
+ { type: "function", function: { name: "apply_patch" } },
213
+ { type: "function", function: { name: "finish" } },
214
+ ]
215
+ )) === JSON.stringify({ type: "function", function: { name: "apply_patch" } }),
216
+ "DeepSeek failed-test repair did not force its sole bounded mutation tool"
217
+ );
203
218
  assert(
204
219
  toolChoiceForProvider(
205
220
  { provider: "deepseek" },
@@ -360,11 +360,18 @@ function singleExecutableToolName(tools = []) {
360
360
  : "";
361
361
  }
362
362
 
363
+ function deepSeekConstrainedActionRequired(config = {}, messages = []) {
364
+ return requiresConcreteToolContinuation(messages) ||
365
+ config.completionFreshMutationRequired === true ||
366
+ (
367
+ config.testFailureRepairActive === true &&
368
+ config.testFailureRepairMutationRequired === true
369
+ );
370
+ }
371
+
363
372
  function deepSeekActionOnlyTool(config = {}, messages = [], tools = []) {
364
373
  if (normalizeProviderId(config.provider, "") !== "deepseek") return "";
365
- const constrainedRecovery = config.completionFreshMutationRequired === true ||
366
- requiresConcreteToolContinuation(messages);
367
- if (!constrainedRecovery) return "";
374
+ if (!deepSeekConstrainedActionRequired(config, messages)) return "";
368
375
  const constrainedTool = singleExecutableToolName(tools);
369
376
  if (constrainedTool) return constrainedTool;
370
377
  const actionable = (Array.isArray(tools) ? tools : [])
@@ -378,7 +385,7 @@ function deepSeekActionOnlyRequest(config = {}, messages = [], tools = []) {
378
385
  return normalizeProviderId(config.provider, "") === "deepseek" &&
379
386
  Boolean(
380
387
  requiresConcreteToolContinuation(messages) ||
381
- (config.completionFreshMutationRequired === true && singleExecutableToolName(tools))
388
+ (deepSeekConstrainedActionRequired(config, messages) && singleExecutableToolName(tools))
382
389
  );
383
390
  }
384
391