@standardagents/builder 0.25.6 → 0.25.7
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/built-in-routes.js +23 -1
- package/dist/built-in-routes.js.map +1 -1
- package/dist/index.js +23 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime.js +23 -1
- package/dist/runtime.js.map +1 -1
- package/package.json +5 -5
package/dist/built-in-routes.js
CHANGED
|
@@ -7726,6 +7726,25 @@ This usually points to something I can't fix from here \u2014 for example the wo
|
|
|
7726
7726
|
return null;
|
|
7727
7727
|
}
|
|
7728
7728
|
}
|
|
7729
|
+
/**
|
|
7730
|
+
* Registry entries the model may see (and therefore manage). Hidden
|
|
7731
|
+
* subagent relationships (`SubagentToolConfig.hidden` — infrastructure
|
|
7732
|
+
* children like background compaction) are excluded from the injected
|
|
7733
|
+
* "Active subagent instances" message: a listed instance reads as the
|
|
7734
|
+
* model's to clean up, and terminate_subagent on an infrastructure child
|
|
7735
|
+
* kills work the runtime depends on. Static and pure for direct testing.
|
|
7736
|
+
*/
|
|
7737
|
+
static filterModelVisibleSubagents(registry, promptTools) {
|
|
7738
|
+
if (registry.length === 0) return registry;
|
|
7739
|
+
const hidden = /* @__PURE__ */ new Set();
|
|
7740
|
+
for (const config of promptTools ?? []) {
|
|
7741
|
+
if (typeof config === "object" && config !== null && "name" in config && config.hidden === true) {
|
|
7742
|
+
hidden.add(config.name);
|
|
7743
|
+
}
|
|
7744
|
+
}
|
|
7745
|
+
if (hidden.size === 0) return registry;
|
|
7746
|
+
return registry.filter((entry) => !hidden.has(entry.name));
|
|
7747
|
+
}
|
|
7729
7748
|
static async getSubagentRegistry(state) {
|
|
7730
7749
|
if (typeof state.thread.instance.getChildrenRegistry === "function") {
|
|
7731
7750
|
try {
|
|
@@ -7984,7 +8003,10 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
|
|
|
7984
8003
|
});
|
|
7985
8004
|
}
|
|
7986
8005
|
}
|
|
7987
|
-
const subagentRegistry =
|
|
8006
|
+
const subagentRegistry = _FlowEngine.filterModelVisibleSubagents(
|
|
8007
|
+
await this.getSubagentRegistry(state),
|
|
8008
|
+
state.prompt?._tools
|
|
8009
|
+
);
|
|
7988
8010
|
if (subagentRegistry.length > 0) {
|
|
7989
8011
|
const fallbackNameMap = await this.resolveRegistryThreadNameMap(state, subagentRegistry);
|
|
7990
8012
|
const lines = subagentRegistry.map((entry) => {
|