MCPcopy Index your code

hub / github.com/GaaraZhu/gate / functions

Functions1,005 in github.com/GaaraZhu/gate

↓ 152 callersMethodas_str
(&self)
crates/gate/src/main.rs:18
↓ 115 callersFunctionexit_with_error
(msg: &str)
crates/common/src/error.rs:8
↓ 89 callersFunctionplan
()
crates/common/src/redactor.rs:826
↓ 88 callersFunctionredact
Redact `payload` using `plan` (from Gate 1) and `config`. Returns the redacted JSON with `_gate_summary` attached according to payload shape. Error-sh
crates/common/src/redactor.rs:109
↓ 64 callersFunctioncfg
()
crates/common/src/redactor.rs:815
↓ 55 callersFunctiondefault_config
()
crates/gate/src/hook.rs:309
↓ 44 callersFunctionmake_input
(command: &str)
crates/gate/src/hook.rs:318
↓ 40 callersFunctionparse_columnar_json
Parse columnar input to extract (table_name, column_name) pairs. Supports four formats: 1. Array-of-arrays (tkdbr / tkmsql): `{"columns": [...], "row
crates/gate/src/scan.rs:116
↓ 39 callersFunctionprocess_cc
(stdin: &str, config: &Config)
crates/gate/src/hook.rs:279
↓ 32 callersFunctionextract_columns
Extract column references from `sql`'s outermost SELECT list.
crates/gate1/src/lib.rs:53
↓ 26 callersFunctionstdout
(o: &std::process::Output)
crates/gate/tests/run_integration.rs:70
↓ 24 callersFunctionwrite_script
Write an executable shell script into `dir` and return its path string.
crates/gate/tests/run_integration.rs:25
↓ 22 callersFunctiontmp
()
crates/gate/tests/run_integration.rs:13
↓ 22 callersFunctionwrite_config
Write a YAML config file into `dir` and return its path string.
crates/gate/tests/run_integration.rs:18
↓ 19 callersFunctionredact_run
(config: &str, tool: &str, extra: &[&str])
crates/gate/tests/run_integration.rs:34
↓ 19 callersFunctions
(v: &str)
crates/gate/src/allowlist.rs:415
↓ 17 callersFunctionload_from_yaml
(yaml: &str)
crates/common/src/config.rs:248
↓ 16 callersMethodadd
(&mut self, ev: Event)
crates/gate/src/retro.rs:92
↓ 16 callersFunctioncols
(extraction: ColumnExtraction)
crates/gate1/src/lib.rs:312
↓ 16 callersFunctionrun
(json: bool, tool: Option<String>, path: Option<String>, follow: bool)
crates/gate/src/log.rs:16
↓ 14 callersFunctiontmp_path
()
crates/gate/src/init.rs:1411
↓ 13 callersFunctionbuild_plan
Build a `RedactPlan` from the column extraction result. `denylist` should be the lowercased effective column names from `PiiConfig` (`config.pii.effe
crates/gate1/src/lib.rs:106
↓ 13 callersFunctionrecord
Append one event to the stats file. Best-effort: on any failure (disk full, permission denied, antivirus interference) the error is swallowed and the
crates/common/src/stats.rs:144
↓ 13 callersFunctionregister_mcp_server
(path: &Path, server_name: &str, cmd_str: &str)
crates/gate/src/init.rs:323
↓ 12 callersFunctionadd_to_allowlist_in_yaml
Add columns to `column_allowlist` in YAML, preserving all other content. Deduplicates: columns already present are silently skipped.
crates/gate/src/allowlist.rs:119
↓ 12 callersFunctiondo_redact
( pii_type: &str, original: &str, config: &PiiConfig, summary: &mut RedactSummary, )
crates/common/src/redactor.rs:761
↓ 12 callersFunctionev
(tool: &str, fields: usize, types: &[(&str, usize)])
crates/gate/src/retro.rs:332
↓ 12 callersFunctionwrap_mcp_claude
Convert existing MCP servers in a claude-code config (mcpServers key) to gate proxies.
crates/gate/src/init.rs:515
↓ 11 callersFunctiondenylist
()
crates/gate1/src/lib.rs:319
↓ 11 callersFunctionexecute_action
(action: &Action)
crates/gate/src/uninstall.rs:304
↓ 11 callersFunctionmake_config
(entries: &[(&str, Option<&str>, Option<&str>)])
crates/gate/src/hook.rs:287
↓ 11 callersFunctionmake_result
(tier1: &'static str, count: usize)
crates/gate/src/scan.rs:1457
↓ 10 callersFunctioncfg_hash
()
crates/common/src/redactor.rs:1267
↓ 10 callersFunctionprocess
Returns `Some(json_string)` to rewrite, `None` to pass through unchanged.
crates/gate/src/hook.rs:48
↓ 10 callersFunctionredact_with_stats
Same as [`redact`] but also returns aggregate counts ([`RedactStats`]) so callers (e.g. the `gate retro` stats logger) can record per-type breakdowns
crates/common/src/redactor.rs:116
↓ 10 callersFunctiontmp_codex_config
()
crates/gate/src/init.rs:2403
↓ 10 callersFunctiontokenize
Tokenize `sql` into a flat `Vec<Token>`. Whitespace, comments (`--` and `/* */`), string literals (`'...'`), and unrecognised characters are consumed
crates/gate1/src/tokenizer.rs:28
↓ 10 callersFunctionwrite_atomic
(path: &Path, value: &Value)
crates/gate/src/init.rs:307
↓ 9 callersFunctionconfig_path
()
crates/common/src/config.rs:226
↓ 9 callersFunctionhas_gate_mcp_wrap
(path: &PathBuf, key: &str)
crates/gate/src/validate.rs:357
↓ 9 callersFunctioninject_curl_silent
Inject `-s` (silent) into curl invocations if not already present, suppressing curl's progress meter which otherwise appears on stderr during piped ou
crates/gate/src/run.rs:354
↓ 9 callersFunctionredact_tools_call_response
Redact PII from a `tools/call` response. Runs Gate 2 over `result` (which contains `content[]`). The redactor's JSONB scan handles text items that em
crates/mcp/src/intercept.rs:91
↓ 8 callersFunctionentry_has_gate_hook
(entry: &Value)
crates/gate/src/init.rs:280
↓ 8 callersFunctionpattern
(name: &str)
crates/common/src/patterns.rs:805
↓ 8 callersFunctionpii_config
()
crates/mcp/tests/intercept.rs:7
↓ 8 callersFunctionrun_with_path
(show_path: bool, print_config: bool, init_only: bool, path: &Path)
crates/gate/src/config_cmd.rs:31
↓ 8 callersFunctions
(v: &[&str])
crates/gate/src/run.rs:436
↓ 8 callersFunctionset_enabled_in_yaml
Set or update the top-level `enabled:` key in a YAML string, preserving all other content.
crates/gate/src/enable_disable.rs:43
↓ 7 callersFunctionis_agent_harness
()
crates/common/src/harness.rs:12
↓ 7 callersFunctionnew_pending_calls
()
crates/mcp/src/intercept.rs:11
↓ 7 callersFunctionread_toml
(path: &PathBuf)
crates/gate/src/init.rs:2409
↓ 7 callersFunctionremove_from_allowlist_in_yaml
Remove columns from `column_allowlist` in YAML, preserving all other content.
crates/gate/src/allowlist.rs:155
↓ 7 callersFunctionrun_codex_with_path
(path: &Path, scope: &str)
crates/gate/src/init.rs:1126
↓ 7 callersFunctionrun_copilot_with_path
(path: &Path)
crates/gate/src/init.rs:733
↓ 7 callersFunctionrun_cursor_with_path
(path: &Path)
crates/gate/src/init.rs:1021
↓ 7 callersFunctionrun_gemini_with_path
(path: &Path)
crates/gate/src/init.rs:1238
↓ 7 callersFunctionrun_with_path
(path: &Path)
crates/gate/src/init.rs:184
↓ 7 callersFunctionwrap_mcp_codex
(path: &Path, filter: Option<&[String]>, apply: bool)
crates/gate/src/init.rs:925
↓ 6 callersFunctionaggregate_by_category
Classify each column using Gate 1 patterns and aggregate by tier-1 then tier-2 PII type.
crates/gate/src/scan.rs:587
↓ 6 callersFunctioncfg_allowlist
(columns: &[&str])
crates/common/src/redactor.rs:1430
↓ 6 callersFunctioncodebuddy_settings_path
Resolve the CodeBuddy settings path for the given scope. "project" → `.codebuddy/settings.json`; anything else ("user", "global") → `~/.codebuddy/sett
crates/gate/src/init.rs:1319
↓ 6 callersFunctiongemini_settings_path
Resolve the Gemini CLI settings path for the given scope. Hooks and MCP servers share the same file. "project" → `.gemini/settings.json`; anything els
crates/gate/src/init.rs:1197
↓ 6 callersFunctionparse_servers_filter
Parse a comma-separated `--servers` value into a sorted, deduplicated list. Returns `None` if `raw` is `None` (meaning "wrap all").
crates/gate/src/init.rs:477
↓ 6 callersFunctionread_settings
(path: &Path)
crates/gate/src/init.rs:205
↓ 6 callersFunctionregister_mcp_server_codex
(path: &Path, server_name: &str, cmd_str: &str)
crates/gate/src/init.rs:880
↓ 6 callersFunctionrun_codebuddy_with_path
(path: &Path)
crates/gate/src/init.rs:1337
↓ 6 callersFunctiontmp
()
crates/gate/tests/mcp_integration.rs:13
↓ 6 callersFunctiontmp_config
()
crates/gate/src/config_cmd.rs:101
↓ 6 callersFunctiontmp_gemini_path
()
crates/gate/src/init.rs:2650
↓ 6 callersFunctiontry_write_plugin
(path: &Path)
crates/gate/src/init_opencode.rs:83
↓ 6 callersFunctionwrite_atomic
(path: &Path, value: &Value)
crates/gate/src/uninstall.rs:501
↓ 5 callersFunctionclaude_code_mcp_path
Resolve the Claude Code MCP config path for the given scope. "project" → ./.mcp.json; anything else ("user", "global") → ~/.claude.json.
crates/gate/src/init.rs:387
↓ 5 callersFunctioncopilot_mcp_path
Resolve the Copilot CLI MCP config path for the given scope. "project" → ./.mcp.json (same shared format as Claude Code project scope); anything else
crates/gate/src/init.rs:400
↓ 5 callersFunctiondummy_config
()
crates/gate/src/scan.rs:1083
↓ 5 callersFunctionev
(outcome: &str)
crates/gate/src/log.rs:213
↓ 5 callersFunctionextract_request_id
Returns the serialised request ID, suitable for use as a HashMap key.
crates/mcp/src/intercept.rs:30
↓ 5 callersFunctionextract_sql_from_json
Extract SQL from a JSON string using a dot-separated path (e.g., "statement"). Returns the extracted SQL string or None if parsing fails.
crates/gate/src/run.rs:417
↓ 5 callersFunctioninsert_hook
(mut settings: Value)
crates/gate/src/init.rs:222
↓ 5 callersFunctionopencode_config_path
Resolve the opencode config path for the given scope. "project" → ./opencode.json; anything else ("user", "global") → ~/.config/opencode/opencode.json
crates/gate/src/init.rs:412
↓ 5 callersFunctionparse_current_allowlist
Parse the current column_allowlist from YAML content (for deduplication).
crates/gate/src/allowlist.rs:102
↓ 5 callersFunctiontmp_codex_path
()
crates/gate/src/init.rs:2277
↓ 5 callersFunctiontmp_copilot_path
()
crates/gate/src/init.rs:2015
↓ 5 callersFunctiontmp_cursor_path
()
crates/gate/src/init.rs:2123
↓ 5 callersFunctionwalk
( val: Value, key: Option<&str>, plan: &RedactPlan, config: &PiiConfig, patterns: &[Compil
crates/common/src/redactor.rs:401
↓ 4 callersFunctionassert_wildcard
(e: ColumnExtraction)
crates/gate1/src/lib.rs:327
↓ 4 callersFunctionclaude_settings_path
Resolve the Claude Code hook settings path for the given scope. "project" → ./.claude/settings.json; anything else ("user", "global") → ~/.claude/sett
crates/gate/src/init.rs:375
↓ 4 callersFunctioncodex_config_path
Resolve the Codex config path for the given scope. "project" → `.codex/config.toml`; anything else ("user", "global") → `~/.codex/config.toml`.
crates/gate/src/init.rs:832
↓ 4 callersFunctioncodex_hooks_path
Resolve the Codex hooks config path for the given scope. "project" → `.codex/hooks.json`; anything else ("user", "global") → `~/.codex/hooks.json`.
crates/gate/src/init.rs:1108
↓ 4 callersFunctioncursor_hooks_path
Resolve the Cursor hooks config path for the given scope. "project" → `.cursor/hooks.json`; anything else ("user", "global") → `~/.cursor/hooks.json`.
crates/gate/src/init.rs:1003
↓ 4 callersFunctioncursor_mcp_path
Resolve the Cursor MCP config path for the given scope. "project" → `.cursor/mcp.json`; anything else ("user", "global") → `~/.cursor/mcp.json`.
crates/gate/src/init.rs:818
↓ 4 callersMethodeffective_column_allowlist
Returns the lowercased allowlist. Columns in this list skip name-based redaction.
crates/common/src/config.rs:201
↓ 4 callersFunctionhas_gate_header
(content: &str)
crates/gate/src/init_opencode.rs:79
↓ 4 callersFunctionhome_dir
()
crates/common/src/stats.rs:131
↓ 4 callersFunctionmake_pipe_config
(name: &str, pipe: &str)
crates/gate/src/hook.rs:712
↓ 4 callersFunctionpii_server
A fake MCP server that: 1. Reads the initialize request, responds with capabilities. 2. Reads the tools/call request, responds with content containing
crates/gate/tests/mcp_integration.rs:29
↓ 4 callersFunctionplan_remove_hook
(scope: &str)
crates/gate/src/uninstall.rs:130
↓ 4 callersFunctionplugin_path
(scope: &str)
crates/gate/src/init_opencode.rs:57
↓ 4 callersFunctionprocess_new_lines
Read and print any lines appended to `file_path` since `offset`, advancing `offset` past the bytes consumed. Handles truncation (the writer's size-cap
crates/gate/src/log.rs:71
↓ 4 callersFunctionregister_mcp_server_opencode
(path: &Path, server_name: &str, cmd_str: &str)
crates/gate/src/init.rs:425
↓ 4 callersFunctionresolve_editor
()
crates/gate/src/config_cmd.rs:82
next →1–100 of 1,005, ranked by callers