MCPcopy Create free account

hub / github.com/dhanji/g3 / functions

Functions3,053 in github.com/dhanji/g3

↓ 224 callersMethodget
Get a specific research task
crates/g3-core/src/pending_research.rs:220
↓ 221 callersMethodprint
(&self, message: &str)
crates/g3-cli/src/simple_output.rs:12
↓ 199 callersMethodis_empty
Check if the compiled rulespec is empty.
crates/g3-core/src/tools/datalog.rs:95
↓ 190 callersMethodprocess_chunk
Process a streaming chunk and return completed tool calls if any.
crates/g3-core/src/streaming_parser.rs:294
↓ 171 callersMethodadd_message
(&mut self, message: Message)
crates/g3-core/src/context_window.rs:106
↓ 106 callersFunctionfilter_json_tool_calls
Filters JSON tool calls from streaming LLM content. Processes content character-by-character and removes JSON tool calls while preserving regular tex
crates/g3-cli/src/filter_json.rs:167
↓ 106 callersFunctionreset_json_tool_state
Resets the global JSON filtering state. Call this between independent filtering sessions to ensure clean state. This is particularly important in tes
crates/g3-cli/src/filter_json.rs:416
↓ 79 callersMethodprocess
Process an incoming chunk of text. Returns formatted output that's ready to display.
crates/g3-cli/src/streaming_markdown.rs:140
↓ 74 callersMethodwith_response
(mut self, response: String)
crates/g3-core/src/error_handling.rs:94
↓ 67 callersMethodexecute_task
( &mut self, description: &str, language: Option<&str>, _auto_execute: bool,
crates/g3-core/src/lib.rs:875
↓ 67 callersFunctionmake_formatter
()
crates/g3-cli/tests/streaming_markdown_test.rs:9
↓ 67 callersFunctionprint_msg
Print a message to stdout
crates/g3-planner/src/planner.rs:116
↓ 67 callersMethodwith_value
(mut self, value: YamlValue)
crates/g3-core/src/tools/invariants.rs:154
↓ 66 callersMethodis_empty
(&self)
crates/g3-planner/src/git.rs:134
↓ 65 callersMethodget_context_window
(&self)
crates/g3-core/src/lib.rs:1163
↓ 56 callersMethodexecute_tool
(&mut self, tool_call: &ToolCall)
crates/g3-core/src/lib.rs:2997
↓ 54 callersMethodfinish
Signal end of stream and flush any remaining content.
crates/g3-cli/src/streaming_markdown.rs:148
↓ 52 callersMethodclear
(&self)
crates/g3-cli/src/ui_writer_impl.rs:68
↓ 50 callersFunctionrun_command
Run a shell command and return its output
crates/g3-planner/src/code_explore.rs:95
↓ 48 callersFunctioncompile_rulespec
Compile a rulespec into a datalog-ready representation. This validates the rulespec and converts it into a form that can be efficiently executed by d
crates/g3-core/src/tools/datalog.rs:108
↓ 47 callersFunctionchunk
Helper to create a chunk
crates/g3-core/tests/streaming_parser_test.rs:14
↓ 47 callersFunctionchunk
Helper to create a completion chunk
crates/g3-core/tests/json_parsing_stress_test.rs:37
↓ 46 callersMethodsuccess
(chars_saved: usize)
crates/g3-core/src/compaction.rs:30
↓ 45 callersMethodadd_fact
Add a fact to the envelope.
crates/g3-core/src/tools/invariants.rs:352
↓ 40 callersMethodclear
Clear the element's content (for input fields)
crates/g3-computer-control/src/webdriver/mod.rs:62
↓ 39 callersFunctionextract_facts
Extract facts from an action envelope using the compiled rulespec's selectors. Returns a set of facts that can be injected into datafrog relations.
crates/g3-core/src/tools/datalog.rs:209
↓ 35 callersFunctionclassify_error
Classify an error as recoverable or non-recoverable
crates/g3-core/src/error_handling.rs:190
↓ 34 callersMethodget
(&self, provider_name: Option<&str>)
crates/g3-providers/src/lib.rs:400
↓ 33 callersFunctionmake_tool_call
Create a ToolCall with the given tool name and arguments
crates/g3-core/tests/tool_execution_roundtrip_test.rs:36
↓ 32 callersMethodregister
Register a new research task Returns the research ID for tracking
crates/g3-core/src/pending_research.rs:156
↓ 31 callersFunctionevaluate_predicate
Evaluate a predicate against a claim's selected value.
crates/g3-core/src/tools/invariants.rs:557
↓ 30 callersFunctionfind_first_tool_call_start
(text: &str)
crates/g3-core/src/streaming_parser.rs:206
↓ 27 callersFunctionexecute_rules
Execute compiled datalog rules against extracted facts. This uses datafrog to evaluate the predicates. The execution model: 1. Create relations for c
crates/g3-core/src/tools/datalog.rs:337
↓ 26 callersFunctioncalculate_retry_delay
Calculate retry delay with exponential backoff and jitter
crates/g3-core/src/error_handling.rs:281
↓ 26 callersFunctioncreate_agent_with_mock
Helper to create an agent with a mock provider
crates/g3-core/tests/mock_provider_integration_test.rs:13
↓ 26 callersFunctionfinished_chunk
Helper to create a finished chunk
crates/g3-core/tests/json_parsing_stress_test.rs:49
↓ 21 callersFunctioncreate_test_agent
Create a test agent in a temporary directory
crates/g3-core/tests/tool_execution_roundtrip_test.rs:28
↓ 21 callersFunctionhas_files_with_extension
Check if files with given extension exist
crates/g3-planner/src/code_explore.rs:119
↓ 21 callersMethodprint_context_status
(&self, _message: &str)
crates/g3-core/src/ui_writer.rs:174
↓ 21 callersMethodwith_default_response
Set a default response when queue is empty
crates/g3-providers/src/mock.rs:391
↓ 20 callersMethodpercentage_used
(&self)
crates/g3-core/src/context_window.rs:255
↓ 20 callersMethodwith_native_tool_calling
Enable native tool calling
crates/g3-providers/src/mock.rs:373
↓ 19 callersMethodget_session_id
Get the current session ID for this agent
crates/g3-core/src/lib.rs:791
↓ 19 callersMethodinit_session_id_for_test
Initialize session ID manually (primarily for testing). This allows tests to verify session ID generation without calling execute_task, which would re
crates/g3-core/src/lib.rs:1976
↓ 19 callersMethodstatus
(status: &Status)
crates/g3-cli/src/g3_status.rs:98
↓ 17 callersMethodadd_claim
(&mut self, claim: Claim)
crates/g3-core/src/tools/invariants.rs:273
↓ 17 callersFunctionget_g3_binary
Get the path to the g3 binary. In test mode, this will be in the target/debug directory.
crates/g3-cli/tests/cli_integration_test.rs:21
↓ 17 callersFunctionmake_tool_call
(tool: &str, args: serde_json::Value)
crates/g3-core/tests/plan_new_after_complete_test.rs:26
↓ 17 callersMethodplan_dir
Get the g3-plan directory path
crates/g3-planner/src/planner.rs:36
↓ 17 callersMethodprocess_chunk
(&mut self, chunk: &str)
crates/g3-providers/src/embedded/adapters/glm.rs:365
↓ 17 callersFunctionprocess_template
Process template variables in the given content. Replaces `{{var}}` patterns with their values. Warns about unknown variables and leaves them unchang
crates/g3-cli/src/template.rs:15
↓ 16 callersMethodelapsed
Get the elapsed time since the research started
crates/g3-core/src/pending_research.rs:69
↓ 16 callersFunctionexecute_code_search
Execute the `code_search` tool.
crates/g3-core/src/tools/misc.rs:134
↓ 16 callersMethodflush
(&self)
crates/g3-cli/src/ui_writer_impl.rs:1055
↓ 16 callersMethodload
Get a theme by name or from file
crates/g3-cli/src/theme.rs:129
↓ 16 callersFunctionmake_tool_call
Create a ToolCall with the given tool name and arguments
crates/g3-core/tests/tool_execution_test.rs:28
↓ 15 callersFunctionbuild_prompt
Build the interactive prompt string. Format: - Multiline mode: `"... > "` - Plan mode: `" >> "` - No project: `"agent_name> "` (defaults to "g3") - W
crates/g3-cli/src/interactive.rs:34
↓ 15 callersMethodcomplete
( &self, line: &str, pos: usize, ctx: &Context<'_>, )
crates/g3-cli/src/completion.rs:195
↓ 15 callersMethodformat
Format detailed context statistics as a string.
crates/g3-core/src/stats.rs:26
↓ 15 callersMethodis_success
Check if the result is a success
crates/g3-core/src/retry.rs:86
↓ 14 callersMethodadd_predicate
(&mut self, predicate: Predicate)
crates/g3-core/src/tools/invariants.rs:277
↓ 14 callersFunctionapply_unified_diff_to_string
Apply unified diff to an input string with optional [start, end) bounds. # Arguments `file_content` - The original file content `diff` - The unified
crates/g3-core/src/utils.rs:182
↓ 14 callersFunctionchunk
Helper to create a completion chunk
crates/g3-core/tests/tool_result_poisoning_test.rs:14
↓ 14 callersMethodparse
(s: &str)
crates/g3-cli/src/g3_status.rs:30
↓ 14 callersMethodtext
Create a simple text-only response (single chunk + finish)
crates/g3-providers/src/mock.rs:113
↓ 13 callersMethodgenerate_stub
Generate the stub message content for this fragment.
crates/g3-core/src/acd.rs:111
↓ 13 callersFunctionget_session
Acquire the WebDriver session, returning an error message if unavailable.
crates/g3-core/src/tools/webdriver.rs:98
↓ 13 callersFunctionmake_test_envelope
()
crates/g3-core/src/tools/datalog.rs:842
↓ 13 callersFunctionparse_provider_ref
Parse a provider reference into (provider_type, config_name). Format: "provider_type.config_name" (e.g., "anthropic.default") Falls back to (provider_
crates/g3-core/src/provider_config.rs:16
↓ 13 callersFunctionpreprocess_input
Pre-process input to add markdown markers before formatting. ALL CAPS → **bold**, quoted text → special markers for cyan.
crates/g3-cli/src/input_formatter.rs:35
↓ 13 callersMethodreset
(&mut self)
crates/g3-core/src/streaming_parser.rs:69
↓ 13 callersMethodset_project_content
Set or clear project content in the system message. Project content is appended to the second system message (README/AGENTS content) so it survives co
crates/g3-core/src/lib.rs:1506
↓ 12 callersFunctionchunk
Helper to create a completion chunk
crates/g3-core/tests/streaming_parser_stuttering_test.rs:22
↓ 12 callersFunctionchunk
(content: &str, finished: bool)
crates/g3-core/tests/parser_sanitization_test.rs:350
↓ 12 callersFunctiondiscover_skills
Discover all available skills from configured paths. Skills are loaded in priority order (lowest to highest): 1. Embedded skills (compiled into binar
crates/g3-core/src/skills/discovery.rs:36
↓ 12 callersMethodforce_compact
Manually trigger context compaction regardless of context window size Returns Ok(true) if compaction was successful, Ok(false) if it failed
crates/g3-core/src/lib.rs:1219
↓ 12 callersFunctionmake_tool_call
(tool: &str, args: serde_json::Value)
crates/g3-core/tests/end_of_turn_behavior_test.rs:128
↓ 12 callersFunctionmint_token
Mint a verification token using a keyed SipHash MAC. The token is computed as: SipHash-2-4(key[0..16], canonical_facts || "\x00" || canonical_rulespe
crates/g3-core/src/tools/envelope.rs:150
↓ 12 callersFunctionsave_continuation
Save a session continuation artifact This saves latest.json in the session's directory and updates the symlink
crates/g3-core/src/session_continuation.rs:161
↓ 12 callersFunctionsetup_test_env
Helper to set up a test environment with a temporary directory Returns the temp dir (must be kept alive) and the original directory
crates/g3-core/tests/test_session_continuation.rs:19
↓ 12 callersFunctionteardown_test_env
Restore the original directory
crates/g3-core/tests/test_session_continuation.rs:27
↓ 12 callersFunctiontest_path
()
crates/g3-core/src/skills/parser.rs:192
↓ 12 callersMethodwith_when
(mut self, when: WhenCondition)
crates/g3-core/src/tools/invariants.rs:208
↓ 11 callersFunctioncalculate_capped_summary_tokens
Calculate the summary max_tokens with provider-specific caps applied. This is the canonical implementation - both manual and auto compaction use this
crates/g3-core/src/compaction.rs:59
↓ 11 callersFunctionget_session_logs_dir
Get the session directory for a specific session ID. Returns .g3/sessions/<session_id>/
crates/g3-core/src/paths.rs:73
↓ 11 callersFunctionmake_test_envelope
()
crates/g3-core/src/tools/envelope.rs:496
↓ 11 callersMethodselect
Select values from a YAML value. Returns a vector because wildcards can match multiple values.
crates/g3-core/src/tools/invariants.rs:477
↓ 11 callersMethodthin_context
Thin context (first third only).
crates/g3-core/src/context_window.rs:419
↓ 10 callersFunctionclip_line
Clip a line to fit within the given width, adding ellipsis if truncated. Uses UTF-8 safe character counting to avoid panics on multi-byte characters.
crates/g3-cli/src/terminal_width.rs:34
↓ 10 callersMethodcomplete
Update a research task with its result
crates/g3-core/src/pending_research.rs:168
↓ 10 callersMethodcreate_request_body
( &self, messages: &[Message], tools: Option<&[Tool]>, streaming: bool,
crates/g3-providers/src/anthropic.rs:574
↓ 10 callersFunctioncreate_skill_dir
(parent: &Path, name: &str, description: &str)
crates/g3-core/src/skills/discovery.rs:170
↓ 10 callersMethodflush
(&mut self)
crates/g3-providers/src/embedded/adapters/glm.rs:402
↓ 10 callersFunctionformat_datalog_program
Format a compiled rulespec and extracted facts as a datalog program. Produces a textual `.dl` file with: - Relation declarations (`.decl`) - Fact ass
crates/g3-core/src/tools/datalog.rs:671
↓ 10 callersFunctionget_repo_root
Get the repository root (where .git is)
crates/studio/src/main.rs:243
↓ 10 callersFunctionget_session_dir
Get the path to the .g3/session symlink
crates/g3-core/src/session_continuation.rs:98
↓ 10 callersFunctionget_terminal_width
Get the usable terminal width (total width minus right margin). Returns the terminal width minus a 4-character right margin for clarity. Falls back t
crates/g3-cli/src/terminal_width.rs:22
↓ 10 callersMethodget_text_content
--- Public Accessors ---
crates/g3-core/src/streaming_parser.rs:458
↓ 10 callersMethodis_empty
Check if the rulespec is empty (no claims or predicates).
crates/g3-core/src/tools/invariants.rs:316
↓ 10 callersMethodname
(&self)
crates/g3-core/tests/streaming_completion_test.rs:221
next →1–100 of 3,053, ranked by callers