feat: add @uncaged/workflow-agent-builtin package
Built-in role agent that uses workflow config models directly, with its own tool-calling run loop. No external agent dependency. - OpenAI-compatible chat completion client with tool_calls support - P0 toolkit: read_file, write_file, run_command - Integrates via createAgent factory from workflow-agent-kit - CAS detail recording for each turn - Path sandboxing and shell opt-in (UWF_BUILTIN_ALLOW_SHELL)
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { describe, expect, test } from "bun:test";
|
||||
|
||||
import type { LlmToolCall } from "../src/llm/types.js";
|
||||
|
||||
/** Mirror OpenAI response shape for parser coverage via chatCompletionWithTools integration later. */
|
||||
describe("LlmToolCall shape", () => {
|
||||
test("tool call record fields", () => {
|
||||
const call: LlmToolCall = {
|
||||
id: "call_1",
|
||||
name: "read_file",
|
||||
arguments: '{"path":"README.md"}',
|
||||
};
|
||||
expect(call.name).toBe("read_file");
|
||||
expect(JSON.parse(call.arguments)).toEqual({ path: "README.md" });
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user