MCPcopy Index your code
hub / github.com/AI45Lab/Code / create

Method create

sdk/node/src/lib.rs:2812–2822  ·  view source on GitHub ↗
(config_source: String)

Source from the content-addressed store, hash-verified

2810 /// @param configSource - Path to a config file (.acl), or inline config string
2811 #[napi(factory)]
2812 pub async fn create(config_source: String) -> napi::Result<Self> {
2813 let agent = get_runtime()
2814 .spawn(async move { RustAgent::new(config_source).await })
2815 .await
2816 .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))?
2817 .map_err(|e| napi::Error::from_reason(format!("Failed to create agent: {e}")))?;
2818
2819 Ok(Self {
2820 inner: Arc::new(agent),
2821 })
2822 }
2823
2824 /// Re-fetch tool definitions from all connected global MCP servers and
2825 /// update the agent-level cache.

Callers 15

test.mjsFile · 0.45
test_serve.mjsFile · 0.45
ptc_soak.mjsFile · 0.45
ultracode_test.mjsFile · 0.45
mainFunction · 0.45
mainFunction · 0.45
testEngineControlMethod · 0.45

Calls 2

get_runtimeFunction · 0.70
spawnMethod · 0.45

Tested by 8

mainFunction · 0.36
mainFunction · 0.36
mainFunction · 0.36
test_basic_chartFunction · 0.36
test_data_file_chartFunction · 0.36
test_multiple_chartsFunction · 0.36
test_explicit_skill_callFunction · 0.36