()
| 6338 | |
| 6339 | #[test] |
| 6340 | fn program_options_normalize_to_script_tool_contract() { |
| 6341 | let args = normalize_program_script_options(serde_json::json!({ |
| 6342 | "source": "async function run(ctx, inputs) { return inputs; }", |
| 6343 | "inputs": { "needle": "auth" }, |
| 6344 | "allowedTools": ["grep", "read"], |
| 6345 | "limits": { "maxToolCalls": 4 } |
| 6346 | })) |
| 6347 | .unwrap(); |
| 6348 | |
| 6349 | assert_eq!(args["type"], "script"); |
| 6350 | assert_eq!(args["language"], "javascript"); |
| 6351 | assert_eq!(args["allowed_tools"], serde_json::json!(["grep", "read"])); |
| 6352 | assert_eq!(args["inputs"]["needle"], "auth"); |
| 6353 | } |
| 6354 | |
| 6355 | #[test] |
| 6356 | fn delegate_task_options_use_core_task_schema() { |
nothing calls this directly
no test coverage detected