MCPcopy Create free account

hub / github.com/Louisym/MiniCC / functions

Functions1,659 in github.com/Louisym/MiniCC

↓ 4 callersMethodassign_task
给 Worker 分配任务。 关键:任务描述必须是自包含的! 不能说"根据之前的讨论去做",因为 Worker 不知道之前讨论了什么。 对应 Reference: EP03 §2 "协调者必须编写自包含的
tutorials/13_multi_agent_coordination.py:367
↓ 4 callersFunctionbackoff_for_attempt
计算第 N 次重试应该等多久(毫秒)。 对应源码: api/client.rs:325-336 fn backoff_for_attempt(&self, attempt: u32) -> Result<Duration, ApiError> {
tutorials/11_error_recovery_and_retry.py:187
↓ 4 callersMethodbase_url
(&self)
rust/crates/api/tests/client_integration.rs:287
↓ 4 callersFunctionbuild_port_manifest
(src_root: Path | None = None)
src/port_manifest.py:30
↓ 4 callersMethodcommands_path
(&self)
rust/crates/compat-harness/src/lib.rs:35
↓ 4 callersFunctioncost_for_tokens
(tokens: u32, usd_per_million_tokens: f64)
rust/crates/runtime/src/usage.rs:153
↓ 4 callersFunctioncredentials_path
()
rust/crates/runtime/src/oauth.rs:258
↓ 4 callersMethoddiscover_tools
(&mut self)
rust/crates/runtime/src/mcp_stdio.rs:359
↓ 4 callersMethodestimate_cost_usd_with_pricing
(self, pricing: ModelPricing)
rust/crates/runtime/src/usage.rs:94
↓ 4 callersFunctionestimate_session_tokens
估算整个对话的 token 数
tutorials/07_auto_compaction.py:123
↓ 4 callersMethodexecute
(self, tool_name: str, tool_input: str)
tutorials/18_design_patterns_for_agents.py:81
↓ 4 callersMethodfinish
( &mut self, label: &str, theme: &ColorTheme, out: &mut impl Write, )
rust/crates/rusty-claude-cli/src/render.rs:81
↓ 4 callersMethodfrom_workspace
(cls)
src/query_engine.py:46
↓ 4 callersFunctioninitialize_repo
(cwd: &Path)
rust/crates/rusty-claude-cli/src/init.rs:80
↓ 4 callersMethodis_denied
(self)
tutorials/15_permission_and_hook_pipeline.py:239
↓ 4 callersMethodis_denied
(self)
tutorials/19_process_and_pipe_communication.py:612
↓ 4 callersFunctionload_oauth_credentials
()
rust/crates/runtime/src/oauth.rs:262
↓ 4 callersFunctionload_system_prompt
( cwd: impl Into<PathBuf>, current_date: impl Into<String>, os_name: impl Into<String>, os_ver
rust/crates/runtime/src/prompt.rs:404
↓ 4 callersMethodloaded_entries
(&self)
rust/crates/runtime/src/config.rs:265
↓ 4 callersMethodmessages
(&self)
rust/crates/runtime/src/hooks.rs:44
↓ 4 callersMethodnext_event
(&mut self)
rust/crates/api/src/client.rs:538
↓ 4 callersFunctionoptional_bool
( object: &BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:684
↓ 4 callersMethodpush_chunk
推入一块新收到的数据,返回解析出的完整事件列表。 可能返回 0 个事件(数据不够完整) 可能返回 1 个事件(刚好凑齐一个) 可能返回多个事件(一块数据里包含了好几个事件) 对应源码: runtime/sse.rs
tutorials/10_sse_streaming.py:147
↓ 4 callersMethodread_line
(&mut self)
rust/crates/rusty-claude-cli/src/input.rs:129
↓ 4 callersMethodrecord
(&mut self, usage: TokenUsage)
rust/crates/runtime/src/usage.rs:186
↓ 4 callersMethodregister
注册一个工具。 参数: spec: 工具说明书 handler: 工具的执行函数 返回: self(返回自身是为了支持链式调用,后面演示)
tutorials/03_tool_system.py:270
↓ 4 callersFunctionrender_slash_command_help
()
rust/crates/commands/src/lib.rs:314
↓ 4 callersFunctionrequired_u32
(object: &BTreeMap<String, JsonValue>, key: &str)
rust/crates/runtime/src/session.rs:371
↓ 4 callersFunctionresolve_model_alias
(model: &str)
rust/crates/rusty-claude-cli/src/main.rs:291
↓ 4 callersMethodresolve_request
( &self, enabled_override: Option<bool>, namespace_override: Option<bool>, net
rust/crates/runtime/src/sandbox.rs:87
↓ 4 callersMethodroute_prompt
(self, prompt: str, limit: int = 5)
src/runtime.py:90
↓ 4 callersFunctionrun_agent
这个函数不知道也不关心 client 是真的还是假的
tutorials/18_design_patterns_for_agents.py:124
↓ 4 callersMethodrun_pre_tool_use
(&self, tool_name: &str, tool_input: &str)
rust/crates/runtime/src/hooks.rs:66
↓ 4 callersFunctionsample_request
(stream: bool)
rust/crates/api/tests/client_integration.rs:411
↓ 4 callersFunctionsanitize_generated_message
(value: &str)
rust/crates/rusty-claude-cli/src/main.rs:2191
↓ 4 callersMethodsave_to_path
(&self, path: impl AsRef<Path>)
rust/crates/runtime/src/session.rs:88
↓ 4 callersFunctionscript_transport
(script_path: &Path)
rust/crates/runtime/src/mcp_stdio.rs:1138
↓ 4 callersFunctionspawn_server
( state: Arc<Mutex<Vec<CapturedRequest>>>, responses: Vec<String>, )
rust/crates/api/tests/client_integration.rs:298
↓ 4 callersMethodspawn_worker
生成一个新 Worker。 对应 Reference: EP08 §1 生成队友 spawnMultiAgent.ts (1,094 行) 1. 解析模型 2. 生成唯一名称 3. 检测后端
tutorials/13_multi_agent_coordination.py:350
↓ 4 callersMethodstdin
(&mut self, cfg: std::process::Stdio)
rust/crates/runtime/src/hooks.rs:258
↓ 4 callersMethodstream
(self, messages)
tutorials/18_design_patterns_for_agents.py:303
↓ 4 callersMethodstream_message
( &self, request: &MessageRequest, )
rust/crates/api/src/client.rs:217
↓ 4 callersMethodsubmit_message
( self, prompt: str, matched_commands: tuple[str, ...] = (), matched_tools: tu
src/query_engine.py:61
↓ 4 callersFunctiontemp_dir
()
rust/crates/rusty-claude-cli/src/init.rs:341
↓ 4 callersFunctiontemp_dir
()
rust/crates/runtime/src/mcp_stdio.rs:831
↓ 4 callersMethodtools_path
(&self)
rust/crates/compat-harness/src/lib.rs:40
↓ 4 callersFunctiontruncate_summary
(content: &str, max_chars: usize)
rust/crates/runtime/src/compact.rs:317
↓ 4 callersFunctionwrite_file
(path: &str, content: &str)
rust/crates/runtime/src/file_ops.rs:158
↓ 3 callersMethod__init__
(self, status_code: int, message: str = "")
mini_claude_code/retry.py:52
↓ 3 callersMethod__init__
(self, message: str = "missing API key")
tutorials/11_error_recovery_and_retry.py:125
↓ 3 callersFunction_first_text
取消息第一个非空文本 block。源码: compact.rs:281-288
mini_claude_code/compact.py:162
↓ 3 callersFunction_first_text
取第一个非空文本块 — 源码 compact.rs:281-288
tutorials/16_prompt_building_and_compaction.py:575
↓ 3 callersMethod_inbox_path
(self, agent_name: str)
tutorials/13_multi_agent_coordination.py:194
↓ 3 callersMethod_session_path
JSONL 文件路径。CC: ~/.claude/projects/{cwd}/{session_id}.jsonl
mini_claude_code/storage.py:68
↓ 3 callersMethodallow
(messages: Optional[list[str]] = None)
mini_claude_code/hooks.py:47
↓ 3 callersMethodapi_key
(&self)
rust/crates/api/src/client.rs:49
↓ 3 callersMethodappend_message
追加一条消息到 JSONL 文件。 这是最核心的写入操作。每条消息一行,追加到文件末尾。 对应 Reference: EP09 §2 Project.appendEntry() → enqueueWrite(filePat
tutorials/12_session_persistence.py:307
↓ 3 callersFunctionasync_task
(name, seconds)
tutorials/17_async_await_for_sse.py:59
↓ 3 callersMethodauthorize
( &self, tool_name: &str, input: &str, mut prompter: Option<&mut dyn Permissio
rust/crates/runtime/src/permissions.rs:89
↓ 3 callersMethodbearer_token
(&self)
rust/crates/api/src/client.rs:57
↓ 3 callersMethodbootstrap_session
(self, prompt: str, limit: int = 5)
src/runtime.py:109
↓ 3 callersMethodbuild
构建最终的 system prompt sections — 源码 prompt.rs:134-156 返回的 sections 列表结构: [0] 介绍(你是什么) [1] 输出风格(可选) [2] 系统规则 [3
tutorials/16_prompt_building_and_compaction.py:254
↓ 3 callersFunctionbuild_linux_sandbox_command
( command: &str, cwd: &Path, status: &SandboxStatus, )
rust/crates/runtime/src/sandbox.rs:211
↓ 3 callersFunctioncollapse_whitespace
(input: &str)
rust/crates/tools/src/lib.rs:1058
↓ 3 callersMethodcommand
(self, name: str)
src/execution_registry.py:32
↓ 3 callersFunctioncommand_exists
(command: &str)
rust/crates/tools/src/lib.rs:2696
↓ 3 callersMethodcumulative_usage
源码: usage.rs:201-203
mini_claude_code/runtime.py:105
↓ 3 callersFunctiondecode_html_entities
(input: &str)
rust/crates/tools/src/lib.rs:1048
↓ 3 callersMethoddeny
(messages: Optional[list[str]] = None)
mini_claude_code/hooks.py:51
↓ 3 callersFunctiondetect_first_command
(commands: &[&'static str])
rust/crates/tools/src/lib.rs:2424
↓ 3 callersFunctiondetect_interruption
检测上次会话是否在中途被中断。 对应 Reference: EP09 §3 detectTurnInterruption(): | 最后消息类型 | 状态 | 动作 |
tutorials/12_session_persistence.py:480
↓ 3 callersMethoddiscover
(&self)
rust/crates/runtime/src/config.rs:185
↓ 3 callersFunctionestimate_session_tokens
估算整个会话的 token 数 — 源码 compact.rs:27-29
tutorials/16_prompt_building_and_compaction.py:458
↓ 3 callersFunctionexecute_bash
(input: BashCommandInput)
rust/crates/runtime/src/bash.rs:67
↓ 3 callersFunctionexecute_tool_with_full_pipeline
完整的工具执行流水线 — 源码 conversation.rs:218-271 流程: 1. 权限检查 → deny? 返回拒绝消息 2. Pre-hook → deny? 返回拒绝消息(工具根本不执行) 3. 执行工具 4. 合并 pre-hook 反馈到
tutorials/15_permission_and_hook_pipeline.py:478
↓ 3 callersFunctionexpect_success
(response: reqwest::Response)
rust/crates/api/src/client.rs:565
↓ 3 callersFunctionextract_file_candidates
启发式提取文件路径。源码: compact.rs:301-315 规则: token 包含 '/' 且有已知扩展名。
mini_claude_code/compact.py:108
↓ 3 callersFunctionfixture_paths
()
rust/crates/compat-harness/src/lib.rs:305
↓ 3 callersFunctionformat_compact_report
(removed: usize, resulting_messages: usize, skipped: bool)
rust/crates/rusty-claude-cli/src/main.rs:760
↓ 3 callersFunctionformat_tool_result
(name: &str, output: &str, is_error: bool)
rust/crates/rusty-claude-cli/src/main.rs:2679
↓ 3 callersMethodfrom_dict
从字典反序列化
tutorials/12_session_persistence.py:115
↓ 3 callersFunctiongenerate_pkce_pair
()
rust/crates/runtime/src/oauth.rs:234
↓ 3 callersFunctionget_commands
(cwd: str | None = None, include_plugin_commands: bool = True, include_skill_commands: bool = True)
src/commands.py:60
↓ 3 callersFunctionget_tools
( simple_mode: bool = False, include_mcp: bool = True, permission_context: ToolPermissionContext |
src/tools.py:62
↓ 3 callersFunctiongit_output
(args: &[&str])
rust/crates/rusty-claude-cli/src/main.rs:2113
↓ 3 callersFunctionhtml_to_text
(html: &str)
rust/crates/tools/src/lib.rs:1018
↓ 3 callersMethodis_allowed
(self, tool_name: str)
tutorials/18_design_patterns_for_agents.py:550
↓ 3 callersMethodis_denied
(&self)
rust/crates/runtime/src/hooks.rs:39
↓ 3 callersMethodis_retryable
(self)
tutorials/11_error_recovery_and_retry.py:128
↓ 3 callersFunctioniso8601_now
()
rust/crates/tools/src/lib.rs:2096
↓ 3 callersFunctionload_saved_oauth_token
()
rust/crates/api/src/client.rs:470
↓ 3 callersFunctionloopback_redirect_uri
(port: u16)
rust/crates/runtime/src/oauth.rs:254
↓ 3 callersMethodmcp
(&self)
rust/crates/runtime/src/config.rs:285
↓ 3 callersFunctionmerge_hook_feedback
合并 Hook 反馈到工具输出 — 源码 conversation.rs:408-424 例如: 工具输出: "4" Pre-hook 消息: "pre hook ran" Post-hook 消息: "post hook ran" 合并后: "4\n\n
tutorials/15_permission_and_hook_pipeline.py:440
↓ 3 callersFunctionnow_unix_timestamp
()
rust/crates/api/src/client.rs:480
↓ 3 callersMethodoauth
(&self)
rust/crates/runtime/src/config.rs:295
↓ 3 callersFunctionoauth_token_is_expired
(token_set: &OAuthTokenSet)
rust/crates/api/src/client.rs:372
↓ 3 callersFunctionoptional_string_map
( object: &BTreeMap<String, JsonValue>, key: &str, context: &str, )
rust/crates/runtime/src/config.rs:747
↓ 3 callersMethodparse
(input: &str)
rust/crates/commands/src/lib.rs:230
↓ 3 callersMethodparse_literal
(&mut self, expected: &str, value: JsonValue)
rust/crates/runtime/src/json.rs:176
← previousnext →101–200 of 1,659, ranked by callers