@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/runtime.js
CHANGED
|
@@ -7807,6 +7807,25 @@ This usually points to something I can't fix from here \u2014 for example the wo
|
|
|
7807
7807
|
return null;
|
|
7808
7808
|
}
|
|
7809
7809
|
}
|
|
7810
|
+
/**
|
|
7811
|
+
* Registry entries the model may see (and therefore manage). Hidden
|
|
7812
|
+
* subagent relationships (`SubagentToolConfig.hidden` — infrastructure
|
|
7813
|
+
* children like background compaction) are excluded from the injected
|
|
7814
|
+
* "Active subagent instances" message: a listed instance reads as the
|
|
7815
|
+
* model's to clean up, and terminate_subagent on an infrastructure child
|
|
7816
|
+
* kills work the runtime depends on. Static and pure for direct testing.
|
|
7817
|
+
*/
|
|
7818
|
+
static filterModelVisibleSubagents(registry, promptTools) {
|
|
7819
|
+
if (registry.length === 0) return registry;
|
|
7820
|
+
const hidden = /* @__PURE__ */ new Set();
|
|
7821
|
+
for (const config of promptTools ?? []) {
|
|
7822
|
+
if (typeof config === "object" && config !== null && "name" in config && config.hidden === true) {
|
|
7823
|
+
hidden.add(config.name);
|
|
7824
|
+
}
|
|
7825
|
+
}
|
|
7826
|
+
if (hidden.size === 0) return registry;
|
|
7827
|
+
return registry.filter((entry) => !hidden.has(entry.name));
|
|
7828
|
+
}
|
|
7810
7829
|
static async getSubagentRegistry(state) {
|
|
7811
7830
|
if (typeof state.thread.instance.getChildrenRegistry === "function") {
|
|
7812
7831
|
try {
|
|
@@ -8065,7 +8084,10 @@ ${msg.content}` : `${imageDescriptions}${nonImageList}`;
|
|
|
8065
8084
|
});
|
|
8066
8085
|
}
|
|
8067
8086
|
}
|
|
8068
|
-
const subagentRegistry =
|
|
8087
|
+
const subagentRegistry = _FlowEngine.filterModelVisibleSubagents(
|
|
8088
|
+
await this.getSubagentRegistry(state),
|
|
8089
|
+
state.prompt?._tools
|
|
8090
|
+
);
|
|
8069
8091
|
if (subagentRegistry.length > 0) {
|
|
8070
8092
|
const fallbackNameMap = await this.resolveRegistryThreadNameMap(state, subagentRegistry);
|
|
8071
8093
|
const lines = subagentRegistry.map((entry) => {
|