@standardagents/builder 0.12.1 → 0.12.2
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 +28 -35
- package/dist/built-in-routes.js.map +1 -1
- package/dist/client/assets/index.css +1 -1
- package/dist/client/index.js +27 -27
- package/dist/index.d.ts +17 -0
- package/dist/index.js +31 -35
- package/dist/index.js.map +1 -1
- package/dist/plugin.js +4 -0
- package/dist/plugin.js.map +1 -1
- package/package.json +4 -4
package/dist/built-in-routes.js
CHANGED
|
@@ -4697,7 +4697,7 @@ var init_FlowEngine = __esm({
|
|
|
4697
4697
|
init_ToolExecutor();
|
|
4698
4698
|
init_context();
|
|
4699
4699
|
init_ThreadStateImpl();
|
|
4700
|
-
FlowEngine = class {
|
|
4700
|
+
FlowEngine = class _FlowEngine {
|
|
4701
4701
|
/**
|
|
4702
4702
|
* Main execution entry point
|
|
4703
4703
|
* Executes an agent conversation until stopped or max steps reached
|
|
@@ -4832,6 +4832,30 @@ var init_FlowEngine = __esm({
|
|
|
4832
4832
|
}
|
|
4833
4833
|
await state.stream.close();
|
|
4834
4834
|
}
|
|
4835
|
+
/**
|
|
4836
|
+
* Convert a PromptDefinition (from definePrompt) to PromptData (runtime format).
|
|
4837
|
+
*/
|
|
4838
|
+
static convertPromptDefinition(id, def) {
|
|
4839
|
+
return {
|
|
4840
|
+
id,
|
|
4841
|
+
name: def.name,
|
|
4842
|
+
tool_description: def.toolDescription,
|
|
4843
|
+
prompt: def.prompt,
|
|
4844
|
+
model: def.model,
|
|
4845
|
+
include_chat: def.includeChat ?? false,
|
|
4846
|
+
include_past_tools: def.includePastTools ?? false,
|
|
4847
|
+
parallel_tool_calls: def.parallelToolCalls ?? false,
|
|
4848
|
+
tool_choice: def.toolChoice ?? "auto",
|
|
4849
|
+
reasoning_effort: def.reasoning?.effort ?? null,
|
|
4850
|
+
reasoning_max_tokens: def.reasoning?.maxTokens ?? null,
|
|
4851
|
+
reasoning_exclude: def.reasoning?.exclude ?? false,
|
|
4852
|
+
include_reasoning: def.reasoning?.include ?? false,
|
|
4853
|
+
recentImageThreshold: def.recentImageThreshold ?? null,
|
|
4854
|
+
_tools: def.tools ?? [],
|
|
4855
|
+
_requiredSchema: def.requiredSchema ?? null,
|
|
4856
|
+
_hooks: def.hooks ?? []
|
|
4857
|
+
};
|
|
4858
|
+
}
|
|
4835
4859
|
/**
|
|
4836
4860
|
* Load prompts from TypeScript configs via virtual modules.
|
|
4837
4861
|
*
|
|
@@ -4849,23 +4873,7 @@ var init_FlowEngine = __esm({
|
|
|
4849
4873
|
if (sideAPromptDef.tools?.length) {
|
|
4850
4874
|
console.log(`[FlowEngine] Prompt tools: [${sideAPromptDef.tools.map((t) => typeof t === "string" ? t : t.name).join(", ")}]`);
|
|
4851
4875
|
}
|
|
4852
|
-
const sideAPrompt =
|
|
4853
|
-
id: sideAPromptName,
|
|
4854
|
-
name: sideAPromptDef.name,
|
|
4855
|
-
tool_description: sideAPromptDef.toolDescription,
|
|
4856
|
-
prompt: sideAPromptDef.prompt,
|
|
4857
|
-
model: sideAPromptDef.model,
|
|
4858
|
-
include_chat: sideAPromptDef.includeChat ?? false,
|
|
4859
|
-
include_past_tools: sideAPromptDef.includePastTools ?? false,
|
|
4860
|
-
parallel_tool_calls: sideAPromptDef.parallelToolCalls ?? false,
|
|
4861
|
-
tool_choice: sideAPromptDef.toolChoice ?? "auto",
|
|
4862
|
-
reasoning_effort: sideAPromptDef.reasoning?.effort ?? null,
|
|
4863
|
-
reasoning_max_tokens: sideAPromptDef.reasoning?.maxTokens ?? null,
|
|
4864
|
-
reasoning_exclude: sideAPromptDef.reasoning?.exclude ?? false,
|
|
4865
|
-
include_reasoning: sideAPromptDef.reasoning?.include ?? false,
|
|
4866
|
-
_tools: sideAPromptDef.tools ?? [],
|
|
4867
|
-
_requiredSchema: sideAPromptDef.requiredSchema ?? null
|
|
4868
|
-
};
|
|
4876
|
+
const sideAPrompt = _FlowEngine.convertPromptDefinition(sideAPromptName, sideAPromptDef);
|
|
4869
4877
|
let sideBPrompt = null;
|
|
4870
4878
|
const sideBPromptName = agentConfig.side_b_agent_prompt;
|
|
4871
4879
|
if (sideBPromptName) {
|
|
@@ -4875,23 +4883,7 @@ var init_FlowEngine = __esm({
|
|
|
4875
4883
|
if (sideBPromptDef.tools?.length) {
|
|
4876
4884
|
console.log(`[FlowEngine] Prompt tools: [${sideBPromptDef.tools.map((t) => typeof t === "string" ? t : t.name).join(", ")}]`);
|
|
4877
4885
|
}
|
|
4878
|
-
sideBPrompt =
|
|
4879
|
-
id: sideBPromptName,
|
|
4880
|
-
name: sideBPromptDef.name,
|
|
4881
|
-
tool_description: sideBPromptDef.toolDescription,
|
|
4882
|
-
prompt: sideBPromptDef.prompt,
|
|
4883
|
-
model: sideBPromptDef.model,
|
|
4884
|
-
include_chat: sideBPromptDef.includeChat ?? false,
|
|
4885
|
-
include_past_tools: sideBPromptDef.includePastTools ?? false,
|
|
4886
|
-
parallel_tool_calls: sideBPromptDef.parallelToolCalls ?? false,
|
|
4887
|
-
tool_choice: sideBPromptDef.toolChoice ?? "auto",
|
|
4888
|
-
reasoning_effort: sideBPromptDef.reasoning?.effort ?? null,
|
|
4889
|
-
reasoning_max_tokens: sideBPromptDef.reasoning?.maxTokens ?? null,
|
|
4890
|
-
reasoning_exclude: sideBPromptDef.reasoning?.exclude ?? false,
|
|
4891
|
-
include_reasoning: sideBPromptDef.reasoning?.include ?? false,
|
|
4892
|
-
_tools: sideBPromptDef.tools ?? [],
|
|
4893
|
-
_requiredSchema: sideBPromptDef.requiredSchema ?? null
|
|
4894
|
-
};
|
|
4886
|
+
sideBPrompt = _FlowEngine.convertPromptDefinition(sideBPromptName, sideBPromptDef);
|
|
4895
4887
|
}
|
|
4896
4888
|
return { agentConfig, sideAPrompt, sideBPrompt };
|
|
4897
4889
|
}
|
|
@@ -25113,6 +25105,7 @@ var name_get_default3 = defineController(async ({ params, prompts, models, model
|
|
|
25113
25105
|
tool_choice: definition.toolChoice || "auto",
|
|
25114
25106
|
tools,
|
|
25115
25107
|
reasoning: definition.reasoning || null,
|
|
25108
|
+
hooks: definition.hooks || [],
|
|
25116
25109
|
created_at: Math.floor(Date.now() / 1e3)
|
|
25117
25110
|
};
|
|
25118
25111
|
return Response.json({ prompt });
|