MCPcopy Create free account

hub / github.com/canwhite/AgentEval / functions

Functions112 in github.com/canwhite/AgentEval

↓ 7 callersFunctionis_safe_session_id
(s: &str)
src/web/mod.rs:200
↓ 7 callersFunctionresolve_path
Resolve a tool argument path relative to the source project directory. Returns an error if the path contains `..` or resolves outside the source dir.
src/probe/tools.rs:15
↓ 5 callersMethodbuild
(&self)
src/eval/mod.rs:216
↓ 5 callersFunctionrun
( mut rx: UnboundedReceiver<TurnRecord>, log_dir: String, jsonl_stem: String, grader_config: G
src/eval/mod.rs:15
↓ 4 callersMethodregister
(&mut self, tool: Box<dyn Tool>)
src/probe/tool.rs:23
↓ 3 callersFunctionextract_json_block
从 LLM 输出中提取 JSON(可能被 ```json ... ``` 包裹)
src/grader/judge.rs:66
↓ 3 callersFunctionextract_json_block
Extract a JSON block from text that may be wrapped in markdown fences.
src/probe/mod.rs:153
↓ 3 callersFunctionparse_probe_output
Parse the LLM's raw output into a ProbeReport. Tries strict JSON parsing first, then falls back to extracting a JSON block from markdown-wrapped outp
src/probe/mod.rs:118
↓ 3 callersFunctionread_existing
Read an existing .probe.json.
src/probe/mod.rs:106
↓ 3 callersFunctionrun_pipeline
运行完整的 grading pipeline: 1. 规则统计 → MetricsSnapshot 2. LLM 评审 → task_completion + response_quality 3. 汇总加权 → GradeReport
src/grader/mod.rs:16
↓ 3 callersFunctionwrite_json_file
(path: &str, value: &impl serde::Serialize)
src/eval/mod.rs:284
↓ 2 callersFunctionbody_to_json
(body: &[u8])
src/proxy.rs:220
↓ 2 callersFunctionbuild_with_id
(builder: &SessionBuilder, session_id: &str)
src/eval/mod.rs:256
↓ 2 callersFunctioncommon_prefix_len
(prev: &[Value], current: &[Value])
src/eval/mod.rs:238
↓ 2 callersFunctionextract_text_content
从 message value 提取可读文本(content 可能是 string 或 array)
src/format/openai.rs:249
↓ 2 callersFunctionheaders_to_value
(headers: &HeaderMap)
src/proxy.rs:210
↓ 2 callersFunctionparse_request_messages
从 request body 提取 messages 数组
src/format/openai.rs:6
↓ 2 callersFunctionread_diagnose_summary
(log_dir: &str, session_id: &str)
src/web/mod.rs:204
↓ 2 callersFunctionread_probe_summary
(log_dir: &str, session_id: &str)
src/web/mod.rs:216
↓ 2 callersFunctionwrite_grade_json
(report: &grader::types::GradeReport, log_dir: &str)
src/eval/mod.rs:279
↓ 2 callersFunctionwrite_view_final
(view: &SessionView, log_dir: &str)
src/eval/mod.rs:274
↓ 1 callersMethodas_openai_tools
Return the tool definitions in OpenAI function-calling JSON format.
src/probe/tool.rs:36
↓ 1 callersFunctionbuild_judge_prompt
构造完整的 LLM 评审 prompt
src/grader/prompt.rs:67
↓ 1 callersFunctionbuild_system_prompt
Build the system prompt that defines the probe agent's role and methodology.
src/probe/prompt.rs:10
↓ 1 callersFunctionbuild_user_prompt
Build the user prompt: diagnose issues (JSON) + session summary (compact text).
src/probe/prompt.rs:15
↓ 1 callersFunctioncalc_performance
性能评分(0.0~1.0)
src/grader/rules.rs:110
↓ 1 callersFunctioncalc_tool_efficiency
工具效率评分(0.0~1.0)
src/grader/rules.rs:82
↓ 1 callersMethodcall
(&self, args: Value)
src/probe/tools.rs:87
↓ 1 callersMethodchat
( &self, messages: &[Message], tools: &Value, )
src/probe/backend.rs:31
↓ 1 callersFunctiondiff_messages
(prev: &[Value], current: &'a [Value])
src/eval/mod.rs:229
↓ 1 callersMethoddispatch
(&self, name: &str, args: Value)
src/probe/tool.rs:27
↓ 1 callersFunctionextract_content
Extract text content from a message value (content may be string or array of blocks).
src/diagnose/rules.rs:617
↓ 1 callersFunctionextract_metrics
(view: &SessionView)
src/grader/rules.rs:4
↓ 1 callersFunctionextract_model
(body: &Value)
src/eval/mod.rs:249
↓ 1 callersFunctionformat_session
把 SessionView 格式化成 LLM 易读的会话摘要
src/grader/prompt.rs:5
↓ 1 callersFunctionformat_session_summary
Build a compact session summary from SessionView. - diagnose-marked turns are expanded with detail - normal turns get a one-line summary - large gaps
src/probe/prompt.rs:32
↓ 1 callersMethodhas_tool_calls
(&self)
src/probe/types.rs:123
↓ 1 callersFunctionis_new_session
(prev: &[Value], current: &[Value])
src/eval/mod.rs:245
↓ 1 callersFunctionis_streaming_request
(body: &[u8])
src/proxy.rs:230
↓ 1 callersFunctionjudge
调用评测 LLM,返回 task_completion 和 response_quality 评分
src/grader/judge.rs:8
↓ 1 callersFunctionjudge_llm
( view: &SessionView, metrics: &types::MetricsSnapshot, config: &GraderConfig, )
src/grader/mod.rs:106
↓ 1 callersMethodname
(&self)
src/probe/tools.rs:65
↓ 1 callersFunctionnormalize_args
Normalize JSON arguments for comparison: parse + re-serialize with sorted keys.
src/diagnose/rules.rs:590
↓ 1 callersFunctionparse_json_response
(body: &str)
src/probe/types.rs:178
↓ 1 callersFunctionparse_llm_response
Convert an OpenAI chat completion response body into an LlmResponse. Handles both streaming (SSE) and non-streaming (JSON) responses.
src/probe/types.rs:170
↓ 1 callersFunctionparse_non_streaming
(body: &Value)
src/format/openai.rs:61
↓ 1 callersFunctionparse_response_steps
从 response body 提取 model 步骤 自动区分非流式(JSON)和流式(SSE 文本)响应。
src/format/openai.rs:16
↓ 1 callersFunctionparse_response_usage
从 response body 提取 usage 信息
src/format/openai.rs:25
↓ 1 callersFunctionparse_sse
(sse_text: &str)
src/format/openai.rs:143
↓ 1 callersFunctionparse_sse_response
(sse_text: &str)
src/probe/types.rs:235
↓ 1 callersMethodprocess
( &mut self, request_body: &Value, response_body: &Value, duration_ms: u64,
src/eval/mod.rs:128
↓ 1 callersFunctionprompt_bloat
System prompt content > 3000 chars.
src/diagnose/rules.rs:249
↓ 1 callersFunctionprompt_context_overflow
Signs of history truncation: tool role message with no matching tool_calls in preceding assistant messages within the same request.
src/diagnose/rules.rs:296
↓ 1 callersFunctionread_jsonl_entries
Read specific JSONL entries by their `id` fields.
src/diagnose/mod.rs:173
↓ 1 callersFunctionread_raw_jsonl
Read raw JSONL lines by IDs (for the raw JSONL API).
src/diagnose/mod.rs:209
↓ 1 callersMethodrun
Run the agent loop. Returns the final text content from the LLM (which should be the JSON probe report).
src/probe/agent.rs:48
↓ 1 callersFunctionrun_all
(view: &SessionView, jsonl_entries: &[JsonlEntry])
src/diagnose/rules.rs:18
↓ 1 callersFunctionrun_diagnose_cli
(args: &[String])
src/main.rs:82
↓ 1 callersFunctionrun_probe_cli
(args: &[String])
src/main.rs:158
↓ 1 callersFunctionseal_and_grade_bg
封口当前 session:立即写 view.json,后台 spawn 评分任务(不阻塞主循环)
src/eval/mod.rs:293
↓ 1 callersFunctionsse_has_content
Check if an SSE stream has any meaningful content (text or tool calls).
src/diagnose/rules.rs:430
↓ 1 callersFunctionsummarize_issues
Call the judge LLM to generate a 2-3 sentence summary of diagnose issues. Returns None if no API key is configured, there are no issues, or the LLM ca
src/diagnose/mod.rs:75
↓ 1 callersFunctiontimestamp_ms
()
src/proxy.rs:202
↓ 1 callersFunctiontoken_empty_response
response_body.choices empty or content empty (handles both SSE string and JSON object).
src/diagnose/rules.rs:363
↓ 1 callersFunctiontoken_excessive_input
input > 30000 AND output < 1000.
src/diagnose/rules.rs:519
↓ 1 callersFunctiontoken_waste
output/input < 2% AND input > 5000 tokens.
src/diagnose/rules.rs:474
↓ 1 callersFunctiontool_duplicate_3plus
Same name + same arguments called ≥ 3 times.
src/diagnose/rules.rs:137
↓ 1 callersFunctiontool_result_empty
tool_result.content is empty or whitespace-only.
src/diagnose/rules.rs:190
↓ 1 callersFunctiontool_result_error
tool_result.is_error == true.
src/diagnose/rules.rs:86
↓ 1 callersFunctiontool_result_missing
tool_call.result is None (not backfilled cross-turn).
src/diagnose/rules.rs:45
↓ 1 callersFunctionview_mismatch
Data integrity: turns.len() != jsonl_ids.len().
src/diagnose/rules.rs:558
↓ 1 callersFunctionwrite_view_json
(builder: &SessionBuilder, log_dir: &str)
src/eval/mod.rs:268
Functionaccepts_normal_path
()
src/probe/tools.rs:393
Methodassistant_with_tool_calls
(tool_calls: Vec<ToolCall>)
src/probe/types.rs:101
Methoddefault
()
src/probe/tool.rs:56
Methoddescription
(&self)
src/probe/tools.rs:69
Functiondiagnose_session
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:231
Methodfrom_issues
(issues: &[DiagnoseIssue])
src/diagnose/types.rs:22
Methodfrom_report
(report: &ProbeReport)
src/probe/types.rs:46
Functionget_diagnose
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:246
Functionget_probe
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:305
Functionget_raw_jsonl
( State(state): State<Arc<AppState>>, Path(jsonl_stem): Path<String>, axum::extract::Query(query):
src/web/mod.rs:265
Functionget_session
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:142
Functiongrade_session
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:168
Functionhandler
( State(state): State<std::sync::Arc<AppState>>, method: Method, uri: Uri, headers: HeaderMap,
src/proxy.rs:62
Functionlist_sessions
( State(state): State<Arc<AppState>>, )
src/web/mod.rs:64
Methodload
加载配置,优先从环境变量获取,如果没有则使用默认值
src/config.rs:16
Functionmain
()
src/main.rs:20
Methodnew
(config: &Config, eval_tx: tokio::sync::mpsc::UnboundedSender<TurnRecord>, grader_config: GraderConfig, probe_
src/proxy.rs:34
Methodnew
(session_id: String, model: String)
src/eval/mod.rs:116
Methodnew
(source_dir: &str)
src/probe/tools.rs:57
Methodnew
( backend: OpenAiBackend, tools: Registry, system_prompt: &str, user_prompt: &
src/probe/agent.rs:26
Methodnew
(api_base: &str, model: &str, api_key: &str)
src/probe/backend.rs:18
Methodnew
()
src/probe/tool.rs:19
Functionprobe_session
( State(state): State<Arc<AppState>>, Path(session_id): Path<String>, )
src/web/mod.rs:290
Functionread_existing
Read an existing .diagnose.json.
src/diagnose/mod.rs:65
Functionrejects_dotdot_in_middle
()
src/probe/tools.rs:386
Functionrejects_parent_traversal
()
src/probe/tools.rs:379
Functionrun
Run all diagnostic rules against a session. Reads `{log_dir}/{session_id}.view.json` and the corresponding `.jsonl`, runs all 10 rules, writes `{log_
src/diagnose/mod.rs:18
Functionrun
Run the probe agent against a session. 1. Read diagnose issues from .diagnose.json 2. Read session view from .view.json 3. Build system + user prompt
src/probe/mod.rs:29
next →1–100 of 112, ranked by callers