75fb752a82
New package @united-workforce/agent-mock (uwf-mock CLI):
- Reads pre-scripted outputs from a YAML mock data file (--mock-data)
- Counts existing CAS chain steps to determine step index
- Validates expected role matches actual moderator routing
- Stores minimal detail node in CAS for valid step refs
- Zero LLM, instant execution, 100% deterministic
Usage in config.yaml:
agents:
mock:
command: uwf-mock
args: ["--mock-data", "./fixtures/scenario.yaml"]
Refs #33
19 lines
560 B
JavaScript
19 lines
560 B
JavaScript
#!/usr/bin/env node
|
|
|
|
import { createMockAgent } from "./mock-agent.js";
|
|
|
|
const USAGE = "usage: uwf-mock --mock-data <path> --thread <id> --role <role> --prompt <text>";
|
|
|
|
function getMockDataPath(argv: string[]): string {
|
|
const idx = argv.indexOf("--mock-data");
|
|
if (idx === -1 || idx + 1 >= argv.length || argv[idx + 1] === "") {
|
|
process.stderr.write(`--mock-data is required. ${USAGE}\n`);
|
|
process.exit(1);
|
|
}
|
|
return argv[idx + 1];
|
|
}
|
|
|
|
const mockDataPath = getMockDataPath(process.argv);
|
|
const main = createMockAgent(mockDataPath);
|
|
void main();
|