@botbotgo/agent-harness 0.0.437 → 0.0.438
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,2 +1,2 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
2
|
-
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.438";
|
|
2
|
+
export declare const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
package/dist/package-version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
2
|
-
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.438";
|
|
2
|
+
export const AGENT_HARNESS_RELEASE_DATE = "2026-05-04";
|
|
@@ -486,7 +486,7 @@ function parseCompactRouterSelection(value, subagentNames) {
|
|
|
486
486
|
}
|
|
487
487
|
return null;
|
|
488
488
|
}
|
|
489
|
-
function buildCompactRouterPolicy(routingPolicy
|
|
489
|
+
function buildCompactRouterPolicy(routingPolicy) {
|
|
490
490
|
if (!routingPolicy) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
@@ -494,46 +494,10 @@ function buildCompactRouterPolicy(routingPolicy, subagentNames) {
|
|
|
494
494
|
.split(/\r?\n/u)
|
|
495
495
|
.map((line) => line.trim())
|
|
496
496
|
.filter((line) => line.length > 0);
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
const escaped = escapeRegExp(name);
|
|
502
|
-
return new RegExp(`(?:^|[^\\p{L}\\p{N}_-])\`?${escaped}\`?(?:$|[^\\p{L}\\p{N}_-])`, "iu");
|
|
503
|
-
});
|
|
504
|
-
for (const line of lines) {
|
|
505
|
-
const normalized = line.toLowerCase();
|
|
506
|
-
if (/^route by meaning\b/iu.test(line)) {
|
|
507
|
-
inRoutingBlock = true;
|
|
508
|
-
inDelegationBlock = false;
|
|
509
|
-
selected.push(line);
|
|
510
|
-
continue;
|
|
511
|
-
}
|
|
512
|
-
if (/^delegation rules\b/iu.test(line)) {
|
|
513
|
-
inRoutingBlock = false;
|
|
514
|
-
inDelegationBlock = true;
|
|
515
|
-
selected.push(line);
|
|
516
|
-
continue;
|
|
517
|
-
}
|
|
518
|
-
if (/^(output|role|rules|working style|tool rules)\b/iu.test(line)) {
|
|
519
|
-
inRoutingBlock = false;
|
|
520
|
-
inDelegationBlock = false;
|
|
521
|
-
}
|
|
522
|
-
const mentionsSubagent = subagentPatterns.some((pattern) => pattern.test(line));
|
|
523
|
-
const mentionsDelegationPrimitive = normalized.includes("task")
|
|
524
|
-
|| normalized.includes("delegate")
|
|
525
|
-
|| normalized.includes("delegating")
|
|
526
|
-
|| normalized.includes("委托")
|
|
527
|
-
|| normalized.includes("路由");
|
|
528
|
-
if (inRoutingBlock && mentionsSubagent) {
|
|
529
|
-
selected.push(line);
|
|
530
|
-
continue;
|
|
531
|
-
}
|
|
532
|
-
if (inDelegationBlock && (mentionsSubagent || mentionsDelegationPrimitive)) {
|
|
533
|
-
selected.push(line);
|
|
534
|
-
}
|
|
535
|
-
}
|
|
536
|
-
return selected.slice(0, 80).join("\n");
|
|
497
|
+
const outputContractIndex = lines.findIndex((line) => /^output:?$/iu.test(line));
|
|
498
|
+
return (outputContractIndex >= 0 ? lines.slice(0, outputContractIndex) : lines)
|
|
499
|
+
.slice(0, 80)
|
|
500
|
+
.join("\n");
|
|
537
501
|
}
|
|
538
502
|
function buildDelegatedOwnedTaskInstruction(input) {
|
|
539
503
|
const relevantPolicyLines = (input.routingPolicy ?? "")
|
|
@@ -1333,7 +1297,7 @@ export class AgentRuntimeAdapter {
|
|
|
1333
1297
|
.map((subagent) => `- ${subagent.name}: ${subagent.description}`)
|
|
1334
1298
|
.join("\n");
|
|
1335
1299
|
const routingPolicy = getBindingSystemPrompt(binding);
|
|
1336
|
-
const compactRoutingPolicy = buildCompactRouterPolicy(routingPolicy
|
|
1300
|
+
const compactRoutingPolicy = buildCompactRouterPolicy(routingPolicy);
|
|
1337
1301
|
const prompt = [
|
|
1338
1302
|
primaryModel.init?.think === false ? "/no_think" : "",
|
|
1339
1303
|
"You are selecting a subagent for a delegation-only agent.",
|
|
@@ -1689,7 +1653,7 @@ export class AgentRuntimeAdapter {
|
|
|
1689
1653
|
.map((subagent) => `- ${subagent.name}: ${subagent.description}`)
|
|
1690
1654
|
.join("\n");
|
|
1691
1655
|
const routingPolicy = getBindingSystemPrompt(binding);
|
|
1692
|
-
const compactRoutingPolicy = buildCompactRouterPolicy(routingPolicy
|
|
1656
|
+
const compactRoutingPolicy = buildCompactRouterPolicy(routingPolicy);
|
|
1693
1657
|
const prompt = [
|
|
1694
1658
|
primaryModel.init?.think === false ? "/no_think" : "",
|
|
1695
1659
|
"You are planning delegation for a delegation-only agent.",
|