MCPcopy Create free account
hub / github.com/AI45Lab/Code / program_options_normalize_to_script_tool_contract

Function program_options_normalize_to_script_tool_contract

sdk/node/src/lib.rs:6340–6353  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected