@lazyingart/agintiflow 0.20.284 → 0.20.285
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.
|
|
3
|
+
"version": "0.20.285",
|
|
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",
|
|
@@ -180,6 +180,7 @@
|
|
|
180
180
|
"smoke:localllm-model-tiers": "node scripts/smoke-localllm-model-tiers.js",
|
|
181
181
|
"smoke:localllm-provider": "node scripts/smoke-localllm-provider.js",
|
|
182
182
|
"smoke:progressive-tools": "node scripts/smoke-progressive-tool-selection.js",
|
|
183
|
+
"smoke:scoped-artifact-research": "node scripts/smoke-scoped-artifact-research.js",
|
|
183
184
|
"smoke:truthful-completion": "node scripts/smoke-truthful-completion.js",
|
|
184
185
|
"smoke:document-artifact-quality": "node scripts/smoke-document-artifact-quality.js",
|
|
185
186
|
"smoke:writing-specialist-routing": "node scripts/smoke-writing-specialist-routing.js",
|
|
@@ -2440,11 +2440,10 @@ export function selectProgressiveTools(
|
|
|
2440
2440
|
|
|
2441
2441
|
if (config.scopedArtifactTask === true && config.scopedArtifactRoot) {
|
|
2442
2442
|
const available = new Map(enabled.map(({ name, tool }) => [name, tool]));
|
|
2443
|
-
|
|
2443
|
+
const scopedWorkspaceTools = [
|
|
2444
2444
|
constrainScopedArtifactPath(
|
|
2445
2445
|
available.get("list_files"),
|
|
2446
|
-
config.scopedArtifactRoot
|
|
2447
|
-
{ rootOnly: true }
|
|
2446
|
+
config.scopedArtifactRoot
|
|
2448
2447
|
),
|
|
2449
2448
|
constrainScopedArtifactPath(
|
|
2450
2449
|
available.get("read_file"),
|
|
@@ -2452,8 +2451,7 @@ export function selectProgressiveTools(
|
|
|
2452
2451
|
),
|
|
2453
2452
|
constrainScopedArtifactPath(
|
|
2454
2453
|
available.get("search_files"),
|
|
2455
|
-
config.scopedArtifactRoot
|
|
2456
|
-
{ rootOnly: true }
|
|
2454
|
+
config.scopedArtifactRoot
|
|
2457
2455
|
),
|
|
2458
2456
|
constrainScopedArtifactPath(
|
|
2459
2457
|
available.get("write_file"),
|
|
@@ -2464,8 +2462,40 @@ export function selectProgressiveTools(
|
|
|
2464
2462
|
config.scopedArtifactRoot
|
|
2465
2463
|
),
|
|
2466
2464
|
available.get("run_command"),
|
|
2467
|
-
finish,
|
|
2468
2465
|
].filter(Boolean);
|
|
2466
|
+
|
|
2467
|
+
// Artifact isolation limits where the task may read or write; it must not
|
|
2468
|
+
// erase the task's research, browser, or specialist capabilities. Keep
|
|
2469
|
+
// inferred non-file tools while the workspace tools remain root-scoped.
|
|
2470
|
+
const scopedWorkspaceToolNames = new Set(
|
|
2471
|
+
scopedWorkspaceTools.map((tool) => openAiFunctionName(tool)).filter(Boolean)
|
|
2472
|
+
);
|
|
2473
|
+
const taskSpecificTools = compactToolNames({ config, goal, profile, messages })
|
|
2474
|
+
.filter((name) => name !== "finish" && !FILE_TOOL_NAMES.has(name))
|
|
2475
|
+
.filter((name) => !scopedWorkspaceToolNames.has(name))
|
|
2476
|
+
.map((name) => available.get(name))
|
|
2477
|
+
.filter(Boolean);
|
|
2478
|
+
const requestedLimit = finitePositiveInteger(
|
|
2479
|
+
config.toolSurfaceMaxTools ?? config.localToolMaxTools,
|
|
2480
|
+
DEFAULT_LOCAL_TOOL_LIMIT
|
|
2481
|
+
);
|
|
2482
|
+
const toolLimit = Math.min(requestedLimit, LOCAL_TOOL_HARD_CAP);
|
|
2483
|
+
const taskSpecificLimit = Math.max(
|
|
2484
|
+
0,
|
|
2485
|
+
toolLimit - scopedWorkspaceTools.length - 1
|
|
2486
|
+
);
|
|
2487
|
+
const selected = [];
|
|
2488
|
+
const seen = new Set();
|
|
2489
|
+
for (const tool of [
|
|
2490
|
+
...taskSpecificTools.slice(0, taskSpecificLimit),
|
|
2491
|
+
...scopedWorkspaceTools,
|
|
2492
|
+
]) {
|
|
2493
|
+
const name = openAiFunctionName(tool);
|
|
2494
|
+
if (!name || name === "finish" || seen.has(name) || selected.length + 1 >= toolLimit) continue;
|
|
2495
|
+
seen.add(name);
|
|
2496
|
+
selected.push(tool);
|
|
2497
|
+
}
|
|
2498
|
+
return [...selected, finish];
|
|
2469
2499
|
}
|
|
2470
2500
|
|
|
2471
2501
|
if (config.repositoryGroundingRequired === true) {
|