@standardagents/builder 0.11.8 → 0.11.10
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 -3
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +21 -21
- package/dist/client/vendor.js +1 -1
- package/dist/client/vue.js +1 -1
- package/dist/index.d.ts +5 -0
- package/dist/index.js +60 -17
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/built-in-routes.js
CHANGED
|
@@ -4791,6 +4791,7 @@ var init_FlowEngine = __esm({
|
|
|
4791
4791
|
messageHistory: [],
|
|
4792
4792
|
sequence: stateInput.sequence || {
|
|
4793
4793
|
queue: [],
|
|
4794
|
+
queuedTools: [],
|
|
4794
4795
|
isHandling: false
|
|
4795
4796
|
},
|
|
4796
4797
|
active: stateInput.active || {
|
|
@@ -4921,8 +4922,24 @@ var init_FlowEngine = __esm({
|
|
|
4921
4922
|
);
|
|
4922
4923
|
return !hasExistingResult;
|
|
4923
4924
|
});
|
|
4924
|
-
if (toolsToExecute && toolsToExecute.length > 0) {
|
|
4925
|
-
await ToolExecutor.executeSequence(state, toolsToExecute);
|
|
4925
|
+
if (toolsToExecute && toolsToExecute.length > 0 || state.sequence.queue.length > 0) {
|
|
4926
|
+
await ToolExecutor.executeSequence(state, toolsToExecute || []);
|
|
4927
|
+
}
|
|
4928
|
+
if (state.sequence.queuedTools.length > 0 && state.currentLogId) {
|
|
4929
|
+
const queuedToolsJson = JSON.stringify(state.sequence.queuedTools);
|
|
4930
|
+
await state.storage.sql.exec(
|
|
4931
|
+
`UPDATE logs SET queued_tools = ?1 WHERE id = ?2`,
|
|
4932
|
+
queuedToolsJson,
|
|
4933
|
+
state.currentLogId
|
|
4934
|
+
);
|
|
4935
|
+
if (state.emitLog) {
|
|
4936
|
+
state.emitLog({
|
|
4937
|
+
type: "log_queued_tools",
|
|
4938
|
+
log_id: state.currentLogId,
|
|
4939
|
+
queued_tools: queuedToolsJson
|
|
4940
|
+
});
|
|
4941
|
+
}
|
|
4942
|
+
state.sequence.queuedTools = [];
|
|
4926
4943
|
}
|
|
4927
4944
|
if (await state.thread.instance.shouldStop() || state.abortController?.signal.aborted) {
|
|
4928
4945
|
throw new Error("aborted");
|
|
@@ -6763,9 +6780,12 @@ function queueTool(flow, toolName, args = {}) {
|
|
|
6763
6780
|
name: toolName,
|
|
6764
6781
|
arguments: JSON.stringify(args)
|
|
6765
6782
|
},
|
|
6766
|
-
forceAllow: true
|
|
6783
|
+
forceAllow: true,
|
|
6784
|
+
queued_at: Date.now() * 1e3
|
|
6785
|
+
// Microseconds to match other timestamps
|
|
6767
6786
|
};
|
|
6768
6787
|
flow.sequence.queue.push(toolCall);
|
|
6788
|
+
flow.sequence.queuedTools.push(toolCall);
|
|
6769
6789
|
}
|
|
6770
6790
|
async function injectMessage(flow, options) {
|
|
6771
6791
|
const messageId = options.id ?? crypto.randomUUID();
|