MCPcopy Create free account

hub / github.com/Louisym/MiniCC / functions

Functions1,659 in github.com/Louisym/MiniCC

↓ 483 callersMethodexpect
(&mut self, expected: char)
rust/crates/runtime/src/json.rs:289
↓ 285 callersMethodappend
(self, entry: str)
src/transcript.py:11
↓ 222 callersMethodpush
(&mut self, renderer: &TerminalRenderer, delta: &str)
rust/crates/rusty-claude-cli/src/render.rs:606
↓ 112 callersMethodget
(&self, key: &str)
rust/crates/runtime/src/config.rs:270
↓ 64 callersFunctionexecute_tool
(name: &str, input: &Value)
rust/crates/tools/src/lib.rs:383
↓ 63 callersMethodrun
(self, user_input: str)
tutorials/18_design_patterns_for_agents.py:221
↓ 62 callersMethodget
获取配置值
tutorials/09_config_system.py:243
↓ 53 callersMethodpush
(&mut self, chunk: &[u8])
rust/crates/api/src/sse.rs:15
↓ 49 callersMethodas_str
(&self)
rust/crates/runtime/src/json.rs:91
↓ 34 callersMethodnext
(&mut self)
rust/crates/runtime/src/json.rs:320
↓ 24 callersMethodget
(self, key: str)
mini_claude_code/config.py:174
↓ 19 callersMethodbuild
(&self)
rust/crates/runtime/src/prompt.rs:134
↓ 18 callersFunctionto_pretty_json
(value: T)
rust/crates/tools/src/lib.rs:506
↓ 17 callersMethodas_object
(&self)
rust/crates/runtime/src/json.rs:75
↓ 14 callersMethodflush
(&mut self, renderer: &TerminalRenderer)
rust/crates/rusty-claude-cli/src/render.rs:615
↓ 14 callersFunctiontemp_dir
()
rust/crates/runtime/src/config.rs:804
↓ 13 callersMethodload
(&self)
rust/crates/runtime/src/config.rs:214
↓ 11 callersMethodadd
(self, title: str, detail: str)
src/history.py:16
↓ 11 callersMethodas_array
(&self)
rust/crates/runtime/src/json.rs:83
↓ 11 callersFunctioncleanup_script
(script_path: &Path)
rust/crates/runtime/src/mcp_stdio.rs:1146
↓ 11 callersMethodcolor_theme
(&self)
rust/crates/rusty-claude-cli/src/render.rs:246
↓ 11 callersFunctionenv_lock
()
rust/crates/tools/src/lib.rs:2913
↓ 11 callersMethodrun_turn
( &mut self, user_input: impl Into<String>, mut prompter: Option<&mut dyn PermissionPr
rust/crates/runtime/src/conversation.rs:170
↓ 10 callersMethodenv
(&mut self, key: K, value: V)
rust/crates/runtime/src/hooks.rs:273
↓ 10 callersFunctionenv_lock
()
rust/crates/api/src/client.rs:621
↓ 10 callersFunctiontemp_path
(name: &str)
rust/crates/tools/src/lib.rs:2918
↓ 9 callersMethodappend_raw
(&mut self, output: &mut String, text: &str)
rust/crates/rusty-claude-cli/src/render.rs:201
↓ 9 callersFunctionbuild_runtime
( session: Session, model: String, system_prompt: Vec<String>, enable_tools: bool, emit_ou
rust/crates/rusty-claude-cli/src/main.rs:2318
↓ 9 callersFunctionexpect_string
( object: &'a BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:659
↓ 9 callersFunctionread_env_non_empty
(key: &str)
rust/crates/api/src/client.rs:486
↓ 9 callersMethodregister
注册一个工具: 名字 → 处理函数
tutorials/18_design_patterns_for_agents.py:639
↓ 9 callersMethodsend
发送消息到目标 Agent 的收件箱。 真实实现中有锁文件保护(防止并发写入冲突)。 简化版直接写文件。 对应 Reference: EP08 §2 多个 Claude 实例可以并发写入 ——
tutorials/13_multi_agent_coordination.py:197
↓ 9 callersMethoduser_text
(text: str)
tutorials/12_session_persistence.py:182
↓ 9 callersMethodwith_base_url
(mut self, base_url: impl Into<String>)
rust/crates/api/src/client.rs:174
↓ 9 callersMethodwrite_all
(&mut self, bytes: &[u8])
rust/crates/runtime/src/mcp_stdio.rs:607
↓ 8 callersMethodadd
(self, section: str)
tutorials/18_design_patterns_for_agents.py:917
↓ 8 callersMethodas_str
(self)
mini_claude_code/permissions.py:39
↓ 8 callersMethodas_str
(self)
tutorials/15_permission_and_hook_pipeline.py:57
↓ 8 callersMethodassistant_text
(text: str)
tutorials/12_session_persistence.py:189
↓ 8 callersFunctionsave_oauth_credentials
(token_set: &OAuthTokenSet)
rust/crates/runtime/src/oauth.rs:276
↓ 8 callersMethodwait
(&mut self)
rust/crates/runtime/src/mcp_stdio.rs:755
↓ 8 callersMethodwith_tool_requirement
( mut self, tool_name: impl Into<String>, required_mode: PermissionMode, )
rust/crates/runtime/src/permissions.rs:65
↓ 7 callersMethodauthorize
判断某个工具是否可以执行。 核心逻辑(和 Claude Code 源码一致): 1. 如果是 "allow" 模式 → 直接允许 2. 如果当前权限 >= 需要的权限 → 允许 3. 如果当前权限不够但可以询问 →
tutorials/04_permission_system.py:172
↓ 7 callersFunctionclear_oauth_credentials
()
rust/crates/runtime/src/oauth.rs:287
↓ 7 callersMethodload
加载并合并所有配置。 算法: 1. 遍历所有可能的配置文件路径 2. 跳过不存在的文件 3. 读取存在的文件(JSON) 4. 按优先级深度合并 对应源码: config.rs:21
tutorials/09_config_system.py:122
↓ 7 callersFunctionmin
(a, b)
tutorials/11_error_recovery_and_retry.py:208
↓ 7 callersFunctionmvp_tool_specs
()
rust/crates/tools/src/lib.rs:60
↓ 7 callersFunctionoptional_string
( object: &'a BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:670
↓ 7 callersMethodpersist_session
(&self)
rust/crates/rusty-claude-cli/src/main.rs:1227
↓ 7 callersFunctionrequired_string
( object: &BTreeMap<String, JsonValue>, key: &str, )
rust/crates/runtime/src/session.rs:360
↓ 7 callersMethodsession
(&self)
rust/crates/runtime/src/conversation.rs:301
↓ 7 callersMethodskip_whitespace
(&mut self)
rust/crates/runtime/src/json.rs:310
↓ 7 callersFunctiontemp_dir
()
rust/crates/runtime/src/prompt.rs:504
↓ 6 callersFunction_truncate
截断文本 — 源码 compact.rs:317-323
tutorials/16_prompt_building_and_compaction.py:556
↓ 6 callersMethodcall_tool
( &mut self, qualified_tool_name: &str, arguments: Option<JsonValue>, )
rust/crates/runtime/src/mcp_stdio.rs:433
↓ 6 callersFunctioncompact_session
(session: &Session, config: CompactionConfig)
rust/crates/runtime/src/compact.rs:75
↓ 6 callersMethodcumulative_usage
(&self)
rust/crates/runtime/src/usage.rs:201
↓ 6 callersMethodexecute
执行一个工具。 参数: tool_name: 工具名称 input_json: 参数(JSON 字符串) 返回: (输出结果, 是否出错)
tutorials/03_tool_system.py:284
↓ 6 callersFunctionexpect_object
( value: &'a JsonValue, context: &str, )
rust/crates/runtime/src/config.rs:650
↓ 6 callersFunctionextract_tool_path
(parsed: &serde_json::Value)
rust/crates/rusty-claude-cli/src/main.rs:2710
↓ 6 callersFunctionmanager_server_config
( script_path: &Path, label: &str, log_path: &Path, )
rust/crates/runtime/src/mcp_stdio.rs:1151
↓ 6 callersFunctionpersist_agent_terminal_state
( manifest: &AgentOutput, status: &str, result: Option<&str>, error: Option<String>, )
rust/crates/tools/src/lib.rs:1599
↓ 6 callersFunctionprepend_bullets
(items: Vec<String>)
rust/crates/runtime/src/prompt.rs:188
↓ 6 callersMethodserver_mut
( &mut self, server_name: &str, )
rust/crates/runtime/src/mcp_stdio.rs:490
↓ 6 callersFunctionstrip_ansi
(input: &str)
rust/crates/rusty-claude-cli/src/render.rs:671
↓ 6 callersFunctiontruncate_summary
源码: compact.rs:317-324
mini_claude_code/compact.py:98
↓ 6 callersMethodwith_tool_requirement
链式注册工具权限需求。源码: permissions.rs:65-73 用法: policy = (PermissionPolicy(PermissionMode.WORKSPACE_WRITE) .with_tool_req
mini_claude_code/permissions.py:124
↓ 6 callersMethodwith_tool_requirement
设置某个工具需要的权限等级。 链式调用:policy.with_tool_requirement("bash", DANGER).with_tool_requirement("read", READ)
tutorials/04_permission_system.py:159
↓ 5 callersMethod_session_path
生成会话文件路径。 对应 Reference: EP09 §1 ~/.claude/projects/{sanitized_cwd}/{session-id}.jsonl
tutorials/12_session_persistence.py:298
↓ 5 callersFunctionallowed_tools_for_subagent
(subagent_type: &str)
rust/crates/tools/src/lib.rs:1503
↓ 5 callersMethodas_markdown
(self)
src/setup.py:38
↓ 5 callersMethodas_text
(self)
src/direct_modes.py:12
↓ 5 callersMethodauthorize
核心授权逻辑 — 源码 permissions.rs:89-134 这是整个权限系统最关键的函数。决策逻辑: 1. Allow 模式 → 直接放行(最危险) 2. 当前模式 >= 所需模式 → 放行 例如: Workspace
tutorials/15_permission_and_hook_pipeline.py:148
↓ 5 callersFunctioncanonical_tool_token
(value: &str)
rust/crates/tools/src/lib.rs:2029
↓ 5 callersFunctionexecute_agent_with_spawn
(input: AgentInput, spawn_fn: F)
rust/crates/tools/src/lib.rs:1347
↓ 5 callersMethodflush
(self)
src/transcript.py:22
↓ 5 callersMethodmarkdown_to_ansi
(&self, markdown: &str)
rust/crates/rusty-claude-cli/src/render.rs:273
↓ 5 callersFunctionmcp_tool_name
(server_name: &str, tool_name: &str)
rust/crates/runtime/src/mcp.rs:31
↓ 5 callersFunctionoptional_string_array
( object: &BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:719
↓ 5 callersFunctionparse_frame
(frame: &str)
rust/crates/api/src/sse.rs:63
↓ 5 callersMethodpeek
(&self)
rust/crates/runtime/src/json.rs:316
↓ 5 callersMethodprocess_messages
处理收件箱中的消息。 对应 Reference: EP08 §1 Worker 的生命周期:接收任务 → 执行 → 汇报
tutorials/13_multi_agent_coordination.py:291
↓ 5 callersFunctionpush_output_block
( block: OutputContentBlock, out: &mut (impl Write + ?Sized), events: &mut Vec<AssistantEvent>,
rust/crates/rusty-claude-cli/src/main.rs:2968
↓ 5 callersFunctionread_base_url
()
rust/crates/api/src/client.rs:511
↓ 5 callersFunctionremainder_after_command
(input: &str, command: &str)
rust/crates/commands/src/lib.rs:291
↓ 5 callersMethodrender_markdown
(&self, markdown: &str)
rust/crates/rusty-claude-cli/src/render.rs:251
↓ 5 callersMethodrequest
( &mut self, id: JsonRpcId, method: impl Into<String>, params: Option<TParams>
rust/crates/runtime/src/mcp_stdio.rs:700
↓ 5 callersMethodrun_pre_tool_use
运行所有 PreToolUse hook。 如果任何一个 hook 返回"拒绝",工具就不会被执行。
tutorials/08_hook_system.py:127
↓ 5 callersMethodrun_turn
(&mut self, input: &str)
rust/crates/rusty-claude-cli/src/main.rs:1053
↓ 5 callersMethodsend_message
( &self, request: &MessageRequest, )
rust/crates/api/src/client.rs:197
↓ 5 callersMethodsession
源码: conversation.rs:301-303
mini_claude_code/runtime.py:495
↓ 5 callersMethodshutdown
(&mut self)
rust/crates/runtime/src/mcp_stdio.rs:472
↓ 5 callersMethodstderr
(&mut self, cfg: std::process::Stdio)
rust/crates/runtime/src/hooks.rs:268
↓ 5 callersMethodstdout
(&mut self, cfg: std::process::Stdio)
rust/crates/runtime/src/hooks.rs:263
↓ 5 callersFunctiontemp_config_home
()
rust/crates/api/src/client.rs:628
↓ 5 callersMethodtick
( &mut self, label: &str, theme: &ColorTheme, out: &mut impl Write, )
rust/crates/rusty-claude-cli/src/render.rs:60
↓ 5 callersMethodtry_consume
(&mut self, expected: char)
rust/crates/runtime/src/json.rs:301
↓ 5 callersMethodwith_tool_requirement
注册工具的权限需求 — 源码 permissions.rs:64-73
tutorials/15_permission_and_hook_pipeline.py:127
↓ 5 callersFunctionwrite_manager_mcp_server_script
()
rust/crates/runtime/src/mcp_stdio.rs:1023
↓ 4 callersMethod_persist_terminal_state
更新 manifest 终态 + 追加输出文件。源码: lib.rs:1599-1614 CC 的做法: 1. 先追加输出文件 (结果或错误信息) 2. 再更新 manifest (status + completed_at + error)
mini_claude_code/multi_agent.py:376
next →1–100 of 1,659, ranked by callers