@triggerlink/sdk 0.4.7 → 0.4.8
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/agent.js +2 -3
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -88,8 +88,7 @@ export function createAgent(opts) {
|
|
|
88
88
|
}
|
|
89
89
|
registry.set(agent.name, agent);
|
|
90
90
|
const redact = opts.redact;
|
|
91
|
-
const llmStepId = `agent/${agent.name}
|
|
92
|
-
const toolStepId = `agent/${agent.name}/tool`;
|
|
91
|
+
const llmStepId = `agent/${agent.name}`;
|
|
93
92
|
const messages = [{ role: "user", content: input }];
|
|
94
93
|
const usage = { inputTokens: 0, outputTokens: 0 };
|
|
95
94
|
const toolCalls = [];
|
|
@@ -142,7 +141,7 @@ export function createAgent(opts) {
|
|
|
142
141
|
if (!def) {
|
|
143
142
|
throw new Error(`agent "${agent.name}": model called unknown tool "${call.toolName}"`);
|
|
144
143
|
}
|
|
145
|
-
const output = await step.run(
|
|
144
|
+
const output = await step.run(`agent/${agent.name}/${call.toolName}`, async () => {
|
|
146
145
|
const out = await def.handler(def.parameters.parse(call.input));
|
|
147
146
|
return redact
|
|
148
147
|
? redact(out, { kind: "tool", iteration: i, toolName: call.toolName })
|