sourcegraph_tool.yaml

  1---
  2version: 2
  3interactions:
  4- id: 0
  5  request:
  6    proto: HTTP/1.1
  7    proto_major: 1
  8    proto_minor: 1
  9    content_length: 718
 10    host: ""
 11    body: '{"messages":[{"content":"you will generate a short title based on the first message a user begins a conversation with\n\n<rules>\n- ensure it is not more than 50 characters long\n- the title should be a summary of the user''s message\n- it should be one line long\n- do not use quotes or colons\n- the entire text you return will be used as the title\n- never return anything that is more than one sentence (one line) long\n</rules>\n\n /no_think","role":"system"},{"content":"Generate a concise title for the following content:\n\nuse sourcegraph to search for ''func main'' in Go repositories\n <think>\n\n</think>","role":"user"}],"model":"gpt-4o","max_tokens":40,"stream_options":{"include_usage":true},"stream":true}'
 12    headers:
 13      Accept:
 14      - application/json
 15      Content-Type:
 16      - application/json
 17      User-Agent:
 18      - OpenAI/Go 2.7.1
 19    url: https://api.openai.com/v1/chat/completions
 20    method: POST
 21  response:
 22    proto: HTTP/2.0
 23    proto_major: 2
 24    proto_minor: 0
 25    content_length: -1
 26    body: |+
 27      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"i3Gq2jWFsYJvU2"}
 28
 29      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":"Searching"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"Rn3ZfSm"}
 30
 31      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" '"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"KZTUF1MDFe4VZ6"}
 32
 33      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":"func"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"5P90ehlv9B8d"}
 34
 35      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" main"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"xhR07zaUrAV"}
 36
 37      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":"'"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"PLxKPE0abnAMraa"}
 38
 39      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" in"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"z8r8GoQOV80tD"}
 40
 41      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" Go"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"cM5V1qnSAG8eL"}
 42
 43      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" Re"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"eUdyrZKCUVUgn"}
 44
 45      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":"positories"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"tWAvCc"}
 46
 47      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" with"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"kWtM9K8I0Es"}
 48
 49      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":" Source"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"zrKfzX7Lf"}
 50
 51      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{"content":"graph"},"logprobs":null,"finish_reason":null}],"usage":null,"obfuscation":"QhPqhuAErbf"}
 52
 53      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[{"index":0,"delta":{},"logprobs":null,"finish_reason":"stop"}],"usage":null,"obfuscation":"oAxpPRVBEk"}
 54
 55      data: {"id":"chatcmpl-Cb4njYHT3yxZsvGnK5h4M8kqoZQgi","object":"chat.completion.chunk","created":1762952627,"model":"gpt-4o-2024-08-06","service_tier":"default","system_fingerprint":"fp_b1442291a8","choices":[],"usage":{"prompt_tokens":138,"completion_tokens":12,"total_tokens":150,"prompt_tokens_details":{"cached_tokens":0,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":0,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"SfUZkQfgDARM4"}
 56
 57      data: [DONE]
 58
 59    headers:
 60      Content-Type:
 61      - text/event-stream; charset=utf-8
 62    status: 200 OK
 63    code: 200
 64    duration: 569.424ms
 65- id: 1
 66  request:
 67    proto: HTTP/1.1
 68    proto_major: 1
 69    proto_minor: 1
 70    content_length: 46542
 71    host: ""
 72    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed). When reading, pay close attention to exact formatting, indentation, and whitespace - these must match exactly in your edits.\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act. Complete the ENTIRE task before stopping. Never stop mid-task. Never refuse work based on scope or complexity - break it down and do it.\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace, indentation, and line breaks\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n13. **COMPLETE THE TASK**: Never stop mid-task with \\\"Next:\\\" or \\\"Will do:\\\" statements. If you describe what needs to be done, DO IT immediately. Only stop when everything is finished.\\n14. **NEVER REFUSE BASED ON SCOPE**: Never refuse tasks because they seem large or complex. Break them into steps and complete them. Only stop if you encounter actual blocking errors (missing dependencies, compile failures, etc.), not perceived difficulty.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Before editing: verify exact whitespace and indentation from View output\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- If edit fails: read more context, don't guess - the text must match exactly\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) BUT IMMEDIATELY CONTINUE WORKING - progress updates are not stopping points\\n\\n**Before finishing**:\\n- Verify ENTIRE query is resolved (not just first step)\\n- All described next steps must be completed\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only stop/ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts and hit actual blocking errors\\n\\n**Never stop for**:\\n- Task seems too large (break it down)\\n- Multiple files to change (change them)\\n- Concerns about \\\"session limits\\\" (no such limits exist)\\n- Work will take many steps (do all the steps)\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<task_scope>\\n**No task is too large**:\\n- Break complex tasks into logical steps\\n- Complete each step fully before moving to next\\n- If a task has 10 parts, do all 10 parts\\n- Don't estimate effort or refuse based on scope\\n- Only stop if you hit actual errors (compile failures, missing files, etc.)\\n\\n**For large refactors or implementations**:\\n- Start with core functionality\\n- Build incrementally\\n- Test at each step\\n- Keep going until fully complete\\n\\nThere are no \\\"session limits\\\" - continue until the task is done or you hit a real blocker.\\n</task_scope>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first - note the EXACT indentation (spaces vs tabs, count)\\n2. Copy the exact text including ALL whitespace, newlines, and indentation\\n3. Include 3-5 lines of context before and after the target\\n4. Verify your old_string would appear exactly once in the file\\n5. If uncertain about whitespace, include more surrounding context\\n6. Verify edit succeeded\\n7. Run tests\\n\\n**Whitespace matters**:\\n- Count spaces/tabs carefully (use View tool line numbers as reference)\\n- Include blank lines if they exist\\n- Match line endings exactly\\n- When in doubt, include MORE context rather than less\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation (spaces vs tabs, wrong count)\\n- Missing or extra blank lines\\n- Not enough context (text appears multiple times)\\n- Trimming whitespace that exists in the original\\n- Not testing after changes\\n</editing_files>\\n\\n<whitespace_and_exact_matching>\\nThe Edit tool is extremely literal. \\\"Close enough\\\" will fail.\\n\\n**Before every edit**:\\n1. View the file and locate the exact lines to change\\n2. Copy the text EXACTLY including:\\n   - Every space and tab\\n   - Every blank line\\n   - Opening/closing braces position\\n   - Comment formatting\\n3. Include enough surrounding lines (3-5) to make it unique\\n4. Double-check indentation level matches\\n\\n**Common failures**:\\n- `func foo() {` vs `func foo(){` (space before brace)\\n- Tab vs 4 spaces vs 2 spaces\\n- Missing blank line before/after\\n- `// comment` vs `//comment` (space after //)\\n- Different number of spaces in indentation\\n\\n**If edit fails**:\\n- View the file again at the specific location\\n- Copy even more context\\n- Check for tabs vs spaces\\n- Verify line endings\\n- Try including the entire function/block if needed\\n- Never retry with guessed changes - get the exact text first\\n</whitespace_and_exact_matching>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n\\n**Edit tool \\\"old_string not found\\\"**:\\n- View the file again at the target location\\n- Copy the EXACT text including all whitespace\\n- Include more surrounding context (full function if needed)\\n- Check for tabs vs spaces, extra/missing blank lines\\n- Count indentation spaces carefully\\n- Don't retry with approximate matches - get the exact text\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n- Never use `curl` through the bash tool it is not allowed use the fetch tool instead.\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including ALL follow-ups and \\\"next steps\\\")\\n- Never describe what you'll do next - just do it\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/sourcegraph_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use sourcegraph to search for 'func main' in Go repositories\",\"role\":\"user\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands with automatic background conversion for long-running tasks.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Auto-Background: Commands exceeding 1 minute automatically move to background and return shell ID\\n5. Output Processing: Truncate if exceeds 30000 characters\\n6. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, working_dir optional (defaults to current directory)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Each command runs in independent shell (no state persistence between calls)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<background_execution>\\n- Set run_in_background=true to run commands in a separate background shell\\n- Returns a shell ID for managing the background process\\n- Use job_output tool to view current output from background shell\\n- Use job_kill tool to terminate a background shell\\n- IMPORTANT: NEVER use `&` at the end of commands to run in background - use run_in_background parameter instead\\n- Commands that should run in background:\\n  * Long-running servers (e.g., `npm start`, `python -m http.server`, `node server.js`)\\n  * Watch/monitoring tasks (e.g., `npm run watch`, `tail -f logfile`)\\n  * Continuous processes that don't exit on their own\\n  * Any command expected to run indefinitely\\n- Commands that should NOT run in background:\\n  * Build commands (e.g., `npm run build`, `go build`)\\n  * Test suites (e.g., `npm test`, `pytest`)\\n  * Git operations\\n  * File operations\\n  * Short-lived scripts\\n</background_execution>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with attribution using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does, try to keep it under 30 characters or so\",\"type\":\"string\"},\"run_in_background\":{\"description\":\"Set to true (boolean) to run this command in the background. Use job_output to read the output later.\",\"type\":\"boolean\"},\"working_dir\":{\"description\":\"The working directory to execute the command in (defaults to current directory)\",\"type\":\"string\"}},\"required\":[\"description\",\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n3. **CRITICAL**: Note exact whitespace, indentation, and formatting from View output\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n  </special_cases>\\n\\n<critical_requirements>\\nEXACT MATCHING: The tool is extremely literal. Text must match **EXACTLY**\\n\\n- Every space and tab character\\n- Every blank line\\n- Every newline character\\n- Indentation level (count the spaces/tabs)\\n- Comment spacing (`// comment` vs `//comment`)\\n- Brace positioning (`func() {` vs `func(){`)\\n\\nCommon failures:\\n\\n```\\nExpected: \\\"    func foo() {\\\"     (4 spaces)\\nProvided: \\\"  func foo() {\\\"       (2 spaces) ❌ FAILS\\n\\nExpected: \\\"}\\\\n\\\\nfunc bar() {\\\"    (2 newlines)\\nProvided: \\\"}\\\\nfunc bar() {\\\"      (1 newline) ❌ FAILS\\n\\nExpected: \\\"// Comment\\\"           (space after //)\\nProvided: \\\"//Comment\\\"            (no space) ❌ FAILS\\n```\\n\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n- If text appears multiple times, add more context to make it unique\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION BEFORE USING: Before every edit\\n\\n1. View the file and locate exact target location\\n2. Check how many instances of target text exist\\n3. Copy the EXACT text including all whitespace\\n4. Verify you have enough context for unique identification\\n5. Double-check indentation matches (count spaces/tabs)\\n6. Plan separate calls or use replace_all for multiple changes\\n   </critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n- Indentation is off by even one space\\n- Missing or extra blank lines\\n- Wrong tabs vs spaces\\n</warnings>\\n\\n<recovery_steps>\\nIf you get \\\"old_string not found in file\\\":\\n\\n1. **View the file again** at the specific location\\n2. **Copy more context** - include entire function if needed\\n3. **Check whitespace**:\\n   - Count indentation spaces/tabs\\n   - Look for blank lines\\n   - Check for trailing spaces\\n4. **Verify character-by-character** that your old_string matches\\n5. **Never guess** - always View the file to get exact text\\n   </recovery_steps>\\n\\n<best_practices>\\n\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n- **When in doubt, include MORE context rather than less**\\n- Match the existing code style exactly (spaces, tabs, blank lines)\\n  </best_practices>\\n\\n<whitespace_checklist>\\nBefore submitting an edit, verify:\\n\\n- [ ] Viewed the file first\\n- [ ] Counted indentation spaces/tabs\\n- [ ] Included blank lines if they exist\\n- [ ] Matched brace/bracket positioning\\n- [ ] Included 3-5 lines of surrounding context\\n- [ ] Verified text appears exactly once (or using replace_all)\\n- [ ] Copied text character-for-character, not approximated\\n      </whitespace_checklist>\\n\\n<examples>\\n✅ Correct: Exact match with context\\n\\n```\\nold_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    return nil\\\\n}\\\"\\n\\nnew_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    // New validation\\\\n    if len(input) > 1000 {\\\\n        return errors.New(\\\\\\\"input too long\\\\\\\")\\\\n    }\\\\n    return nil\\\\n}\\\"\\n```\\n\\n❌ Incorrect: Not enough context\\n\\n```\\nold_string: \\\"return nil\\\"  // Appears many times!\\n```\\n\\n❌ Incorrect: Wrong indentation\\n\\n```\\nold_string: \\\"  if input == \\\\\\\"\\\\\\\" {\\\"  // 2 spaces\\n// But file actually has:        \\\"    if input == \\\\\\\"\\\\\\\" {\\\"  // 4 spaces\\n```\\n\\n✅ Correct: Including context to make unique\\n\\n```\\nold_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    return nil\\\"\\n```\\n\\n</examples>\\n\\n<windows_notes>\\n\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n  </windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n3. CRITICAL: Note exact whitespace, indentation, and formatting from View output\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order.\\n- Each edit operates on result of previous edit.\\n- PARTIAL SUCCESS: If some edits fail, successful edits are still applied. Failed edits are returned in the response.\\n- File is modified if at least one edit succeeds.\\n- Ideal for several changes to different parts of same file.\\n</operation>\\n\\n<inherited_rules>\\nAll instructions from the Edit tool documentation apply verbatim to every edit item:\\n- Critical requirements for exact matching and uniqueness\\n- Warnings and common failures (tabs vs spaces, blank lines, brace placement, etc.)\\n- Verification steps before using, recovery steps, best practices, and whitespace checklist\\nUse the same level of precision as Edit. Multiedit often fails due to formatting mismatches—double-check whitespace for every edit.\\n</inherited_rules>\\n\\n<critical_requirements>\\n1. Apply Edit tool rules to EACH edit (see edit.md).\\n2. Edits are applied in order; successful edits are kept even if later edits fail.\\n3. Plan sequence carefully: earlier edits change the file content that later edits must match.\\n4. Ensure each old_string is unique at its application time (after prior edits).\\n5. Check the response for failed edits and retry them if needed.\\n</critical_requirements>\\n\\n<verification_before_using>\\n1. View the file and copy exact text (including whitespace) for each target.\\n2. Check how many instances each old_string has BEFORE the sequence starts.\\n3. Dry-run mentally: after applying edit #N, will edit #N+1 still match? Adjust old_string/new_string accordingly.\\n4. Prefer fewer, larger context blocks over many tiny fragments that are easy to misalign.\\n5. If edits are independent, consider separate multiedit batches per logical region.\\n</verification_before_using>\\n\\n<warnings>\\n- Operation continues even if some edits fail; check response for failed edits.\\n- Earlier edits can invalidate later matches (added/removed spaces, lines, or reordered text).\\n- Mixed tabs/spaces, trailing spaces, or missing blank lines commonly cause failures.\\n- replace_all may affect unintended regions—use carefully or provide more context.\\n</warnings>\\n\\n<recovery_steps>\\nIf some edits fail:\\n1. Check the response metadata for the list of failed edits with their error messages.\\n2. View the file again to see the current state after successful edits.\\n3. Adjust the failed edits based on the new file content.\\n4. Retry the failed edits with corrected old_string values.\\n5. Consider breaking complex batches into smaller, independent operations.\\n</recovery_steps>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code; don't leave code broken.\\n- Use absolute file paths (starting with /).\\n- Use replace_all only when you're certain; otherwise provide unique context.\\n- Match existing style exactly (spaces, tabs, blank lines).\\n- Review failed edits in the response and retry with corrections.\\n</best_practices>\\n\\n<whitespace_checklist>\\nFor EACH edit, verify:\\n- [ ] Viewed the file first\\n- [ ] Counted indentation spaces/tabs\\n- [ ] Included blank lines if present\\n- [ ] Matched brace/bracket positioning\\n- [ ] Included 3–5 lines of surrounding context\\n- [ ] Verified text appears exactly once (or using replace_all deliberately)\\n- [ ] Copied text character-for-character, not approximated\\n</whitespace_checklist>\\n\\n<examples>\\n✅ Correct: Sequential edits where the second match accounts for the first change\\n\\n```\\nedits: [\\n  {\\n    old_string: \\\"func A() {\\\\n    doOld()\\\\n}\\\",\\n    new_string: \\\"func A() {\\\\n    doNew()\\\\n}\\\",\\n  },\\n  {\\n    // Uses context that still exists AFTER the first replacement\\n    old_string: \\\"func B() {\\\\n    callA()\\\\n}\\\",\\n    new_string: \\\"func B() {\\\\n    callA()\\\\n    logChange()\\\\n}\\\",\\n  },\\n]\\n```\\n\\n❌ Incorrect: Second old_string no longer matches due to whitespace change introduced by the first edit\\n\\n```\\nedits: [\\n  {\\n    old_string: \\\"func A() {\\\\n    doOld()\\\\n}\\\",\\n    new_string: \\\"func A() {\\\\n\\\\n    doNew()\\\\n}\\\", // Added extra blank line\\n  },\\n  {\\n    old_string: \\\"func A() {\\\\n    doNew()\\\\n}\\\", // Missing the new blank line, will FAIL\\n    new_string: \\\"func A() {\\\\n    doNew()\\\\n    logChange()\\\\n}\\\",\\n  },\\n]\\n```\\n\\n✅ Correct: Handling partial success\\n\\n```\\n// If edit 2 fails, edit 1 is still applied\\n// Response will indicate:\\n// - edits_applied: 1\\n// - edits_failed: [{index: 2, error: \\\"...\\\", edit: {...}}]\\n// You can then retry edit 2 with corrected context\\n```\\n</examples>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches raw content from URL and returns it in specified format without any AI processing.\\n\\n<when_to_use>\\nUse this tool when you need:\\n- Raw, unprocessed content from a URL\\n- Direct access to API responses or JSON data\\n- HTML/text/markdown content without interpretation\\n- Simple, fast content retrieval without analysis\\n- To save tokens by avoiding AI processing\\n\\nDO NOT use this tool when you need to:\\n- Extract specific information from a webpage (use agentic_fetch instead)\\n- Answer questions about web content (use agentic_fetch instead)\\n- Analyze or summarize web pages (use agentic_fetch instead)\\n</when_to_use>\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Fast and lightweight - no AI processing\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Returns raw content only - no analysis or extraction\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n- If the user asks to analyze or extract from a page, use agentic_fetch instead\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
 73    headers:
 74      Accept:
 75      - application/json
 76      Content-Type:
 77      - application/json
 78      User-Agent:
 79      - OpenAI/Go 2.7.1
 80    url: https://api.openai.com/v1/chat/completions
 81    method: POST
 82  response:
 83    proto: HTTP/2.0
 84    proto_major: 2
 85    proto_minor: 0
 86    content_length: -1
 87    body: |+
 88      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":null,"tool_calls":[{"index":0,"id":"call_USIFCiGMPKSm57dyOc4zfoJ9","type":"function","function":{"name":"sourcegraph","arguments":""}}],"refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"ueCop"}
 89
 90      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"{\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"drReGDgjRr92JGn"}
 91
 92      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"query"}}]},"finish_reason":null}],"usage":null,"obfuscation":"koZ7Sj4BmkZL7"}
 93
 94      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\":\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"vpjyuXIskeDwR"}
 95
 96      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"lang"}}]},"finish_reason":null}],"usage":null,"obfuscation":"pPWQRUMVIIjje6"}
 97
 98      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"y"}
 99
100      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"go"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
101
102      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" content"}}]},"finish_reason":null}],"usage":null,"obfuscation":"IQbT8KfMpo"}
103
104      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":":\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"Rubl3xMhLZJ9B"}
105
106      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"func"}}]},"finish_reason":null}],"usage":null,"obfuscation":"OBB6cfCC18oIRg"}
107
108      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" main"}}]},"finish_reason":null}],"usage":null,"obfuscation":"K8qJCnfKALRV1"}
109
110      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"(\\\""}}]},"finish_reason":null}],"usage":null,"obfuscation":"xsysXKDEyJWKP"}
111
112      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" type"}}]},"finish_reason":null}],"usage":null,"obfuscation":"M97uHE48DI1Tz"}
113
114      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":":file"}}]},"finish_reason":null}],"usage":null,"obfuscation":"n9ODSqywgi9HW"}
115
116      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" count"}}]},"finish_reason":null}],"usage":null,"obfuscation":"hjZGmlbZmUoC"}
117
118      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"k"}
119
120      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"10"}}]},"finish_reason":null}],"usage":null,"obfuscation":""}
121
122      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":" select"}}]},"finish_reason":null}],"usage":null,"obfuscation":"MUDDx7nXEZF"}
123
124      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":":"}}]},"finish_reason":null}],"usage":null,"obfuscation":"l"}
125
126      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"content"}}]},"finish_reason":null}],"usage":null,"obfuscation":"rhV4HovL0Sh"}
127
128      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"tool_calls":[{"index":0,"function":{"arguments":"\"}"}}]},"finish_reason":null}],"usage":null,"obfuscation":"eLtai7PM9vLdj70"}
129
130      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"tool_calls"}],"usage":null,"obfuscation":""}
131
132      data: {"id":"chatcmpl-Cb4njGHiX6gXqQwsLNImJdbnaZGUK","object":"chat.completion.chunk","created":1762952627,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":10301,"completion_tokens":294,"total_tokens":10595,"prompt_tokens_details":{"cached_tokens":2688,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":256,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"RXERebkGE61zTrI"}
133
134      data: [DONE]
135
136    headers:
137      Content-Type:
138      - text/event-stream; charset=utf-8
139    status: 200 OK
140    code: 200
141    duration: 7.029150875s
142- id: 2
143  request:
144    proto: HTTP/1.1
145    proto_major: 1
146    proto_minor: 1
147    content_length: 471
148    host: sourcegraph.com
149    body: '{"query":"query Search($query: String!) { search(query: $query, version: V2, patternType: keyword ) { results { matchCount, limitHit, resultCount, approximateResultCount, missing { name }, timedout { name }, indexUnavailable, results { __typename, ... on FileMatch { repository { name }, file { path, url, content }, lineMatches { preview, lineNumber, offsetAndLengths } } } } } }","variables":{"query":"lang:go content:\"func main(\" type:file count:10 select:content"}}'
150    headers:
151      Content-Type:
152      - application/json
153      User-Agent:
154      - crush/1.0
155    url: https://sourcegraph.com/.api/graphql
156    method: POST
157  response:
158    proto: HTTP/2.0
159    proto_major: 2
160    proto_minor: 0
161    content_length: -1
162    uncompressed: true
163    body: '{"data":{"search":{"results":{"matchCount":10,"limitHit":true,"resultCount":10,"approximateResultCount":"10+","missing":[],"timedout":[],"indexUnavailable":false,"results":[{"__typename":"FileMatch","repository":{"name":"github.com/yinchengtsinghua/go-ethereum-chinese"},"file":{"path":"cmd/wnode/main.go","url":"/github.com/yinchengtsinghua/go-ethereum-chinese/-/blob/cmd/wnode/main.go","content":"\n//此源码被清华学神尹成大魔王专业翻译分析并修改\n//尹成QQ77025077\n//尹成微信18510341407\n//尹成所在QQ群721929980\n//尹成邮箱 yinc13@mails.tsinghua.edu.cn\n//尹成毕业于清华大学,微软区块链领域全球最有价值专家\n//https://mvp.microsoft.com/zh-cn/PublicProfile/4033620\n//版权所有2017 Go Ethereum作者\n//此文件是Go以太坊的一部分。\n//\n//Go以太坊是免费软件:您可以重新发布和/或修改它\n//根据GNU通用公共许可证的条款\n//自由软件基金会,或者许可证的第3版,或者\n//(由您选择)任何更高版本。\n//\n//Go以太坊的分布希望它会有用,\n//但没有任何保证;甚至没有\n//适销性或特定用途的适用性。见\n//GNU通用公共许可证了解更多详细信息。\n//\n//你应该已经收到一份GNU通用公共许可证的副本\n//一起去以太坊吧。如果没有,请参见\u003chttp://www.gnu.org/licenses/\u003e。\n\n//这是一个简单的耳语节点。它可以用作独立的引导节点。\n//也可用于不同的测试和诊断目的。\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"crypto/ecdsa\"\n\tcrand \"crypto/rand\"\n\t\"crypto/sha512\"\n\t\"encoding/binary\"\n\t\"encoding/hex\"\n\t\"flag\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strconv\"\n\t\"strings\"\n\t\"time\"\n\n\t\"github.com/ethereum/go-ethereum/cmd/utils\"\n\t\"github.com/ethereum/go-ethereum/common\"\n\t\"github.com/ethereum/go-ethereum/console\"\n\t\"github.com/ethereum/go-ethereum/crypto\"\n\t\"github.com/ethereum/go-ethereum/log\"\n\t\"github.com/ethereum/go-ethereum/p2p\"\n\t\"github.com/ethereum/go-ethereum/p2p/enode\"\n\t\"github.com/ethereum/go-ethereum/p2p/nat\"\n\t\"github.com/ethereum/go-ethereum/whisper/mailserver\"\n\twhisper \"github.com/ethereum/go-ethereum/whisper/whisperv6\"\n\t\"golang.org/x/crypto/pbkdf2\"\n)\n\nconst quitCommand = \"~Q\"\nconst entropySize = 32\n\n//独生子女\nvar (\n\tserver     *p2p.Server\n\tshh        *whisper.Whisper\n\tdone       chan struct{}\n\tmailServer mailserver.WMailServer\n\tentropy    [entropySize]byte\n\n\tinput = bufio.NewReader(os.Stdin)\n)\n\n//加密\nvar (\n\tsymKey  []byte\n\tpub     *ecdsa.PublicKey\n\tasymKey *ecdsa.PrivateKey\n\tnodeid  *ecdsa.PrivateKey\n\ttopic   whisper.TopicType\n\n\tasymKeyID    string\n\tasymFilterID string\n\tsymFilterID  string\n\tsymPass      string\n\tmsPassword   string\n)\n\n//CMD参数\nvar (\n\tbootstrapMode  = flag.Bool(\"standalone\", false, \"boostrap node: don''t initiate connection to peers, just wait for incoming connections\")\n\tforwarderMode  = flag.Bool(\"forwarder\", false, \"forwarder mode: only forward messages, neither encrypt nor decrypt messages\")\n\tmailServerMode = flag.Bool(\"mailserver\", false, \"mail server mode: delivers expired messages on demand\")\n\trequestMail    = flag.Bool(\"mailclient\", false, \"request expired messages from the bootstrap server\")\n\tasymmetricMode = flag.Bool(\"asym\", false, \"use asymmetric encryption\")\n\tgenerateKey    = flag.Bool(\"generatekey\", false, \"generate and show the private key\")\n\tfileExMode     = flag.Bool(\"fileexchange\", false, \"file exchange mode\")\n\tfileReader     = flag.Bool(\"filereader\", false, \"load and decrypt messages saved as files, display as plain text\")\n\ttestMode       = flag.Bool(\"test\", false, \"use of predefined parameters for diagnostics (password, etc.)\")\n\techoMode       = flag.Bool(\"echo\", false, \"echo mode: prints some arguments for diagnostics\")\n\n\targVerbosity = flag.Int(\"verbosity\", int(log.LvlError), \"log verbosity level\")\n\targTTL       = flag.Uint(\"ttl\", 30, \"time-to-live for messages in seconds\")\n\targWorkTime  = flag.Uint(\"work\", 5, \"work time in seconds\")\n\targMaxSize   = flag.Uint(\"maxsize\", uint(whisper.DefaultMaxMessageSize), \"max size of message\")\n\targPoW       = flag.Float64(\"pow\", whisper.DefaultMinimumPoW, \"PoW for normal messages in float format (e.g. 2.7)\")\n\targServerPoW = flag.Float64(\"mspow\", whisper.DefaultMinimumPoW, \"PoW requirement for Mail Server request\")\n\n\targIP      = flag.String(\"ip\", \"\", \"IP address and port of this node (e.g. 127.0.0.1:30303)\")\n\targPub     = flag.String(\"pub\", \"\", \"public key for asymmetric encryption\")\n\targDBPath  = flag.String(\"dbpath\", \"\", \"path to the server''s DB directory\")\n\targIDFile  = flag.String(\"idfile\", \"\", \"file name with node id (private key)\")\nargEnode   = flag.String(\"boot\", \"\", \"bootstrap node you want to connect to (e.g. enode://E454……08D50@52.176.211.200:16428)”)\n\targTopic   = flag.String(\"topic\", \"\", \"topic in hexadecimal format (e.g. 70a4beef)\")\n\targSaveDir = flag.String(\"savedir\", \"\", \"directory where all incoming messages will be saved as files\")\n)\n\nfunc main() {\n\tprocessArgs()\n\tinitialize()\n\trun()\n\tshutdown()\n}\n\nfunc processArgs() {\n\tflag.Parse()\n\n\tif len(*argIDFile) \u003e 0 {\n\t\tvar err error\n\t\tnodeid, err = crypto.LoadECDSA(*argIDFile)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to load file [%s]: %s.\", *argIDFile, err)\n\t\t}\n\t}\n\nconst enodePrefix = \"enode://“\n\tif len(*argEnode) \u003e 0 {\n\t\tif (*argEnode)[:len(enodePrefix)] != enodePrefix {\n\t\t\t*argEnode = enodePrefix + *argEnode\n\t\t}\n\t}\n\n\tif len(*argTopic) \u003e 0 {\n\t\tx, err := hex.DecodeString(*argTopic)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to parse the topic: %s\", err)\n\t\t}\n\t\ttopic = whisper.BytesToTopic(x)\n\t}\n\n\tif *asymmetricMode \u0026\u0026 len(*argPub) \u003e 0 {\n\t\tvar err error\n\t\tif pub, err = crypto.UnmarshalPubkey(common.FromHex(*argPub)); err != nil {\n\t\t\tutils.Fatalf(\"invalid public key\")\n\t\t}\n\t}\n\n\tif len(*argSaveDir) \u003e 0 {\n\t\tif _, err := os.Stat(*argSaveDir); os.IsNotExist(err) {\n\t\t\tutils.Fatalf(\"Download directory ''%s'' does not exist\", *argSaveDir)\n\t\t}\n\t} else if *fileExMode {\n\t\tutils.Fatalf(\"Parameter ''savedir'' is mandatory for file exchange mode\")\n\t}\n\n\tif *echoMode {\n\t\techo()\n\t}\n}\n\nfunc echo() {\n\tfmt.Printf(\"ttl = %d \\n\", *argTTL)\n\tfmt.Printf(\"workTime = %d \\n\", *argWorkTime)\n\tfmt.Printf(\"pow = %f \\n\", *argPoW)\n\tfmt.Printf(\"mspow = %f \\n\", *argServerPoW)\n\tfmt.Printf(\"ip = %s \\n\", *argIP)\n\tfmt.Printf(\"pub = %s \\n\", common.ToHex(crypto.FromECDSAPub(pub)))\n\tfmt.Printf(\"idfile = %s \\n\", *argIDFile)\n\tfmt.Printf(\"dbpath = %s \\n\", *argDBPath)\n\tfmt.Printf(\"boot = %s \\n\", *argEnode)\n}\n\nfunc initialize() {\n\tlog.Root().SetHandler(log.LvlFilterHandler(log.Lvl(*argVerbosity), log.StreamHandler(os.Stderr, log.TerminalFormat(false))))\n\n\tdone = make(chan struct{})\n\tvar peers []*enode.Node\n\tvar err error\n\n\tif *generateKey {\n\t\tkey, err := crypto.GenerateKey()\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to generate private key: %s\", err)\n\t\t}\n\t\tk := hex.EncodeToString(crypto.FromECDSA(key))\n\t\tfmt.Printf(\"Random private key: %s \\n\", k)\n\t\tos.Exit(0)\n\t}\n\n\tif *testMode {\nsymPass = \"wwww\" //ASCII码:0x77777777\n\t\tmsPassword = \"wwww\"\n\t}\n\n\tif *bootstrapMode {\n\t\tif len(*argIP) == 0 {\n\t\t\targIP = scanLineA(\"Please enter your IP and port (e.g. 127.0.0.1:30348): \")\n\t\t}\n\t} else if *fileReader {\n\t\t*bootstrapMode = true\n\t} else {\n\t\tif len(*argEnode) == 0 {\n\t\t\targEnode = scanLineA(\"Please enter the peer''s enode: \")\n\t\t}\n\t\tpeer := enode.MustParseV4(*argEnode)\n\t\tpeers = append(peers, peer)\n\t}\n\n\tif *mailServerMode {\n\t\tif len(msPassword) == 0 {\n\t\t\tmsPassword, err = console.Stdin.PromptPassword(\"Please enter the Mail Server password: \")\n\t\t\tif err != nil {\n\t\t\t\tutils.Fatalf(\"Failed to read Mail Server password: %s\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tcfg := \u0026whisper.Config{\n\t\tMaxMessageSize:     uint32(*argMaxSize),\n\t\tMinimumAcceptedPOW: *argPoW,\n\t}\n\n\tshh = whisper.New(cfg)\n\n\tif *argPoW != whisper.DefaultMinimumPoW {\n\t\terr := shh.SetMinimumPoW(*argPoW)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to set PoW: %s\", err)\n\t\t}\n\t}\n\n\tif uint32(*argMaxSize) != whisper.DefaultMaxMessageSize {\n\t\terr := shh.SetMaxMessageSize(uint32(*argMaxSize))\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to set max message size: %s\", err)\n\t\t}\n\t}\n\n\tasymKeyID, err = shh.NewKeyPair()\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to generate a new key pair: %s\", err)\n\t}\n\n\tasymKey, err = shh.GetPrivateKey(asymKeyID)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to retrieve a new key pair: %s\", err)\n\t}\n\n\tif nodeid == nil {\n\t\ttmpID, err := shh.NewKeyPair()\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to generate a new key pair: %s\", err)\n\t\t}\n\n\t\tnodeid, err = shh.GetPrivateKey(tmpID)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to retrieve a new key pair: %s\", err)\n\t\t}\n\t}\n\n\tmaxPeers := 80\n\tif *bootstrapMode {\n\t\tmaxPeers = 800\n\t}\n\n\t_, err = crand.Read(entropy[:])\n\tif err != nil {\n\t\tutils.Fatalf(\"crypto/rand failed: %s\", err)\n\t}\n\n\tif *mailServerMode {\n\t\tshh.RegisterServer(\u0026mailServer)\n\t\tif err := mailServer.Init(shh, *argDBPath, msPassword, *argServerPoW); err != nil {\n\t\t\tutils.Fatalf(\"Failed to init MailServer: %s\", err)\n\t\t}\n\t}\n\n\tserver = \u0026p2p.Server{\n\t\tConfig: p2p.Config{\n\t\t\tPrivateKey:     nodeid,\n\t\t\tMaxPeers:       maxPeers,\n\t\t\tName:           common.MakeName(\"wnode\", \"6.0\"),\n\t\t\tProtocols:      shh.Protocols(),\n\t\t\tListenAddr:     *argIP,\n\t\t\tNAT:            nat.Any(),\n\t\t\tBootstrapNodes: peers,\n\t\t\tStaticNodes:    peers,\n\t\t\tTrustedNodes:   peers,\n\t\t},\n\t}\n}\n\nfunc startServer() error {\n\terr := server.Start()\n\tif err != nil {\n\t\tfmt.Printf(\"Failed to start Whisper peer: %s.\", err)\n\t\treturn err\n\t}\n\n\tfmt.Printf(\"my public key: %s \\n\", common.ToHex(crypto.FromECDSAPub(\u0026asymKey.PublicKey)))\n\tfmt.Println(server.NodeInfo().Enode)\n\n\tif *bootstrapMode {\n\t\tconfigureNode()\n\t\tfmt.Println(\"Bootstrap Whisper node started\")\n\t} else {\n\t\tfmt.Println(\"Whisper node started\")\n//首先看看我们是否可以建立连接,然后请求用户输入\n\t\twaitForConnection(true)\n\t\tconfigureNode()\n\t}\n\n\tif *fileExMode {\n\t\tfmt.Printf(\"Please type the file name to be send. To quit type: ''%s''\\n\", quitCommand)\n\t} else if *fileReader {\n\t\tfmt.Printf(\"Please type the file name to be decrypted. To quit type: ''%s''\\n\", quitCommand)\n\t} else if !*forwarderMode {\n\t\tfmt.Printf(\"Please type the message. To quit type: ''%s''\\n\", quitCommand)\n\t}\n\treturn nil\n}\n\nfunc configureNode() {\n\tvar err error\n\tvar p2pAccept bool\n\n\tif *forwarderMode {\n\t\treturn\n\t}\n\n\tif *asymmetricMode {\n\t\tif len(*argPub) == 0 {\n\t\t\ts := scanLine(\"Please enter the peer''s public key: \")\n\t\t\tb := common.FromHex(s)\n\t\t\tif b == nil {\n\t\t\t\tutils.Fatalf(\"Error: can not convert hexadecimal string\")\n\t\t\t}\n\t\t\tif pub, err = crypto.UnmarshalPubkey(b); err != nil {\n\t\t\t\tutils.Fatalf(\"Error: invalid peer public key\")\n\t\t\t}\n\t\t}\n\t}\n\n\tif *requestMail {\n\t\tp2pAccept = true\n\t\tif len(msPassword) == 0 {\n\t\t\tmsPassword, err = console.Stdin.PromptPassword(\"Please enter the Mail Server password: \")\n\t\t\tif err != nil {\n\t\t\t\tutils.Fatalf(\"Failed to read Mail Server password: %s\", err)\n\t\t\t}\n\t\t}\n\t}\n\n\tif !*asymmetricMode \u0026\u0026 !*forwarderMode {\n\t\tif len(symPass) == 0 {\n\t\t\tsymPass, err = console.Stdin.PromptPassword(\"Please enter the password for symmetric encryption: \")\n\t\t\tif err != nil {\n\t\t\t\tutils.Fatalf(\"Failed to read passphrase: %v\", err)\n\t\t\t}\n\t\t}\n\n\t\tsymKeyID, err := shh.AddSymKeyFromPassword(symPass)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to create symmetric key: %s\", err)\n\t\t}\n\t\tsymKey, err = shh.GetSymKey(symKeyID)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to save symmetric key: %s\", err)\n\t\t}\n\t\tif len(*argTopic) == 0 {\n\t\t\tgenerateTopic([]byte(symPass))\n\t\t}\n\n\t\tfmt.Printf(\"Filter is configured for the topic: %x \\n\", topic)\n\t}\n\n\tif *mailServerMode {\n\t\tif len(*argDBPath) == 0 {\n\t\t\targDBPath = scanLineA(\"Please enter the path to DB file: \")\n\t\t}\n\t}\n\n\tsymFilter := whisper.Filter{\n\t\tKeySym:   symKey,\n\t\tTopics:   [][]byte{topic[:]},\n\t\tAllowP2P: p2pAccept,\n\t}\n\tsymFilterID, err = shh.Subscribe(\u0026symFilter)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to install filter: %s\", err)\n\t}\n\n\tasymFilter := whisper.Filter{\n\t\tKeyAsym:  asymKey,\n\t\tTopics:   [][]byte{topic[:]},\n\t\tAllowP2P: p2pAccept,\n\t}\n\tasymFilterID, err = shh.Subscribe(\u0026asymFilter)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to install filter: %s\", err)\n\t}\n}\n\nfunc generateTopic(password []byte) {\n\tx := pbkdf2.Key(password, password, 4096, 128, sha512.New)\n\tfor i := 0; i \u003c len(x); i++ {\n\t\ttopic[i%whisper.TopicLength] ^= x[i]\n\t}\n}\n\nfunc waitForConnection(timeout bool) {\n\tvar cnt int\n\tvar connected bool\n\tfor !connected {\n\t\ttime.Sleep(time.Millisecond * 50)\n\t\tconnected = server.PeerCount() \u003e 0\n\t\tif timeout {\n\t\t\tcnt++\n\t\t\tif cnt \u003e 1000 {\n\t\t\t\tutils.Fatalf(\"Timeout expired, failed to connect\")\n\t\t\t}\n\t\t}\n\t}\n\n\tfmt.Println(\"Connected to peer.\")\n}\n\nfunc run() {\n\terr := startServer()\n\tif err != nil {\n\t\treturn\n\t}\n\tdefer server.Stop()\n\tshh.Start(nil)\n\tdefer shh.Stop()\n\n\tif !*forwarderMode {\n\t\tgo messageLoop()\n\t}\n\n\tif *requestMail {\n\t\trequestExpiredMessagesLoop()\n\t} else if *fileExMode {\n\t\tsendFilesLoop()\n\t} else if *fileReader {\n\t\tfileReaderLoop()\n\t} else {\n\t\tsendLoop()\n\t}\n}\n\nfunc shutdown() {\n\tclose(done)\n\tmailServer.Close()\n}\n\nfunc sendLoop() {\n\tfor {\n\t\ts := scanLine(\"\")\n\t\tif s == quitCommand {\n\t\t\tfmt.Println(\"Quit command received\")\n\t\t\treturn\n\t\t}\n\t\tsendMsg([]byte(s))\n\t\tif *asymmetricMode {\n//为方便起见,请打印您自己的消息,\n//因为在非对称模式下是不可能解密的\n\t\t\ttimestamp := time.Now().Unix()\n\t\t\tfrom := crypto.PubkeyToAddress(asymKey.PublicKey)\n\t\t\tfmt.Printf(\"\\n%d \u003c%x\u003e: %s\\n\", timestamp, from, s)\n\t\t}\n\t}\n}\n\nfunc sendFilesLoop() {\n\tfor {\n\t\ts := scanLine(\"\")\n\t\tif s == quitCommand {\n\t\t\tfmt.Println(\"Quit command received\")\n\t\t\treturn\n\t\t}\n\t\tb, err := ioutil.ReadFile(s)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"\u003e\u003e\u003e Error: %s \\n\", err)\n\t\t} else {\n\t\t\th := sendMsg(b)\n\t\t\tif (h == common.Hash{}) {\n\t\t\t\tfmt.Printf(\"\u003e\u003e\u003e Error: message was not sent \\n\")\n\t\t\t} else {\n\t\t\t\ttimestamp := time.Now().Unix()\n\t\t\t\tfrom := crypto.PubkeyToAddress(asymKey.PublicKey)\n\t\t\t\tfmt.Printf(\"\\n%d \u003c%x\u003e: sent message with hash %x\\n\", timestamp, from, h)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc fileReaderLoop() {\n\twatcher1 := shh.GetFilter(symFilterID)\n\twatcher2 := shh.GetFilter(asymFilterID)\n\tif watcher1 == nil \u0026\u0026 watcher2 == nil {\n\t\tfmt.Println(\"Error: neither symmetric nor asymmetric filter is installed\")\n\t\treturn\n\t}\n\n\tfor {\n\t\ts := scanLine(\"\")\n\t\tif s == quitCommand {\n\t\t\tfmt.Println(\"Quit command received\")\n\t\t\treturn\n\t\t}\n\t\traw, err := ioutil.ReadFile(s)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"\u003e\u003e\u003e Error: %s \\n\", err)\n\t\t} else {\nenv := whisper.Envelope{Data: raw} //主题为零\nmsg := env.Open(watcher1)          //不管主题如何,都强制打开信封\n\t\t\tif msg == nil {\n\t\t\t\tmsg = env.Open(watcher2)\n\t\t\t}\n\t\t\tif msg == nil {\n\t\t\t\tfmt.Printf(\"\u003e\u003e\u003e Error: failed to decrypt the message \\n\")\n\t\t\t} else {\n\t\t\t\tprintMessageInfo(msg)\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc scanLine(prompt string) string {\n\tif len(prompt) \u003e 0 {\n\t\tfmt.Print(prompt)\n\t}\n\ttxt, err := input.ReadString(''\\n'')\n\tif err != nil {\n\t\tutils.Fatalf(\"input error: %s\", err)\n\t}\n\ttxt = strings.TrimRight(txt, \"\\n\\r\")\n\treturn txt\n}\n\nfunc scanLineA(prompt string) *string {\n\ts := scanLine(prompt)\n\treturn \u0026s\n}\n\nfunc scanUint(prompt string) uint32 {\n\ts := scanLine(prompt)\n\ti, err := strconv.Atoi(s)\n\tif err != nil {\n\t\tutils.Fatalf(\"Fail to parse the lower time limit: %s\", err)\n\t}\n\treturn uint32(i)\n}\n\nfunc sendMsg(payload []byte) common.Hash {\n\tparams := whisper.MessageParams{\n\t\tSrc:      asymKey,\n\t\tDst:      pub,\n\t\tKeySym:   symKey,\n\t\tPayload:  payload,\n\t\tTopic:    topic,\n\t\tTTL:      uint32(*argTTL),\n\t\tPoW:      *argPoW,\n\t\tWorkTime: uint32(*argWorkTime),\n\t}\n\n\tmsg, err := whisper.NewSentMessage(\u0026params)\n\tif err != nil {\n\t\tutils.Fatalf(\"failed to create new message: %s\", err)\n\t}\n\n\tenvelope, err := msg.Wrap(\u0026params)\n\tif err != nil {\n\t\tfmt.Printf(\"failed to seal message: %v \\n\", err)\n\t\treturn common.Hash{}\n\t}\n\n\terr = shh.Send(envelope)\n\tif err != nil {\n\t\tfmt.Printf(\"failed to send message: %v \\n\", err)\n\t\treturn common.Hash{}\n\t}\n\n\treturn envelope.Hash()\n}\n\nfunc messageLoop() {\n\tsf := shh.GetFilter(symFilterID)\n\tif sf == nil {\n\t\tutils.Fatalf(\"symmetric filter is not installed\")\n\t}\n\n\taf := shh.GetFilter(asymFilterID)\n\tif af == nil {\n\t\tutils.Fatalf(\"asymmetric filter is not installed\")\n\t}\n\n\tticker := time.NewTicker(time.Millisecond * 50)\n\n\tfor {\n\t\tselect {\n\t\tcase \u003c-ticker.C:\n\t\t\tm1 := sf.Retrieve()\n\t\t\tm2 := af.Retrieve()\n\t\t\tmessages := append(m1, m2...)\n\t\t\tfor _, msg := range messages {\n\t\t\t\treportedOnce := false\n\t\t\t\tif !*fileExMode \u0026\u0026 len(msg.Payload) \u003c= 2048 {\n\t\t\t\t\tprintMessageInfo(msg)\n\t\t\t\t\treportedOnce = true\n\t\t\t\t}\n\n//在指定argsavedir时保存所有消息。\n//FileExMode仅指定消息保存后如何显示在控制台上。\n//如果fileexmode==true,则只显示哈希值,因为消息可能太大。\n\t\t\t\tif len(*argSaveDir) \u003e 0 {\n\t\t\t\t\twriteMessageToFile(*argSaveDir, msg, !reportedOnce)\n\t\t\t\t}\n\t\t\t}\n\t\tcase \u003c-done:\n\t\t\treturn\n\t\t}\n\t}\n}\n\nfunc printMessageInfo(msg *whisper.ReceivedMessage) {\ntimestamp := fmt.Sprintf(\"%d\", msg.Sent) //用于诊断的Unix时间戳\n\ttext := string(msg.Payload)\n\n\tvar address common.Address\n\tif msg.Src != nil {\n\t\taddress = crypto.PubkeyToAddress(*msg.Src)\n\t}\n\n\tif whisper.IsPubKeyEqual(msg.Src, \u0026asymKey.PublicKey) {\nfmt.Printf(\"\\n%s \u003c%x\u003e: %s\\n\", timestamp, address, text) //我的信息\n\t} else {\nfmt.Printf(\"\\n%s [%x]: %s\\n\", timestamp, address, text) //来自对等方的消息\n\t}\n}\n\nfunc writeMessageToFile(dir string, msg *whisper.ReceivedMessage, show bool) {\n\tif len(dir) == 0 {\n\t\treturn\n\t}\n\n\ttimestamp := fmt.Sprintf(\"%d\", msg.Sent)\n\tname := fmt.Sprintf(\"%x\", msg.EnvelopeHash)\n\n\tvar address common.Address\n\tif msg.Src != nil {\n\t\taddress = crypto.PubkeyToAddress(*msg.Src)\n\t}\n\n\tenv := shh.GetEnvelope(msg.EnvelopeHash)\n\tif env == nil {\n\t\tfmt.Printf(\"\\nUnexpected error: envelope not found: %x\\n\", msg.EnvelopeHash)\n\t\treturn\n\t}\n\n//这是一个示例代码;如果不想保存自己的消息,请取消注释。\n//如果whisper.ispubkeyequal(msg.src,\u0026asymkey.publickey)\n//fmt.printf(“\\n%s\u003c%x\u003e:我收到的消息,未保存:“%s''\\n”,时间戳,地址,名称)\n//返回\n//}\n\n\tfullpath := filepath.Join(dir, name)\n\terr := ioutil.WriteFile(fullpath, env.Data, 0644)\n\tif err != nil {\n\t\tfmt.Printf(\"\\n%s {%x}: message received but not saved: %s\\n\", timestamp, address, err)\n\t} else if show {\n\t\tfmt.Printf(\"\\n%s {%x}: message received and saved as ''%s'' (%d bytes)\\n\", timestamp, address, name, len(env.Data))\n\t}\n}\n\nfunc requestExpiredMessagesLoop() {\n\tvar key, peerID, bloom []byte\n\tvar timeLow, timeUpp uint32\n\tvar t string\n\tvar xt whisper.TopicType\n\n\tkeyID, err := shh.AddSymKeyFromPassword(msPassword)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to create symmetric key for mail request: %s\", err)\n\t}\n\tkey, err = shh.GetSymKey(keyID)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to save symmetric key for mail request: %s\", err)\n\t}\n\tpeerID = extractIDFromEnode(*argEnode)\n\tshh.AllowP2PMessagesFromPeer(peerID)\n\n\tfor {\n\t\ttimeLow = scanUint(\"Please enter the lower limit of the time range (unix timestamp): \")\n\t\ttimeUpp = scanUint(\"Please enter the upper limit of the time range (unix timestamp): \")\n\t\tt = scanLine(\"Enter the topic (hex). Press enter to request all messages, regardless of the topic: \")\n\t\tif len(t) == whisper.TopicLength*2 {\n\t\t\tx, err := hex.DecodeString(t)\n\t\t\tif err != nil {\n\t\t\t\tfmt.Printf(\"Failed to parse the topic: %s \\n\", err)\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\txt = whisper.BytesToTopic(x)\n\t\t\tbloom = whisper.TopicToBloom(xt)\n\t\t\tobfuscateBloom(bloom)\n\t\t} else if len(t) == 0 {\n\t\t\tbloom = whisper.MakeFullNodeBloom()\n\t\t} else {\n\t\t\tfmt.Println(\"Error: topic is invalid, request aborted\")\n\t\t\tcontinue\n\t\t}\n\n\t\tif timeUpp == 0 {\n\t\t\ttimeUpp = 0xFFFFFFFF\n\t\t}\n\n\t\tdata := make([]byte, 8, 8+whisper.BloomFilterSize)\n\t\tbinary.BigEndian.PutUint32(data, timeLow)\n\t\tbinary.BigEndian.PutUint32(data[4:], timeUpp)\n\t\tdata = append(data, bloom...)\n\n\t\tvar params whisper.MessageParams\n\t\tparams.PoW = *argServerPoW\n\t\tparams.Payload = data\n\t\tparams.KeySym = key\n\t\tparams.Src = asymKey\n\t\tparams.WorkTime = 5\n\n\t\tmsg, err := whisper.NewSentMessage(\u0026params)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"failed to create new message: %s\", err)\n\t\t}\n\t\tenv, err := msg.Wrap(\u0026params)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Wrap failed: %s\", err)\n\t\t}\n\n\t\terr = shh.RequestHistoricMessages(peerID, env)\n\t\tif err != nil {\n\t\t\tutils.Fatalf(\"Failed to send P2P message: %s\", err)\n\t\t}\n\n\t\ttime.Sleep(time.Second * 5)\n\t}\n}\n\nfunc extractIDFromEnode(s string) []byte {\n\tn, err := enode.ParseV4(s)\n\tif err != nil {\n\t\tutils.Fatalf(\"Failed to parse enode: %s\", err)\n\t}\n\treturn n.ID().Bytes()\n}\n\n//模糊布卢姆增加16个随机位到布卢姆\n//筛选,以便混淆包含的主题。\n//它在每个会话中都具有确定性。\n//尽管有额外的位,它将平均匹配\n//比完整节点的Bloom过滤器少32000倍的消息。\nfunc obfuscateBloom(bloom []byte) {\n\tconst half = entropySize / 2\n\tfor i := 0; i \u003c half; i++ {\n\t\tx := int(entropy[i])\n\t\tif entropy[half+i] \u003c 128 {\n\t\t\tx += 256\n\t\t}\n\nbloom[x/8] = 1 \u003c\u003c uint(x%8) //设置位号x\n\t}\n}\n"},"lineMatches":[{"preview":"func main() {","lineNumber":116,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/netobserv/netobserv-ebpf-agent"},"file":{"path":"vendor/github.com/google/gnostic-models/extensions/extensions.go","url":"/github.com/netobserv/netobserv-ebpf-agent/-/blob/vendor/github.com/google/gnostic-models/extensions/extensions.go","content":"// Copyright 2017 Google LLC. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage gnostic_extension_v1\n\nimport (\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/types/known/anypb\"\n)\n\ntype extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)\n\n// Main implements the main program of an extension handler.\nfunc Main(handler extensionHandler) {\n\t// unpack the request\n\tdata, err := ioutil.ReadAll(os.Stdin)\n\tif err != nil {\n\t\tlog.Println(\"File error:\", err.Error())\n\t\tos.Exit(1)\n\t}\n\tif len(data) == 0 {\n\t\tlog.Println(\"No input data.\")\n\t\tos.Exit(1)\n\t}\n\trequest := \u0026ExtensionHandlerRequest{}\n\terr = proto.Unmarshal(data, request)\n\tif err != nil {\n\t\tlog.Println(\"Input error:\", err.Error())\n\t\tos.Exit(1)\n\t}\n\t// call the handler\n\thandled, output, err := handler(request.Wrapper.ExtensionName, request.Wrapper.Yaml)\n\t// respond with the output of the handler\n\tresponse := \u0026ExtensionHandlerResponse{\n\t\tHandled: false, // default assumption\n\t\tErrors:  make([]string, 0),\n\t}\n\tif err != nil {\n\t\tresponse.Errors = append(response.Errors, err.Error())\n\t} else if handled {\n\t\tresponse.Handled = true\n\t\tresponse.Value, err = anypb.New(output)\n\t\tif err != nil {\n\t\t\tresponse.Errors = append(response.Errors, err.Error())\n\t\t}\n\t}\n\tresponseBytes, _ := proto.Marshal(response)\n\tos.Stdout.Write(responseBytes)\n}\n"},"lineMatches":[{"preview":"func Main(handler extensionHandler) {","lineNumber":28,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/tektoncd/hub"},"file":{"path":"vendor/github.com/google/gnostic-models/extensions/extensions.go","url":"/github.com/tektoncd/hub/-/blob/vendor/github.com/google/gnostic-models/extensions/extensions.go","content":"// Copyright 2017 Google LLC. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//    http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage gnostic_extension_v1\n\nimport (\n\t\"io/ioutil\"\n\t\"log\"\n\t\"os\"\n\n\t\"google.golang.org/protobuf/proto\"\n\t\"google.golang.org/protobuf/types/known/anypb\"\n)\n\ntype extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)\n\n// Main implements the main program of an extension handler.\nfunc Main(handler extensionHandler) {\n\t// unpack the request\n\tdata, err := ioutil.ReadAll(os.Stdin)\n\tif err != nil {\n\t\tlog.Println(\"File error:\", err.Error())\n\t\tos.Exit(1)\n\t}\n\tif len(data) == 0 {\n\t\tlog.Println(\"No input data.\")\n\t\tos.Exit(1)\n\t}\n\trequest := \u0026ExtensionHandlerRequest{}\n\terr = proto.Unmarshal(data, request)\n\tif err != nil {\n\t\tlog.Println(\"Input error:\", err.Error())\n\t\tos.Exit(1)\n\t}\n\t// call the handler\n\thandled, output, err := handler(request.Wrapper.ExtensionName, request.Wrapper.Yaml)\n\t// respond with the output of the handler\n\tresponse := \u0026ExtensionHandlerResponse{\n\t\tHandled: false, // default assumption\n\t\tErrors:  make([]string, 0),\n\t}\n\tif err != nil {\n\t\tresponse.Errors = append(response.Errors, err.Error())\n\t} else if handled {\n\t\tresponse.Handled = true\n\t\tresponse.Value, err = anypb.New(output)\n\t\tif err != nil {\n\t\t\tresponse.Errors = append(response.Errors, err.Error())\n\t\t}\n\t}\n\tresponseBytes, _ := proto.Marshal(response)\n\tos.Stdout.Write(responseBytes)\n}\n"},"lineMatches":[{"preview":"func Main(handler extensionHandler) {","lineNumber":28,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/opencontainers/umoci"},"file":{"path":"cmd/umoci/main.go","url":"/github.com/opencontainers/umoci/-/blob/cmd/umoci/main.go","content":"// SPDX-License-Identifier: Apache-2.0\n/*\n * umoci: Umoci Modifies Open Containers'' Images\n * Copyright (C) 2016-2025 SUSE LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *    http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n// Package main is the cli implementation of umoci.\npackage main\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"runtime/pprof\"\n\n\t\"github.com/apex/log\"\n\tlogcli \"github.com/apex/log/handlers/cli\"\n\timeta \"github.com/opencontainers/image-spec/specs-go\"\n\trspec \"github.com/opencontainers/runtime-spec/specs-go\"\n\t\"github.com/urfave/cli\"\n\n\t\"github.com/opencontainers/umoci\"\n\t\"github.com/opencontainers/umoci/internal/testhelpers\"\n)\n\nconst (\n\tusage = `umoci modifies Open Container images`\n\n\t// Categories used to automatically monkey-patch flags to commands.\n\tcategoryLayout = \"layout\"\n\tcategoryImage  = \"image\"\n)\n\nfunc printVersion(c *cli.Context) {\n\tw := c.App.Writer\n\n\tfmt.Fprintln(w, \"umoci version\", c.App.Version) //nolint:errcheck // errors not relevant\n\tif testhelpers.IsTestBinary() {\n\t\t// This string is matched against in some tests (namely the xattr\n\t\t// masking tests) to detect whether the umoci binary can be used for\n\t\t// those tests. Make sure to update umoci-is-test-binary if you change\n\t\t// this string!\n\t\tfmt.Fprintln(w, \"== THIS UMOCI BINARY IS COMPILED IN TEST MODE ==\") //nolint:errcheck // errors not relevant\n\t}\n\tfmt.Fprintln(w, \"image spec:\", imeta.Version)   //nolint:errcheck // errors not relevant\n\tfmt.Fprintln(w, \"runtime spec:\", rspec.Version) //nolint:errcheck // errors not relevant\n\tfmt.Fprintln(w, \"go:\", runtime.Version())       //nolint:errcheck // errors not relevant\n}\n\n// Main is the underlying main() implementation. You can call this directly as\n// though it were the command-line arguments of the umoci binary (this is\n// needed for umoci''s integration test hacks you can find in main_test.go).\nfunc Main(args []string) error {\n\tapp := cli.NewApp()\n\tapp.Name = \"umoci\"\n\tapp.Usage = usage\n\tapp.Authors = []cli.Author{\n\t\t{\n\t\t\tName:  \"Aleksa Sarai\",\n\t\t\tEmail: \"cyphar@cyphar.com\",\n\t\t},\n\t}\n\n\tapp.Version = umoci.FullVersion()\n\tcli.VersionPrinter = printVersion\n\n\tapp.Flags = []cli.Flag{\n\t\tcli.BoolFlag{\n\t\t\tName:  \"verbose\",\n\t\t\tUsage: \"alias for --log=info\",\n\t\t},\n\t\tcli.StringFlag{\n\t\t\tName:  \"log\",\n\t\t\tUsage: \"set the log level (debug, info, [warn], error, fatal)\",\n\t\t\tValue: \"warn\",\n\t\t},\n\t\tcli.StringFlag{\n\t\t\tName:   \"cpu-profile\",\n\t\t\tUsage:  \"profile umoci during execution and output it to a file\",\n\t\t\tHidden: true,\n\t\t},\n\t}\n\n\tapp.Before = func(ctx *cli.Context) error {\n\t\tlog.SetHandler(logcli.New(os.Stderr))\n\n\t\tif ctx.GlobalBool(\"verbose\") {\n\t\t\tif ctx.GlobalIsSet(\"log\") {\n\t\t\t\treturn errors.New(\"--log=* and --verbose are mutually exclusive\")\n\t\t\t}\n\t\t\tif err := ctx.GlobalSet(\"log\", \"info\"); err != nil {\n\t\t\t\t// Should _never_ be reached.\n\t\t\t\treturn fmt.Errorf(\"[internal error] failure auto-setting --log=info: %w\", err)\n\t\t\t}\n\t\t}\n\t\tlevel, err := log.ParseLevel(ctx.GlobalString(\"log\"))\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"parsing log level: %w\", err)\n\t\t}\n\t\tlog.SetLevel(level)\n\n\t\tif path := ctx.GlobalString(\"cpu-profile\"); path != \"\" {\n\t\t\tfh, err := os.Create(path)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"opening cpu-profile path: %w\", err)\n\t\t\t}\n\t\t\tif err := pprof.StartCPUProfile(fh); err != nil {\n\t\t\t\treturn fmt.Errorf(\"start cpu-profile: %w\", err)\n\t\t\t}\n\t\t}\n\t\treturn nil\n\t}\n\n\tapp.After = func(*cli.Context) error {\n\t\tpprof.StopCPUProfile()\n\t\treturn nil\n\t}\n\n\tapp.Commands = []cli.Command{\n\t\tconfigCommand,\n\t\tunpackCommand,\n\t\trepackCommand,\n\t\tgcCommand,\n\t\tinitCommand,\n\t\tnewCommand,\n\t\ttagAddCommand,\n\t\ttagRemoveCommand,\n\t\ttagListCommand,\n\t\tstatCommand,\n\t\trawSubcommand,\n\t\tinsertCommand,\n\t}\n\n\tapp.Metadata = map[string]any{}\n\n\t// In order to make the uxXyz wrappers not too cumbersome we automatically\n\t// add them to images with categories set to categoryImage or\n\t// categoryLayout. Monkey patching was never this neat.\n\tforeachSubcommand(app.Commands, func(cmd *cli.Command) {\n\t\tswitch cmd.Category {\n\t\tcase categoryImage:\n\t\t\toldBefore := cmd.Before\n\t\t\tcmd.Before = func(ctx *cli.Context) error {\n\t\t\t\tif _, ok := ctx.App.Metadata[\"--image-path\"]; !ok {\n\t\t\t\t\treturn errors.New(\"missing mandatory argument: --image\")\n\t\t\t\t}\n\t\t\t\tif _, ok := ctx.App.Metadata[\"--image-tag\"]; !ok {\n\t\t\t\t\treturn errors.New(\"missing mandatory argument: --image\")\n\t\t\t\t}\n\t\t\t\tif oldBefore != nil {\n\t\t\t\t\treturn oldBefore(ctx)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t*cmd = uxImage(*cmd)\n\t\tcase categoryLayout:\n\t\t\toldBefore := cmd.Before\n\t\t\tcmd.Before = func(ctx *cli.Context) error {\n\t\t\t\tif _, ok := ctx.App.Metadata[\"--image-path\"]; !ok {\n\t\t\t\t\treturn errors.New(\"missing mandatory argument: --layout\")\n\t\t\t\t}\n\t\t\t\tif oldBefore != nil {\n\t\t\t\t\treturn oldBefore(ctx)\n\t\t\t\t}\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\t*cmd = uxLayout(*cmd)\n\t\t}\n\t})\n\n\terr := app.Run(args)\n\tif err != nil {\n\t\t// If an error is a permission based error, give a hint to the user\n\t\t// that --rootless might help. We probably should only be doing this if\n\t\t// we''re an unprivileged user.\n\t\tif errors.Is(err, os.ErrPermission) {\n\t\t\tlog.Warn(\"umoci encountered a permission error: maybe --rootless will help?\")\n\t\t}\n\t\tlog.Debugf(\"%+v\", err)\n\t}\n\treturn err\n}\n\nfunc main() {\n\tif err := Main(os.Args); err != nil {\n\t\tlog.Fatalf(\"%v\", err)\n\t}\n}\n"},"lineMatches":[{"preview":"func Main(args []string) error {","lineNumber":65,"offsetAndLengths":[[0,10]]},{"preview":"func main() {","lineNumber":196,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/quay/claircore"},"file":{"path":"test/bisect/main.go","url":"/github.com/quay/claircore/-/blob/test/bisect/main.go","content":"// Bisect is a git bisect helper.\npackage main\n\nimport (\n\t\"bytes\"\n\t\"context\"\n\t\"errors\"\n\t\"flag\"\n\t\"fmt\"\n\t\"os\"\n\t\"os/exec\"\n\t\"os/signal\"\n\t\"path/filepath\"\n)\n\n/*\nThis tool is significantly weird in that it makes heavy use of test harnesses for automatic setup,\nso the \"normal\" binary here is mostly setup around correctly building and invoking the test binary.\n*/\n\nfunc main() {\n\tvar exit int\n\tdefer func() {\n\t\tif exit != 0 {\n\t\t\tos.Exit(exit)\n\t\t}\n\t}()\n\targs := Args{}\n\tflag.BoolVar(\u0026args.Verbose, \"v\", false, \"verbose output\")\n\tflag.BoolVar(\u0026args.Warmup, \"warmup\", false, \"do a warmup run before making any requests.\")\n\tflag.String(\"dump-manifest\", \"{{.}}.manifest.json\", \"dump manifest to templated location, if provided\")\n\tflag.String(\"dump-index\", \"{{.}}.index.json\", \"dump index to templated location, if provided\")\n\tflag.String(\"dump-report\", \"{{.}}.report.json\", \"dump report to templated location, if provided\")\n\tflag.Parse()\n\tflag.Visit(func(f *flag.Flag) {\n\t\tswitch f.Name {\n\t\tcase \"dump-manifest\":\n\t\t\tif f.Value.String() == \"\" {\n\t\t\t\tf.Value.Set(f.DefValue)\n\t\t\t}\n\t\t\tv := f.Value.String()\n\t\t\targs.DumpManifest = \u0026v\n\t\tcase \"dump-index\":\n\t\t\tif f.Value.String() == \"\" {\n\t\t\t\tf.Value.Set(f.DefValue)\n\t\t\t}\n\t\t\tv := f.Value.String()\n\t\t\targs.DumpIndex = \u0026v\n\t\tcase \"dump-report\":\n\t\t\tif f.Value.String() == \"\" {\n\t\t\t\tf.Value.Set(f.DefValue)\n\t\t\t}\n\t\t\tv := f.Value.String()\n\t\t\targs.DumpReport = \u0026v\n\t\t}\n\t})\n\n\tctx, done := signal.NotifyContext(context.Background(), os.Interrupt, os.Kill)\n\tdefer done()\n\tif err := Main(ctx, args, flag.Args()); err != nil {\n\t\tfmt.Fprintln(os.Stderr, err)\n\t\texit = 1\n\t}\n}\n\ntype Args struct {\n\tDumpManifest *string\n\tDumpIndex    *string\n\tDumpReport   *string\n\tVerbose      bool\n\tWarmup       bool\n}\n\nfunc Main(ctx context.Context, args Args, imgs []string) error {\n\tif err := checkDeps(ctx); err != nil {\n\t\treturn err\n\t}\n\troot, err := findRoot(ctx)\n\tif err != nil {\n\t\treturn err\n\t}\n\tworkDir := filepath.Join(root, `test/bisect`)\n\tcmd := exec.CommandContext(ctx, \"go\", \"test\", \"-tags\", \"integration\", \"-c\")\n\tcmd.Dir = workDir\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\tif err := cmd.Run(); err != nil {\n\t\treturn err\n\t}\n\n\tif flag.NArg() == 0 {\n\t\tflag.PrintDefaults()\n\t\treturn errors.New(\"no arguments given\")\n\t}\n\n\tif args.Warmup {\n\t\tcmd = exec.CommandContext(ctx, filepath.Join(workDir, `bisect.test`), \"-enable\")\n\t\tif args.Verbose {\n\t\t\tcmd.Args = append(cmd.Args, \"-stderr\")\n\t\t}\n\t\tcmd.Dir = workDir\n\t\tcmd.Stdout = os.Stdout\n\t\tcmd.Stderr = os.Stderr\n\t\tif err := cmd.Run(); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\tcmd = exec.CommandContext(ctx, filepath.Join(workDir, `bisect.test`), \"-enable\")\n\tif args.Verbose {\n\t\tcmd.Args = append(cmd.Args, \"-stderr\")\n\t}\n\tif f := args.DumpManifest; f != nil {\n\t\tp, err := filepath.Abs(*f)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcmd.Args = append(cmd.Args, \"-dump-manifest\", p)\n\t}\n\tif f := args.DumpIndex; f != nil {\n\t\tp, err := filepath.Abs(*f)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcmd.Args = append(cmd.Args, \"-dump-index\", p)\n\t}\n\tif f := args.DumpReport; f != nil {\n\t\tp, err := filepath.Abs(*f)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tcmd.Args = append(cmd.Args, \"-dump-report\", p)\n\t}\n\tcmd.Args = append(cmd.Args, imgs...)\n\tcmd.Dir = workDir\n\tcmd.Stdout = os.Stdout\n\tcmd.Stderr = os.Stderr\n\treturn cmd.Run()\n}\n\nfunc findRoot(ctx context.Context) (string, error) {\n\tcmd := exec.CommandContext(ctx, \"git\", \"rev-parse\", \"--show-toplevel\")\n\tcmd.Stderr = nil\n\tb, err := cmd.Output()\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\treturn string(bytes.TrimSpace(b)), nil\n}\n\nfunc checkDeps(_ context.Context) error {\n\tfor _, exe := range []string{\n\t\t\"git\",\n\t\t\"skopeo\",\n\t} {\n\t\tif _, err := exec.LookPath(exe); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"},"lineMatches":[{"preview":"func Main(ctx context.Context, args Args, imgs []string) error {","lineNumber":73,"offsetAndLengths":[[0,10]]},{"preview":"func main() {","lineNumber":20,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/quay/claircore"},"file":{"path":"internal/mdbook/mdbook.go","url":"/github.com/quay/claircore/-/blob/internal/mdbook/mdbook.go","content":"// Package mdbook is a helper for writing mdbook plugins.\npackage mdbook\n\nimport (\n\t\"context\"\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io\"\n\t\"log\"\n\t\"os\"\n\t\"os/signal\"\n\t\"strings\"\n)\n\n// Main is a simple replacement main for mdbook preprocessors.\nfunc Main(name string, pf ProcFunc) {\n\tlog.SetFlags(log.LstdFlags | log.Lmsgprefix)\n\tlog.SetPrefix(name + \": \")\n\tArgs(os.Args)\n\n\terr := func() error {\n\t\tctx := context.Background()\n\t\tctx, cancel := signal.NotifyContext(ctx, os.Interrupt, os.Kill)\n\t\tdefer cancel()\n\n\t\tcfg, book, err := Decode(os.Stdin)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tproc, err := pf(ctx, cfg)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := proc.Walk(ctx, book); err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tif err := json.NewEncoder(os.Stdout).Encode(\u0026book); err != nil {\n\t\t\treturn err\n\t\t}\n\t\treturn nil\n\t}()\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n\n// ProcFunc is a hook for creating a new Proc.\ntype ProcFunc func(context.Context, *Context) (*Proc, error)\n\n// Args implements handling the expected CLI arguments.\n//\n// This function calls [os.Exit] under the right circumstances.\nfunc Args(argv []string) {\n\t// Handle when called with \"supports $renderer\".\n\tif len(argv) != 3 {\n\t\treturn\n\t}\n\tswitch argv[1] {\n\tcase \"supports\":\n\t\tswitch argv[2] {\n\t\tcase \"html\":\n\t\tdefault:\n\t\t\tlog.Printf(\"unsupported renderer: %q\", argv[2])\n\t\t\tos.Exit(1)\n\t\t}\n\tdefault:\n\t\tlog.Printf(\"unknown subcommand: %q\", argv[1])\n\t\tos.Exit(1)\n\t}\n\tos.Exit(0)\n}\n\n// Decode reads the [Context] and [Book] JSON objects from the passed\n// [io.Reader]. This should be almost always be [os.Stdin].\nfunc Decode(r io.Reader) (*Context, *Book, error) {\n\tdec := json.NewDecoder(r)\n\ttok, err := dec.Token()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif r, ok := tok.(json.Delim); !ok || r != ''['' {\n\t\treturn nil, nil, fmt.Errorf(\"unexpected start of input: %v\", tok)\n\t}\n\n\tvar ppContext Context\n\tif err := dec.Decode(\u0026ppContext); err != nil {\n\t\treturn nil, nil, err\n\t}\n\tvar book Book\n\tif err := dec.Decode(\u0026book); err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\ttok, err = dec.Token()\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\tif r, ok := tok.(json.Delim); !ok || r != '']'' {\n\t\treturn nil, nil, fmt.Errorf(\"unexpected end of input: %v\", tok)\n\t}\n\n\treturn \u0026ppContext, \u0026book, nil\n}\n\n// Proc is a helper for modifying a [Book].\ntype Proc struct {\n\tChapter   Hook[Chapter]\n\tSeparator Hook[Separator]\n\tPartTitle Hook[PartTitle]\n}\n\n// Hook is a hook function to modify a BookItem in-place.\ntype Hook[I BookItem] func(ctx context.Context, b *strings.Builder, item *I) error\n\n// BookItem is one of [Chapter], [Separator], or [PartTitle].\ntype BookItem interface {\n\tChapter | Separator | PartTitle\n}\n\n// Walk walks the provided [Book], calling the [Hook]s in the member fields as\n// needed to modify elements in-place.\nfunc (p *Proc) Walk(ctx context.Context, book *Book) error {\n\tvar b strings.Builder\n\tvar err error\n\tfor _, sec := range book.Sections {\n\t\terr = p.section(ctx, \u0026b, sec)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n\n// Section calls the relevant hooks on the current [Section].\nfunc (p *Proc) section(ctx context.Context, b *strings.Builder, s Section) (err error) {\n\tb.Reset()\n\tswitch {\n\tcase s.Separator != nil:\n\t\tif p.Separator != nil {\n\t\t\terr = p.Separator(ctx, b, s.Separator)\n\t\t}\n\tcase s.PartTitle != nil:\n\t\tif p.PartTitle != nil {\n\t\t\terr = p.PartTitle(ctx, b, s.PartTitle)\n\t\t}\n\tcase s.Chapter != nil:\n\t\tif p.Chapter != nil {\n\t\t\terr = p.Chapter(ctx, b, s.Chapter)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t\tfor _, s := range s.Chapter.SubItems {\n\t\t\terr = p.section(ctx, b, s)\n\t\t\tif err != nil {\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n\tif err != nil {\n\t\treturn err\n\t}\n\tif err := ctx.Err(); err != nil {\n\t\treturn context.Cause(ctx)\n\t}\n\treturn nil\n}\n\n// Context is the whole mdbook context.\ntype Context struct {\n\tRoot     string `json:\"root\"`\n\tRenderer string `json:\"renderer\"`\n\tVersion  string `json:\"mdbook_version\"`\n\tConfig   struct {\n\t\tBook   BookConfig                 `json:\"book\"`\n\t\tOutput map[string]json.RawMessage `json:\"output\"`\n\t} `json:\"config\"`\n\tPreprocessor map[string]json.RawMessage `json:\"preprocessor\"`\n}\n\n// BookConfig is the mdbook metadata and configuration.\ntype BookConfig struct {\n\tAuthors      []string `json:\"authors\"`\n\tSource       string   `json:\"src\"`\n\tDescription  string   `json:\"description\"`\n\tLanguage     string   `json:\"language\"`\n\tTitle        string   `json:\"title\"`\n\tMultiLingual bool     `json:\"multilingual\"`\n}\n\n// Book is an mdbook book.\ntype Book struct {\n\tSections []Section `json:\"sections\"`\n\tX        *struct{} `json:\"__non_exhaustive\"`\n}\n\n// Section is one of a [Chapter], [Separator], or [PartTitle].\ntype Section struct {\n\tChapter   *Chapter   `json:\",omitempty\"`\n\tSeparator *Separator `json:\",omitempty\"`\n\tPartTitle *PartTitle `json:\",omitempty\"`\n}\n\n// Separator denotes an mdbook separator.\ntype Separator struct{}\n\n// PartTitle is the title of the current part.\ntype PartTitle string\n\n// Chapter is an mdbook chapter.\ntype Chapter struct {\n\tName        string    `json:\"name\"`\n\tContent     string    `json:\"content\"`\n\tNumber      []int     `json:\"number\"`\n\tSubItems    []Section `json:\"sub_items\"`\n\tPath        *string   `json:\"path\"`\n\tSourcePath  *string   `json:\"source_path\"`\n\tParentNames []string  `json:\"parent_names\"`\n}\n"},"lineMatches":[{"preview":"func Main(name string, pf ProcFunc) {","lineNumber":15,"offsetAndLengths":[[0,10]]}]},{"__typename":"FileMatch","repository":{"name":"github.com/quay/claircore"},"file":{"path":"test/cmd/cleancache/main.go","url":"/github.com/quay/claircore/-/blob/test/cmd/cleancache/main.go","content":"//go:build go1.24\n\n// The cleancache tool cleans local caches for testing.\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"flag\"\n\t\"io/fs\"\n\t\"log/slog\"\n\t\"os\"\n\t\"strings\"\n\n\t\"github.com/quay/claircore/test/internal/cache\"\n)\n\nvar dryRunFlag bool\n\nfunc main() {\n\tvar errExit bool\n\tdefer func() {\n\t\tif errExit {\n\t\t\tos.Exit(1)\n\t\t}\n\t}()\n\tctx := context.Background()\n\tflag.BoolVar(\u0026dryRunFlag, \"n\", false, \"dry-run\")\n\tflag.Parse()\n\n\ttodo := DoNone\nArgs:\n\tfor _, arg := range flag.Args() {\n\t\tswitch strings.ToLower(arg) {\n\t\tcase \"all\":\n\t\t\ttodo = DoAll\n\t\t\tbreak Args\n\t\tcase \"layer\", \"layers\":\n\t\t\ttodo |= DoLayers\n\t\tdefault:\n\t\t\tslog.ErrorContext(ctx, \"unknown argument\", \"argument\", arg)\n\t\t\terrExit = true\n\t\t\treturn\n\t\t}\n\t}\n\tif todo == DoNone {\n\t\tslog.ErrorContext(ctx, \"not asked to do anything; want arguments of: all, layers\")\n\t\terrExit = true\n\t\treturn\n\t}\n\n\tif err := Main(ctx, todo); err != nil {\n\t\terrExit = true\n\t}\n}\n\ntype Which uint\n\nconst (\n\tDoNone Which = 0\n\tDoAll  Which = ^DoNone\n)\n\nconst (\n\tDoLayers = 1 \u003c\u003c iota\n\t// TODO(hank) Use these:\n\tDoDatabases\n\tDoGenerated\n)\n\nfunc Main(ctx context.Context, todo Which) error {\n\tif todo\u0026DoLayers != 0 {\n\t\troot, err := cache.Root(cache.Layer)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdefer root.Close()\n\t\tslog.InfoContext(ctx, \"cleaning cached layers\", \"dir\", root.Name(), \"dry-run\", dryRunFlag)\n\n\t\tvar errs []error\n\t\terr = fs.WalkDir(root.FS(), \".\", func(p string, ent fs.DirEntry, err error) error {\n\t\t\tswitch {\n\t\t\tcase err != nil:\n\t\t\t\treturn err\n\t\t\tcase ent.IsDir():\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tl := slog.With(\"name\", p)\n\n\t\t\tl.InfoContext(ctx, \"found file, removing\")\n\t\t\tif dryRunFlag {\n\t\t\t\treturn nil\n\t\t\t}\n\t\t\tif err := root.Remove(p); err != nil {\n\t\t\t\tl.ErrorContext(ctx, \"unable to remove file\", \"reason\", err)\n\t\t\t\terrs = append(errs, err)\n\t\t\t}\n\t\t\treturn nil\n\t\t})\n\n\t\tif err := errors.Join(append(errs, err)...); err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\n\treturn nil\n}\n"},"lineMatches":[{"preview":"func Main(ctx context.Context, todo Which) error {","lineNumber":70,"offsetAndLengths":[[0,10]]},{"preview":"func main() {","lineNumber":19,"offsetAndLengths":[[0,10]]}]}]}}}}'
164    headers:
165      Content-Type:
166      - application/json
167    status: 200 OK
168    code: 200
169    duration: 1.336823709s
170- id: 3
171  request:
172    proto: HTTP/1.1
173    proto_major: 1
174    proto_minor: 1
175    content_length: 54908
176    host: ""
177    body: "{\"messages\":[{\"content\":\"You are Crush, a powerful AI Assistant that runs in the CLI.\\n\\n<critical_rules>\\nThese rules override everything else. Follow them strictly:\\n\\n1. **ALWAYS READ BEFORE EDITING**: Never edit a file you haven't read in this conversation (only read files if you did not read them before or they changed). When reading, pay close attention to exact formatting, indentation, and whitespace - these must match exactly in your edits.\\n2. **BE AUTONOMOUS**: Don't ask questions - search, read, decide, act. Complete the ENTIRE task before stopping. Never stop mid-task. Never refuse work based on scope or complexity - break it down and do it.\\n3. **TEST AFTER CHANGES**: Run tests immediately after each modification\\n4. **BE CONCISE**: Under 4 lines unless user asks for detail\\n5. **USE EXACT MATCHES**: When editing, match text exactly including whitespace, indentation, and line breaks\\n6. **NEVER COMMIT**: Unless user explicitly says \\\"commit\\\"\\n7. **FOLLOW MEMORY FILE INSTRUCTIONS**: If memory files contain specific instructions, preferences, or commands, you MUST follow them.\\n8. **NEVER ADD COMMENTS**: Only add comments if the user asked you to do so. When adding comments, focus on *why* not *what*. NEVER communicate with the user through code comments.\\n9. **SECURITY FIRST**: Only assist with defensive security tasks. Refuse to create, modify, or improve code that may be used maliciously. Allow security analysis, detection rules, vulnerability explanations, defensive tools, and security documentation.\\n10. **NO URL GUESSING**: Never generate or guess URLs unless you are confident they are for helping with programming. Only use URLs provided by the user or found in local files.\\n11. **NEVER PUSH TO REMOTE**: Don't push changes to remote repositories unless explicitly asked by the user.\\n12. **DON'T REVERT CHANGES**: Don't revert changes unless they caused errors or the user explicitly asks.\\n13. **COMPLETE THE TASK**: Never stop mid-task with \\\"Next:\\\" or \\\"Will do:\\\" statements. If you describe what needs to be done, DO IT immediately. Only stop when everything is finished.\\n14. **NEVER REFUSE BASED ON SCOPE**: Never refuse tasks because they seem large or complex. Break them into steps and complete them. Only stop if you encounter actual blocking errors (missing dependencies, compile failures, etc.), not perceived difficulty.\\n</critical_rules>\\n\\n<communication_style>\\nKeep responses minimal:\\n- Under 4 lines of text (tool use doesn't count)\\n- No preamble (\\\"Here's...\\\", \\\"I'll...\\\")\\n- No postamble (\\\"Let me know...\\\", \\\"Hope this helps...\\\")\\n- One-word answers when possible\\n- No emojis ever\\n- No explanations unless user asks\\n\\nExamples:\\nuser: what is 2+2?\\nassistant: 4\\n\\nuser: list files in src/\\nassistant: [uses ls tool]\\nfoo.c, bar.c, baz.c\\n\\nuser: which file has the foo implementation?\\nassistant: src/foo.c\\n\\nuser: add error handling to the login function\\nassistant: [searches for login, reads file, edits with exact match, runs tests]\\nDone\\n\\nuser: Where are errors from the client handled?\\nassistant: Clients are marked as failed in the `connectToServer` function in src/services/process.go:712.\\n</communication_style>\\n\\n<code_references>\\nWhen referencing specific functions or code locations, use the pattern `file_path:line_number` to help users navigate:\\n- Example: \\\"The error is handled in src/main.go:45\\\"\\n- Example: \\\"See the implementation in pkg/utils/helper.go:123-145\\\"\\n</code_references>\\n\\n<workflow>\\nFor every task, follow this sequence internally (don't narrate it):\\n\\n**Before acting**:\\n- Search codebase for relevant files\\n- Read files to understand current state\\n- Check memory for stored commands\\n- Identify what needs to change\\n- Use `git log` and `git blame` for additional context when needed\\n\\n**While acting**:\\n- Read entire file before editing it\\n- Before editing: verify exact whitespace and indentation from View output\\n- Use exact text for find/replace (include whitespace)\\n- Make one logical change at a time\\n- After each change: run tests\\n- If tests fail: fix immediately\\n- If edit fails: read more context, don't guess - the text must match exactly\\n- Keep going until query is completely resolved before yielding to user\\n- For longer tasks, send brief progress updates (under 10 words) BUT IMMEDIATELY CONTINUE WORKING - progress updates are not stopping points\\n\\n**Before finishing**:\\n- Verify ENTIRE query is resolved (not just first step)\\n- All described next steps must be completed\\n- Run lint/typecheck if in memory\\n- Verify all changes work\\n- Keep response under 4 lines\\n\\n**Key behaviors**:\\n- Use find_references before changing shared code\\n- Follow existing patterns (check similar files)\\n- If stuck, try different approach (don't repeat failures)\\n- Make decisions yourself (search first, don't ask)\\n- Fix problems at root cause, not surface-level patches\\n- Don't fix unrelated bugs or broken tests (mention them in final message if relevant)\\n</workflow>\\n\\n<decision_making>\\n**Make decisions autonomously** - don't ask when you can:\\n- Search to find the answer\\n- Read files to see patterns\\n- Check similar code\\n- Infer from context\\n- Try most likely approach\\n\\n**Only stop/ask user if**:\\n- Truly ambiguous business requirement\\n- Multiple valid approaches with big tradeoffs\\n- Could cause data loss\\n- Exhausted all attempts and hit actual blocking errors\\n\\n**Never stop for**:\\n- Task seems too large (break it down)\\n- Multiple files to change (change them)\\n- Concerns about \\\"session limits\\\" (no such limits exist)\\n- Work will take many steps (do all the steps)\\n\\nExamples of autonomous decisions:\\n- File location → search for similar files\\n- Test command → check package.json/memory\\n- Code style → read existing code\\n- Library choice → check what's used\\n- Naming → follow existing names\\n</decision_making>\\n\\n<task_scope>\\n**No task is too large**:\\n- Break complex tasks into logical steps\\n- Complete each step fully before moving to next\\n- If a task has 10 parts, do all 10 parts\\n- Don't estimate effort or refuse based on scope\\n- Only stop if you hit actual errors (compile failures, missing files, etc.)\\n\\n**For large refactors or implementations**:\\n- Start with core functionality\\n- Build incrementally\\n- Test at each step\\n- Keep going until fully complete\\n\\nThere are no \\\"session limits\\\" - continue until the task is done or you hit a real blocker.\\n</task_scope>\\n\\n<editing_files>\\nCritical: ALWAYS read files before editing them in this conversation.\\n\\nWhen using edit tools:\\n1. Read the file first - note the EXACT indentation (spaces vs tabs, count)\\n2. Copy the exact text including ALL whitespace, newlines, and indentation\\n3. Include 3-5 lines of context before and after the target\\n4. Verify your old_string would appear exactly once in the file\\n5. If uncertain about whitespace, include more surrounding context\\n6. Verify edit succeeded\\n7. Run tests\\n\\n**Whitespace matters**:\\n- Count spaces/tabs carefully (use View tool line numbers as reference)\\n- Include blank lines if they exist\\n- Match line endings exactly\\n- When in doubt, include MORE context rather than less\\n\\nEfficiency tips:\\n- Don't re-read files after successful edits (tool will fail if it didn't work)\\n- Same applies for making folders, deleting files, etc.\\n\\nCommon mistakes to avoid:\\n- Editing without reading first\\n- Approximate text matches\\n- Wrong indentation (spaces vs tabs, wrong count)\\n- Missing or extra blank lines\\n- Not enough context (text appears multiple times)\\n- Trimming whitespace that exists in the original\\n- Not testing after changes\\n</editing_files>\\n\\n<whitespace_and_exact_matching>\\nThe Edit tool is extremely literal. \\\"Close enough\\\" will fail.\\n\\n**Before every edit**:\\n1. View the file and locate the exact lines to change\\n2. Copy the text EXACTLY including:\\n   - Every space and tab\\n   - Every blank line\\n   - Opening/closing braces position\\n   - Comment formatting\\n3. Include enough surrounding lines (3-5) to make it unique\\n4. Double-check indentation level matches\\n\\n**Common failures**:\\n- `func foo() {` vs `func foo(){` (space before brace)\\n- Tab vs 4 spaces vs 2 spaces\\n- Missing blank line before/after\\n- `// comment` vs `//comment` (space after //)\\n- Different number of spaces in indentation\\n\\n**If edit fails**:\\n- View the file again at the specific location\\n- Copy even more context\\n- Check for tabs vs spaces\\n- Verify line endings\\n- Try including the entire function/block if needed\\n- Never retry with guessed changes - get the exact text first\\n</whitespace_and_exact_matching>\\n\\n<error_handling>\\nWhen errors occur:\\n1. Read complete error message\\n2. Understand root cause\\n3. Try different approach (don't repeat same action)\\n4. Search for similar code that works\\n5. Make targeted fix\\n6. Test to verify\\n\\nCommon errors:\\n- Import/Module → check paths, spelling, what exists\\n- Syntax → check brackets, indentation, typos\\n- Tests fail → read test, see what it expects\\n- File not found → use ls, check exact path\\n\\n**Edit tool \\\"old_string not found\\\"**:\\n- View the file again at the target location\\n- Copy the EXACT text including all whitespace\\n- Include more surrounding context (full function if needed)\\n- Check for tabs vs spaces, extra/missing blank lines\\n- Count indentation spaces carefully\\n- Don't retry with approximate matches - get the exact text\\n</error_handling>\\n\\n<memory_instructions>\\nMemory files store commands, preferences, and codebase info. Update them when you discover:\\n- Build/test/lint commands\\n- Code style preferences  \\n- Important codebase patterns\\n- Useful project information\\n</memory_instructions>\\n\\n<code_conventions>\\nBefore writing code:\\n1. Check if library exists (look at imports, package.json)\\n2. Read similar code for patterns\\n3. Match existing style\\n4. Use same libraries/frameworks\\n5. Follow security best practices (never log secrets)\\n6. Don't use one-letter variable names unless requested\\n\\nNever assume libraries are available - verify first.\\n\\n**Ambition vs. precision**:\\n- New projects → be creative and ambitious with implementation\\n- Existing codebases → be surgical and precise, respect surrounding code\\n- Don't change filenames or variables unnecessarily\\n- Don't add formatters/linters/tests to codebases that don't have them\\n</code_conventions>\\n\\n<testing>\\nAfter significant changes:\\n- Start testing as specific as possible to code changed, then broaden to build confidence\\n- Use self-verification: write unit tests, add output logs, or use debug statements to verify your solutions\\n- Run relevant test suite\\n- If tests fail, fix before continuing\\n- Check memory for test commands\\n- Run lint/typecheck if available (on precise targets when possible)\\n- For formatters: iterate max 3 times to get it right; if still failing, present correct solution and note formatting issue\\n- Suggest adding commands to memory if not found\\n- Don't fix unrelated bugs or test failures (not your responsibility)\\n</testing>\\n\\n<tool_usage>\\n- Search before assuming\\n- Read files before editing\\n- Always use absolute paths for file operations (editing, reading, writing)\\n- Use Agent tool for complex searches\\n- Run tools in parallel when safe (no dependencies)\\n- When making multiple independent bash calls, send them in a single message with multiple tool calls for parallel execution\\n- Summarize tool output for user (they don't see it)\\n- Never use `curl` through the bash tool it is not allowed use the fetch tool instead.\\n\\n<bash_commands>\\nWhen running non-trivial bash commands (especially those that modify the system):\\n- Briefly explain what the command does and why you're running it\\n- This ensures the user understands potentially dangerous operations\\n- Simple read-only commands (ls, cat, etc.) don't need explanation\\n- Use `&` for background processes that won't stop on their own (e.g., `node server.js &`)\\n- Avoid interactive commands - use non-interactive versions (e.g., `npm init -y` not `npm init`)\\n- Combine related commands to save time (e.g., `git status && git diff HEAD && git log -n 3`)\\n</bash_commands>\\n</tool_usage>\\n\\n<proactiveness>\\nBalance autonomy with user intent:\\n- When asked to do something → do it fully (including ALL follow-ups and \\\"next steps\\\")\\n- Never describe what you'll do next - just do it\\n- When asked how to approach → explain first, don't auto-implement\\n- After completing work → stop, don't explain (unless asked)\\n- Don't surprise user with unexpected actions\\n</proactiveness>\\n\\n<final_answers>\\nAdapt verbosity to match the work completed:\\n\\n**Default (under 4 lines)**:\\n- Simple questions or single-file changes\\n- Casual conversation, greetings, acknowledgements\\n- One-word answers when possible\\n\\n**More detail allowed (up to 10-15 lines)**:\\n- Large multi-file changes that need walkthrough\\n- Complex refactoring where rationale adds value\\n- Tasks where understanding the approach is important\\n- When mentioning unrelated bugs/issues found\\n- Suggesting logical next steps user might want\\n\\n**What to include in verbose answers**:\\n- Brief summary of what was done and why\\n- Key files/functions changed (with `file:line` references)\\n- Any important decisions or tradeoffs made\\n- Next steps or things user should verify\\n- Issues found but not fixed\\n\\n**What to avoid**:\\n- Don't show full file contents unless explicitly asked\\n- Don't explain how to save files or copy code (user has access to your work)\\n- Don't use \\\"Here's what I did\\\" or \\\"Let me know if...\\\" style preambles/postambles\\n- Keep tone direct and factual, like handing off work to a teammate\\n</final_answers>\\n\\n<env>\\nWorking directory: /tmp/crush-test/TestCoderAgent/openai-gpt-5/sourcegraph_tool\\nIs directory a git repo: no\\nPlatform: linux\\nToday's date: 1/1/2025\\n\\n</env>\\n\\n\\n\\n\\n\",\"role\":\"system\"},{\"content\":\"use sourcegraph to search for 'func main' in Go repositories\",\"role\":\"user\"},{\"tool_calls\":[{\"id\":\"call_USIFCiGMPKSm57dyOc4zfoJ9\",\"function\":{\"arguments\":\"{\\\"query\\\":\\\"lang:go content:\\\\\\\"func main(\\\\\\\" type:file count:10 select:content\\\"}\",\"name\":\"sourcegraph\"},\"type\":\"function\"}],\"role\":\"assistant\"},{\"content\":\"# Sourcegraph Search Results\\n\\nFound 10 matches across 10 results\\n(Result limit reached, try a more specific query)\\n\\n## Result 1: github.com/yinchengtsinghua/go-ethereum-chinese/cmd/wnode/main.go\\n\\nURL: /github.com/yinchengtsinghua/go-ethereum-chinese/-/blob/cmd/wnode/main.go\\n\\n```\\n106| \\targServerPoW = flag.Float64(\\\"mspow\\\", whisper.DefaultMinimumPoW, \\\"PoW requirement for Mail Server request\\\")\\n107| \\n108| \\targIP      = flag.String(\\\"ip\\\", \\\"\\\", \\\"IP address and port of this node (e.g. 127.0.0.1:30303)\\\")\\n109| \\targPub     = flag.String(\\\"pub\\\", \\\"\\\", \\\"public key for asymmetric encryption\\\")\\n110| \\targDBPath  = flag.String(\\\"dbpath\\\", \\\"\\\", \\\"path to the server's DB directory\\\")\\n111| \\targIDFile  = flag.String(\\\"idfile\\\", \\\"\\\", \\\"file name with node id (private key)\\\")\\n112| argEnode   = flag.String(\\\"boot\\\", \\\"\\\", \\\"bootstrap node you want to connect to (e.g. enode://E454……08D50@52.176.211.200:16428)”)\\n113| \\targTopic   = flag.String(\\\"topic\\\", \\\"\\\", \\\"topic in hexadecimal format (e.g. 70a4beef)\\\")\\n114| \\targSaveDir = flag.String(\\\"savedir\\\", \\\"\\\", \\\"directory where all incoming messages will be saved as files\\\")\\n115| )\\n116|  func main() {\\n117| func main() {\\n118| \\tprocessArgs()\\n119| \\tinitialize()\\n120| \\trun()\\n121| \\tshutdown()\\n122| }\\n123| \\n124| func processArgs() {\\n125| \\tflag.Parse()\\n126| \\n```\\n\\n## Result 2: github.com/netobserv/netobserv-ebpf-agent/vendor/github.com/google/gnostic-models/extensions/extensions.go\\n\\nURL: /github.com/netobserv/netobserv-ebpf-agent/-/blob/vendor/github.com/google/gnostic-models/extensions/extensions.go\\n\\n```\\n18| \\t\\\"io/ioutil\\\"\\n19| \\t\\\"log\\\"\\n20| \\t\\\"os\\\"\\n21| \\n22| \\t\\\"google.golang.org/protobuf/proto\\\"\\n23| \\t\\\"google.golang.org/protobuf/types/known/anypb\\\"\\n24| )\\n25| \\n26| type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)\\n27| \\n28|  func Main(handler extensionHandler) {\\n29| func Main(handler extensionHandler) {\\n30| \\t// unpack the request\\n31| \\tdata, err := ioutil.ReadAll(os.Stdin)\\n32| \\tif err != nil {\\n33| \\t\\tlog.Println(\\\"File error:\\\", err.Error())\\n34| \\t\\tos.Exit(1)\\n35| \\t}\\n36| \\tif len(data) == 0 {\\n37| \\t\\tlog.Println(\\\"No input data.\\\")\\n38| \\t\\tos.Exit(1)\\n```\\n\\n## Result 3: github.com/tektoncd/hub/vendor/github.com/google/gnostic-models/extensions/extensions.go\\n\\nURL: /github.com/tektoncd/hub/-/blob/vendor/github.com/google/gnostic-models/extensions/extensions.go\\n\\n```\\n18| \\t\\\"io/ioutil\\\"\\n19| \\t\\\"log\\\"\\n20| \\t\\\"os\\\"\\n21| \\n22| \\t\\\"google.golang.org/protobuf/proto\\\"\\n23| \\t\\\"google.golang.org/protobuf/types/known/anypb\\\"\\n24| )\\n25| \\n26| type extensionHandler func(name string, yamlInput string) (bool, proto.Message, error)\\n27| \\n28|  func Main(handler extensionHandler) {\\n29| func Main(handler extensionHandler) {\\n30| \\t// unpack the request\\n31| \\tdata, err := ioutil.ReadAll(os.Stdin)\\n32| \\tif err != nil {\\n33| \\t\\tlog.Println(\\\"File error:\\\", err.Error())\\n34| \\t\\tos.Exit(1)\\n35| \\t}\\n36| \\tif len(data) == 0 {\\n37| \\t\\tlog.Println(\\\"No input data.\\\")\\n38| \\t\\tos.Exit(1)\\n```\\n\\n## Result 4: github.com/opencontainers/umoci/cmd/umoci/main.go\\n\\nURL: /github.com/opencontainers/umoci/-/blob/cmd/umoci/main.go\\n\\n```\\n55| \\t\\t// this string!\\n56| \\t\\tfmt.Fprintln(w, \\\"== THIS UMOCI BINARY IS COMPILED IN TEST MODE ==\\\") //nolint:errcheck // errors not relevant\\n57| \\t}\\n58| \\tfmt.Fprintln(w, \\\"image spec:\\\", imeta.Version)   //nolint:errcheck // errors not relevant\\n59| \\tfmt.Fprintln(w, \\\"runtime spec:\\\", rspec.Version) //nolint:errcheck // errors not relevant\\n60| \\tfmt.Fprintln(w, \\\"go:\\\", runtime.Version())       //nolint:errcheck // errors not relevant\\n61| }\\n62| \\n63| // Main is the underlying main() implementation. You can call this directly as\\n64| // though it were the command-line arguments of the umoci binary (this is\\n65|  func Main(args []string) error {\\n66| func Main(args []string) error {\\n67| \\tapp := cli.NewApp()\\n68| \\tapp.Name = \\\"umoci\\\"\\n69| \\tapp.Usage = usage\\n70| \\tapp.Authors = []cli.Author{\\n71| \\t\\t{\\n72| \\t\\t\\tName:  \\\"Aleksa Sarai\\\",\\n73| \\t\\t\\tEmail: \\\"cyphar@cyphar.com\\\",\\n74| \\t\\t},\\n75| \\t}\\n```\\n\\n```\\n186| \\t\\t// If an error is a permission based error, give a hint to the user\\n187| \\t\\t// that --rootless might help. We probably should only be doing this if\\n188| \\t\\t// we're an unprivileged user.\\n189| \\t\\tif errors.Is(err, os.ErrPermission) {\\n190| \\t\\t\\tlog.Warn(\\\"umoci encountered a permission error: maybe --rootless will help?\\\")\\n191| \\t\\t}\\n192| \\t\\tlog.Debugf(\\\"%+v\\\", err)\\n193| \\t}\\n194| \\treturn err\\n195| }\\n196|  func main() {\\n197| func main() {\\n198| \\tif err := Main(os.Args); err != nil {\\n199| \\t\\tlog.Fatalf(\\\"%v\\\", err)\\n200| \\t}\\n201| }\\n202| \\n```\\n\\n## Result 5: github.com/quay/claircore/test/bisect/main.go\\n\\nURL: /github.com/quay/claircore/-/blob/test/bisect/main.go\\n\\n```\\n63| \\t}\\n64| }\\n65| \\n66| type Args struct {\\n67| \\tDumpManifest *string\\n68| \\tDumpIndex    *string\\n69| \\tDumpReport   *string\\n70| \\tVerbose      bool\\n71| \\tWarmup       bool\\n72| }\\n73|  func Main(ctx context.Context, args Args, imgs []string) error {\\n74| func Main(ctx context.Context, args Args, imgs []string) error {\\n75| \\tif err := checkDeps(ctx); err != nil {\\n76| \\t\\treturn err\\n77| \\t}\\n78| \\troot, err := findRoot(ctx)\\n79| \\tif err != nil {\\n80| \\t\\treturn err\\n81| \\t}\\n82| \\tworkDir := filepath.Join(root, `test/bisect`)\\n83| \\tcmd := exec.CommandContext(ctx, \\\"go\\\", \\\"test\\\", \\\"-tags\\\", \\\"integration\\\", \\\"-c\\\")\\n```\\n\\n```\\n10| \\t\\\"os\\\"\\n11| \\t\\\"os/exec\\\"\\n12| \\t\\\"os/signal\\\"\\n13| \\t\\\"path/filepath\\\"\\n14| )\\n15| \\n16| /*\\n17| This tool is significantly weird in that it makes heavy use of test harnesses for automatic setup,\\n18| so the \\\"normal\\\" binary here is mostly setup around correctly building and invoking the test binary.\\n19| */\\n20|  func main() {\\n21| func main() {\\n22| \\tvar exit int\\n23| \\tdefer func() {\\n24| \\t\\tif exit != 0 {\\n25| \\t\\t\\tos.Exit(exit)\\n26| \\t\\t}\\n27| \\t}()\\n28| \\targs := Args{}\\n29| \\tflag.BoolVar(&args.Verbose, \\\"v\\\", false, \\\"verbose output\\\")\\n30| \\tflag.BoolVar(&args.Warmup, \\\"warmup\\\", false, \\\"do a warmup run before making any requests.\\\")\\n```\\n\\n## Result 6: github.com/quay/claircore/internal/mdbook/mdbook.go\\n\\nURL: /github.com/quay/claircore/-/blob/internal/mdbook/mdbook.go\\n\\n```\\n5| \\t\\\"context\\\"\\n6| \\t\\\"encoding/json\\\"\\n7| \\t\\\"fmt\\\"\\n8| \\t\\\"io\\\"\\n9| \\t\\\"log\\\"\\n10| \\t\\\"os\\\"\\n11| \\t\\\"os/signal\\\"\\n12| \\t\\\"strings\\\"\\n13| )\\n14| \\n15|  func Main(name string, pf ProcFunc) {\\n16| func Main(name string, pf ProcFunc) {\\n17| \\tlog.SetFlags(log.LstdFlags | log.Lmsgprefix)\\n18| \\tlog.SetPrefix(name + \\\": \\\")\\n19| \\tArgs(os.Args)\\n20| \\n21| \\terr := func() error {\\n22| \\t\\tctx := context.Background()\\n23| \\t\\tctx, cancel := signal.NotifyContext(ctx, os.Interrupt, os.Kill)\\n24| \\t\\tdefer cancel()\\n25| \\n```\\n\\n## Result 7: github.com/quay/claircore/test/cmd/cleancache/main.go\\n\\nURL: /github.com/quay/claircore/-/blob/test/cmd/cleancache/main.go\\n\\n```\\n60| \\tDoNone Which = 0\\n61| \\tDoAll  Which = ^DoNone\\n62| )\\n63| \\n64| const (\\n65| \\tDoLayers = 1 << iota\\n66| \\t// TODO(hank) Use these:\\n67| \\tDoDatabases\\n68| \\tDoGenerated\\n69| )\\n70|  func Main(ctx context.Context, todo Which) error {\\n71| func Main(ctx context.Context, todo Which) error {\\n72| \\tif todo&DoLayers != 0 {\\n73| \\t\\troot, err := cache.Root(cache.Layer)\\n74| \\t\\tif err != nil {\\n75| \\t\\t\\treturn err\\n76| \\t\\t}\\n77| \\t\\tdefer root.Close()\\n78| \\t\\tslog.InfoContext(ctx, \\\"cleaning cached layers\\\", \\\"dir\\\", root.Name(), \\\"dry-run\\\", dryRunFlag)\\n79| \\n80| \\t\\tvar errs []error\\n```\\n\\n```\\n9| \\t\\\"flag\\\"\\n10| \\t\\\"io/fs\\\"\\n11| \\t\\\"log/slog\\\"\\n12| \\t\\\"os\\\"\\n13| \\t\\\"strings\\\"\\n14| \\n15| \\t\\\"github.com/quay/claircore/test/internal/cache\\\"\\n16| )\\n17| \\n18| var dryRunFlag bool\\n19|  func main() {\\n20| func main() {\\n21| \\tvar errExit bool\\n22| \\tdefer func() {\\n23| \\t\\tif errExit {\\n24| \\t\\t\\tos.Exit(1)\\n25| \\t\\t}\\n26| \\t}()\\n27| \\tctx := context.Background()\\n28| \\tflag.BoolVar(&dryRunFlag, \\\"n\\\", false, \\\"dry-run\\\")\\n29| \\tflag.Parse()\\n```\\n\\n\",\"tool_call_id\":\"call_USIFCiGMPKSm57dyOc4zfoJ9\",\"role\":\"tool\"}],\"model\":\"gpt-5\",\"max_completion_tokens\":10000,\"stream_options\":{\"include_usage\":true},\"tool_choice\":\"auto\",\"tools\":[{\"function\":{\"name\":\"bash\",\"strict\":false,\"description\":\"Executes bash commands with automatic background conversion for long-running tasks.\\n\\n<cross_platform>\\nUses mvdan/sh interpreter (Bash-compatible on all platforms including Windows).\\nUse forward slashes for paths: \\\"ls C:/foo/bar\\\" not \\\"ls C:\\\\foo\\\\bar\\\".\\nCommon shell builtins and core utils available on Windows.\\n</cross_platform>\\n\\n<execution_steps>\\n1. Directory Verification: If creating directories/files, use LS tool to verify parent exists\\n2. Security Check: Banned commands (alias, aria2c, axel, chrome, curl, curlie, firefox, http-prompt, httpie, links, lynx, nc, safari, scp, ssh, telnet, w3m, wget, xh, doas, su, sudo, apk, apt, apt-cache, apt-get, dnf, dpkg, emerge, home-manager, makepkg, opkg, pacman, paru, pkg, pkg_add, pkg_delete, portage, rpm, yay, yum, zypper, at, batch, chkconfig, crontab, fdisk, mkfs, mount, parted, service, systemctl, umount, firewall-cmd, ifconfig, ip, iptables, netstat, pfctl, route, ufw) return error - explain to user. Safe read-only commands execute without prompts\\n3. Command Execution: Execute with proper quoting, capture output\\n4. Auto-Background: Commands exceeding 1 minute automatically move to background and return shell ID\\n5. Output Processing: Truncate if exceeds 30000 characters\\n6. Return Result: Include errors, metadata with <cwd></cwd> tags\\n</execution_steps>\\n\\n<usage_notes>\\n- Command required, working_dir optional (defaults to current directory)\\n- IMPORTANT: Use Grep/Glob/Agent tools instead of 'find'/'grep'. Use View/LS tools instead of 'cat'/'head'/'tail'/'ls'\\n- Chain with ';' or '&&', avoid newlines except in quoted strings\\n- Each command runs in independent shell (no state persistence between calls)\\n- Prefer absolute paths over 'cd' (use 'cd' only if user explicitly requests)\\n</usage_notes>\\n\\n<background_execution>\\n- Set run_in_background=true to run commands in a separate background shell\\n- Returns a shell ID for managing the background process\\n- Use job_output tool to view current output from background shell\\n- Use job_kill tool to terminate a background shell\\n- IMPORTANT: NEVER use `&` at the end of commands to run in background - use run_in_background parameter instead\\n- Commands that should run in background:\\n  * Long-running servers (e.g., `npm start`, `python -m http.server`, `node server.js`)\\n  * Watch/monitoring tasks (e.g., `npm run watch`, `tail -f logfile`)\\n  * Continuous processes that don't exit on their own\\n  * Any command expected to run indefinitely\\n- Commands that should NOT run in background:\\n  * Build commands (e.g., `npm run build`, `go build`)\\n  * Test suites (e.g., `npm test`, `pytest`)\\n  * Git operations\\n  * File operations\\n  * Short-lived scripts\\n</background_execution>\\n\\n<git_commits>\\nWhen user asks to create git commit:\\n\\n1. Single message with three tool_use blocks (IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - git log (recent commit message style)\\n\\n2. Add relevant untracked files to staging. Don't commit files already modified at conversation start unless relevant.\\n\\n3. Analyze staged changes in <commit_analysis> tags:\\n   - List changed/added files, summarize nature (feature/enhancement/bug fix/refactoring/test/docs)\\n   - Brainstorm purpose/motivation, assess project impact, check for sensitive info\\n   - Don't use tools beyond git context\\n   - Draft concise (1-2 sentences) message focusing on \\\"why\\\" not \\\"what\\\"\\n   - Use clear language, accurate reflection (\\\"add\\\"=new feature, \\\"update\\\"=enhancement, \\\"fix\\\"=bug fix)\\n   - Avoid generic messages, review draft\\n\\n4. Create commit with attribution using HEREDOC:\\n   git commit -m \\\"$(cat &lt;&lt;'EOF'\\n   Commit message here.\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n\\n   Co-Authored-By: Crush <crush@charm.land>\\n\\n\\n   EOF\\n   )\\\"\\n\\n5. If pre-commit hook fails, retry ONCE. If fails again, hook preventing commit. If succeeds but files modified, MUST amend.\\n\\n6. Run git status to verify.\\n\\nNotes: Use \\\"git commit -am\\\" when possible, don't stage unrelated files, NEVER update config, don't push, no -i flags, no empty commits, return empty response.\\n</git_commits>\\n\\n<pull_requests>\\nUse gh command for ALL GitHub tasks. When user asks to create PR:\\n\\n1. Single message with multiple tool_use blocks (VERY IMPORTANT for speed):\\n   - git status (untracked files)\\n   - git diff (staged/unstaged changes)\\n   - Check if branch tracks remote and is up to date\\n   - git log and 'git diff main...HEAD' (full commit history from main divergence)\\n\\n2. Create new branch if needed\\n3. Commit changes if needed\\n4. Push to remote with -u flag if needed\\n\\n5. Analyze changes in <pr_analysis> tags:\\n   - List commits since diverging from main\\n   - Summarize nature of changes\\n   - Brainstorm purpose/motivation\\n   - Assess project impact\\n   - Don't use tools beyond git context\\n   - Check for sensitive information\\n   - Draft concise (1-2 bullet points) PR summary focusing on \\\"why\\\"\\n   - Ensure summary reflects ALL changes since main divergence\\n   - Clear, concise language\\n   - Accurate reflection of changes and purpose\\n   - Avoid generic summaries\\n   - Review draft\\n\\n6. Create PR with gh pr create using HEREDOC:\\n   gh pr create --title \\\"title\\\" --body \\\"$(cat &lt;&lt;'EOF'\\n\\n   ## Summary\\n\\n   &lt;1-3 bullet points>\\n\\n   ## Test plan\\n\\n   [Checklist of TODOs...]\\n\\n\\n   \U0001F498 Generated with Crush\\n\\n\\n   EOF\\n   )\\\"\\n\\nImportant:\\n\\n- Return empty response - user sees gh output\\n- Never update git config\\n</pull_requests>\\n\\n<examples>\\nGood: pytest /foo/bar/tests\\nBad: cd /foo/bar && pytest tests\\n</examples>\\n\",\"parameters\":{\"properties\":{\"command\":{\"description\":\"The command to execute\",\"type\":\"string\"},\"description\":{\"description\":\"A brief description of what the command does, try to keep it under 30 characters or so\",\"type\":\"string\"},\"run_in_background\":{\"description\":\"Set to true (boolean) to run this command in the background. Use job_output to read the output later.\",\"type\":\"boolean\"},\"working_dir\":{\"description\":\"The working directory to execute the command in (defaults to current directory)\",\"type\":\"string\"}},\"required\":[\"description\",\"command\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"download\",\"strict\":false,\"description\":\"Downloads binary data from URL and saves to local file.\\n\\n<usage>\\n- Provide URL to download from\\n- Specify local file path where content should be saved\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Downloads any file type (binary or text)\\n- Auto-creates parent directories if missing\\n- Handles large files efficiently with streaming\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max file size: 100MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Will overwrite existing files without warning\\n</limitations>\\n\\n<tips>\\n- Use absolute paths or paths relative to working directory\\n- Set appropriate timeouts for large files or slow connections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The local file path where the downloaded content should be saved\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 600)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to download from\",\"type\":\"string\"}},\"required\":[\"url\",\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"edit\",\"strict\":false,\"description\":\"Edits files by replacing text, creating new files, or deleting content. For moving/renaming use Bash 'mv'. For large edits use Write tool.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. For new files: Use LS tool to verify parent directory exists\\n3. **CRITICAL**: Note exact whitespace, indentation, and formatting from View output\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. old_string: Text to replace (must match exactly including whitespace/indentation)\\n3. new_string: Replacement text\\n4. replace_all: Replace all occurrences (default false)\\n</parameters>\\n\\n<special_cases>\\n\\n- Create file: provide file_path + new_string, leave old_string empty\\n- Delete content: provide file_path + old_string, leave new_string empty\\n  </special_cases>\\n\\n<critical_requirements>\\nEXACT MATCHING: The tool is extremely literal. Text must match **EXACTLY**\\n\\n- Every space and tab character\\n- Every blank line\\n- Every newline character\\n- Indentation level (count the spaces/tabs)\\n- Comment spacing (`// comment` vs `//comment`)\\n- Brace positioning (`func() {` vs `func(){`)\\n\\nCommon failures:\\n\\n```\\nExpected: \\\"    func foo() {\\\"     (4 spaces)\\nProvided: \\\"  func foo() {\\\"       (2 spaces) ❌ FAILS\\n\\nExpected: \\\"}\\\\n\\\\nfunc bar() {\\\"    (2 newlines)\\nProvided: \\\"}\\\\nfunc bar() {\\\"      (1 newline) ❌ FAILS\\n\\nExpected: \\\"// Comment\\\"           (space after //)\\nProvided: \\\"//Comment\\\"            (no space) ❌ FAILS\\n```\\n\\nUNIQUENESS (when replace_all=false): old_string MUST uniquely identify target instance\\n\\n- Include 3-5 lines context BEFORE and AFTER change point\\n- Include exact whitespace, indentation, surrounding code\\n- If text appears multiple times, add more context to make it unique\\n\\nSINGLE INSTANCE: Tool changes ONE instance when replace_all=false\\n\\n- For multiple instances: set replace_all=true OR make separate calls with unique context\\n- Plan calls carefully to avoid conflicts\\n\\nVERIFICATION BEFORE USING: Before every edit\\n\\n1. View the file and locate exact target location\\n2. Check how many instances of target text exist\\n3. Copy the EXACT text including all whitespace\\n4. Verify you have enough context for unique identification\\n5. Double-check indentation matches (count spaces/tabs)\\n6. Plan separate calls or use replace_all for multiple changes\\n   </critical_requirements>\\n\\n<warnings>\\nTool fails if:\\n- old_string matches multiple locations and replace_all=false\\n- old_string doesn't match exactly (including whitespace)\\n- Insufficient context causes wrong instance change\\n- Indentation is off by even one space\\n- Missing or extra blank lines\\n- Wrong tabs vs spaces\\n</warnings>\\n\\n<recovery_steps>\\nIf you get \\\"old_string not found in file\\\":\\n\\n1. **View the file again** at the specific location\\n2. **Copy more context** - include entire function if needed\\n3. **Check whitespace**:\\n   - Count indentation spaces/tabs\\n   - Look for blank lines\\n   - Check for trailing spaces\\n4. **Verify character-by-character** that your old_string matches\\n5. **Never guess** - always View the file to get exact text\\n   </recovery_steps>\\n\\n<best_practices>\\n\\n- Ensure edits result in correct, idiomatic code\\n- Don't leave code in broken state\\n- Use absolute file paths (starting with /)\\n- Use forward slashes (/) for cross-platform compatibility\\n- Multiple edits to same file: send all in single message with multiple tool calls\\n- **When in doubt, include MORE context rather than less**\\n- Match the existing code style exactly (spaces, tabs, blank lines)\\n  </best_practices>\\n\\n<whitespace_checklist>\\nBefore submitting an edit, verify:\\n\\n- [ ] Viewed the file first\\n- [ ] Counted indentation spaces/tabs\\n- [ ] Included blank lines if they exist\\n- [ ] Matched brace/bracket positioning\\n- [ ] Included 3-5 lines of surrounding context\\n- [ ] Verified text appears exactly once (or using replace_all)\\n- [ ] Copied text character-for-character, not approximated\\n      </whitespace_checklist>\\n\\n<examples>\\n✅ Correct: Exact match with context\\n\\n```\\nold_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    return nil\\\\n}\\\"\\n\\nnew_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    // New validation\\\\n    if len(input) > 1000 {\\\\n        return errors.New(\\\\\\\"input too long\\\\\\\")\\\\n    }\\\\n    return nil\\\\n}\\\"\\n```\\n\\n❌ Incorrect: Not enough context\\n\\n```\\nold_string: \\\"return nil\\\"  // Appears many times!\\n```\\n\\n❌ Incorrect: Wrong indentation\\n\\n```\\nold_string: \\\"  if input == \\\\\\\"\\\\\\\" {\\\"  // 2 spaces\\n// But file actually has:        \\\"    if input == \\\\\\\"\\\\\\\" {\\\"  // 4 spaces\\n```\\n\\n✅ Correct: Including context to make unique\\n\\n```\\nold_string: \\\"func ProcessData(input string) error {\\\\n    if input == \\\\\\\"\\\\\\\" {\\\\n        return errors.New(\\\\\\\"empty input\\\\\\\")\\\\n    }\\\\n    return nil\\\"\\n```\\n\\n</examples>\\n\\n<windows_notes>\\n\\n- Forward slashes work throughout (C:/path/file)\\n- File permissions handled automatically\\n- Line endings converted automatically (\\\\n ↔ \\\\r\\\\n)\\n  </windows_notes>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"},\"new_string\":{\"description\":\"The text to replace it with\",\"type\":\"string\"},\"old_string\":{\"description\":\"The text to replace\",\"type\":\"string\"},\"replace_all\":{\"description\":\"Replace all occurrences of old_string (default false)\",\"type\":\"boolean\"}},\"required\":[\"file_path\",\"old_string\",\"new_string\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"multiedit\",\"strict\":false,\"description\":\"Makes multiple edits to a single file in one operation. Built on Edit tool for efficient multiple find-and-replace operations. Prefer over Edit tool for multiple edits to same file.\\n\\n<prerequisites>\\n1. Use View tool to understand file contents and context\\n2. Verify directory path is correct\\n3. CRITICAL: Note exact whitespace, indentation, and formatting from View output\\n</prerequisites>\\n\\n<parameters>\\n1. file_path: Absolute path to file (required)\\n2. edits: Array of edit operations, each containing:\\n   - old_string: Text to replace (must match exactly including whitespace/indentation)\\n   - new_string: Replacement text\\n   - replace_all: Replace all occurrences (optional, defaults to false)\\n</parameters>\\n\\n<operation>\\n- Edits applied sequentially in provided order.\\n- Each edit operates on result of previous edit.\\n- PARTIAL SUCCESS: If some edits fail, successful edits are still applied. Failed edits are returned in the response.\\n- File is modified if at least one edit succeeds.\\n- Ideal for several changes to different parts of same file.\\n</operation>\\n\\n<inherited_rules>\\nAll instructions from the Edit tool documentation apply verbatim to every edit item:\\n- Critical requirements for exact matching and uniqueness\\n- Warnings and common failures (tabs vs spaces, blank lines, brace placement, etc.)\\n- Verification steps before using, recovery steps, best practices, and whitespace checklist\\nUse the same level of precision as Edit. Multiedit often fails due to formatting mismatches—double-check whitespace for every edit.\\n</inherited_rules>\\n\\n<critical_requirements>\\n1. Apply Edit tool rules to EACH edit (see edit.md).\\n2. Edits are applied in order; successful edits are kept even if later edits fail.\\n3. Plan sequence carefully: earlier edits change the file content that later edits must match.\\n4. Ensure each old_string is unique at its application time (after prior edits).\\n5. Check the response for failed edits and retry them if needed.\\n</critical_requirements>\\n\\n<verification_before_using>\\n1. View the file and copy exact text (including whitespace) for each target.\\n2. Check how many instances each old_string has BEFORE the sequence starts.\\n3. Dry-run mentally: after applying edit #N, will edit #N+1 still match? Adjust old_string/new_string accordingly.\\n4. Prefer fewer, larger context blocks over many tiny fragments that are easy to misalign.\\n5. If edits are independent, consider separate multiedit batches per logical region.\\n</verification_before_using>\\n\\n<warnings>\\n- Operation continues even if some edits fail; check response for failed edits.\\n- Earlier edits can invalidate later matches (added/removed spaces, lines, or reordered text).\\n- Mixed tabs/spaces, trailing spaces, or missing blank lines commonly cause failures.\\n- replace_all may affect unintended regions—use carefully or provide more context.\\n</warnings>\\n\\n<recovery_steps>\\nIf some edits fail:\\n1. Check the response metadata for the list of failed edits with their error messages.\\n2. View the file again to see the current state after successful edits.\\n3. Adjust the failed edits based on the new file content.\\n4. Retry the failed edits with corrected old_string values.\\n5. Consider breaking complex batches into smaller, independent operations.\\n</recovery_steps>\\n\\n<best_practices>\\n- Ensure all edits result in correct, idiomatic code; don't leave code broken.\\n- Use absolute file paths (starting with /).\\n- Use replace_all only when you're certain; otherwise provide unique context.\\n- Match existing style exactly (spaces, tabs, blank lines).\\n- Review failed edits in the response and retry with corrections.\\n</best_practices>\\n\\n<whitespace_checklist>\\nFor EACH edit, verify:\\n- [ ] Viewed the file first\\n- [ ] Counted indentation spaces/tabs\\n- [ ] Included blank lines if present\\n- [ ] Matched brace/bracket positioning\\n- [ ] Included 3–5 lines of surrounding context\\n- [ ] Verified text appears exactly once (or using replace_all deliberately)\\n- [ ] Copied text character-for-character, not approximated\\n</whitespace_checklist>\\n\\n<examples>\\n✅ Correct: Sequential edits where the second match accounts for the first change\\n\\n```\\nedits: [\\n  {\\n    old_string: \\\"func A() {\\\\n    doOld()\\\\n}\\\",\\n    new_string: \\\"func A() {\\\\n    doNew()\\\\n}\\\",\\n  },\\n  {\\n    // Uses context that still exists AFTER the first replacement\\n    old_string: \\\"func B() {\\\\n    callA()\\\\n}\\\",\\n    new_string: \\\"func B() {\\\\n    callA()\\\\n    logChange()\\\\n}\\\",\\n  },\\n]\\n```\\n\\n❌ Incorrect: Second old_string no longer matches due to whitespace change introduced by the first edit\\n\\n```\\nedits: [\\n  {\\n    old_string: \\\"func A() {\\\\n    doOld()\\\\n}\\\",\\n    new_string: \\\"func A() {\\\\n\\\\n    doNew()\\\\n}\\\", // Added extra blank line\\n  },\\n  {\\n    old_string: \\\"func A() {\\\\n    doNew()\\\\n}\\\", // Missing the new blank line, will FAIL\\n    new_string: \\\"func A() {\\\\n    doNew()\\\\n    logChange()\\\\n}\\\",\\n  },\\n]\\n```\\n\\n✅ Correct: Handling partial success\\n\\n```\\n// If edit 2 fails, edit 1 is still applied\\n// Response will indicate:\\n// - edits_applied: 1\\n// - edits_failed: [{index: 2, error: \\\"...\\\", edit: {...}}]\\n// You can then retry edit 2 with corrected context\\n```\\n</examples>\\n\",\"parameters\":{\"properties\":{\"edits\":{\"description\":\"Array of edit operations to perform sequentially on the file\",\"items\":{},\"type\":\"array\"},\"file_path\":{\"description\":\"The absolute path to the file to modify\",\"type\":\"string\"}},\"required\":[\"file_path\",\"edits\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"fetch\",\"strict\":false,\"description\":\"Fetches raw content from URL and returns it in specified format without any AI processing.\\n\\n<when_to_use>\\nUse this tool when you need:\\n- Raw, unprocessed content from a URL\\n- Direct access to API responses or JSON data\\n- HTML/text/markdown content without interpretation\\n- Simple, fast content retrieval without analysis\\n- To save tokens by avoiding AI processing\\n\\nDO NOT use this tool when you need to:\\n- Extract specific information from a webpage (use agentic_fetch instead)\\n- Answer questions about web content (use agentic_fetch instead)\\n- Analyze or summarize web pages (use agentic_fetch instead)\\n</when_to_use>\\n\\n<usage>\\n- Provide URL to fetch content from\\n- Specify desired output format (text, markdown, or html)\\n- Optional timeout for request\\n</usage>\\n\\n<features>\\n- Supports three output formats: text, markdown, html\\n- Auto-handles HTTP redirects\\n- Fast and lightweight - no AI processing\\n- Sets reasonable timeouts to prevent hanging\\n- Validates input parameters before requests\\n</features>\\n\\n<limitations>\\n- Max response size: 5MB\\n- Only supports HTTP and HTTPS protocols\\n- Cannot handle authentication or cookies\\n- Some websites may block automated requests\\n- Returns raw content only - no analysis or extraction\\n</limitations>\\n\\n<tips>\\n- Use text format for plain text content or simple API responses\\n- Use markdown format for content that should be rendered with formatting\\n- Use html format when you need raw HTML structure\\n- Set appropriate timeouts for potentially slow websites\\n- If the user asks to analyze or extract from a page, use agentic_fetch instead\\n</tips>\\n\",\"parameters\":{\"properties\":{\"format\":{\"description\":\"The format to return the content in (text, markdown, or html)\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"},\"url\":{\"description\":\"The URL to fetch content from\",\"type\":\"string\"}},\"required\":[\"url\",\"format\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"glob\",\"strict\":false,\"description\":\"Fast file pattern matching tool that finds files by name/pattern, returning paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide glob pattern to match against file paths\\n- Optional starting directory (defaults to current working directory)\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<pattern_syntax>\\n- '\\\\*' matches any sequence of non-separator characters\\n- '\\\\*\\\\*' matches any sequence including separators\\n- '?' matches any single non-separator character\\n- '[...]' matches any character in brackets\\n- '[!...]' matches any character not in brackets\\n</pattern_syntax>\\n\\n<examples>\\n- '*.js' - JavaScript files in current directory\\n- '**/*.js' - JavaScript files in any subdirectory\\n- 'src/**/*.{ts,tsx}' - TypeScript files in src directory\\n- '*.{html,css,js}' - HTML, CSS, and JS files\\n</examples>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Does not search file contents (use Grep for that)\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<cross_platform>\\n- Path separators handled automatically (/ and \\\\ work)\\n- Uses ripgrep (rg) if available, otherwise Go implementation\\n- Patterns should use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Combine with Grep: find files with Glob, search contents with Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine pattern if needed\\n</tips>\\n\",\"parameters\":{\"properties\":{\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The glob pattern to match files against\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"grep\",\"strict\":false,\"description\":\"Fast content search tool that finds files containing specific text/patterns, returning matching paths sorted by modification time (newest first).\\n\\n<usage>\\n- Provide regex pattern to search within file contents\\n- Set literal_text=true for exact text with special characters (recommended for non-regex users)\\n- Optional starting directory (defaults to current working directory)\\n- Optional include pattern to filter which files to search\\n- Results sorted with most recently modified files first\\n</usage>\\n\\n<regex_syntax>\\nWhen literal_text=false (supports standard regex):\\n\\n- 'function' searches for literal text \\\"function\\\"\\n- 'log\\\\..\\\\*Error' finds text starting with \\\"log.\\\" and ending with \\\"Error\\\"\\n- 'import\\\\s+.\\\\*\\\\s+from' finds import statements in JavaScript/TypeScript\\n</regex_syntax>\\n\\n<include_patterns>\\n- '\\\\*.js' - Only search JavaScript files\\n- '\\\\*.{ts,tsx}' - Only search TypeScript files\\n- '\\\\*.go' - Only search Go files\\n</include_patterns>\\n\\n<limitations>\\n- Results limited to 100 files (newest first)\\n- Performance depends on number of files searched\\n- Very large binary files may be skipped\\n- Hidden files (starting with '.') skipped\\n</limitations>\\n\\n<ignore_support>\\n- Respects .gitignore patterns to skip ignored files/directories\\n- Respects .crushignore patterns for additional ignore rules\\n- Both ignore files auto-detected in search root directory\\n</ignore_support>\\n\\n<cross_platform>\\n- Uses ripgrep (rg) if available for better performance\\n- Falls back to Go implementation if ripgrep unavailable\\n- File paths normalized automatically for compatibility\\n</cross_platform>\\n\\n<tips>\\n- For faster searches: use Glob to find relevant files first, then Grep\\n- For iterative exploration requiring multiple searches, consider Agent tool\\n- Check if results truncated and refine search pattern if needed\\n- Use literal_text=true for exact text with special characters (dots, parentheses, etc.)\\n</tips>\\n\",\"parameters\":{\"properties\":{\"include\":{\"description\":\"File pattern to include in the search (e.g. \\\"*.js\\\", \\\"*.{ts,tsx}\\\")\",\"type\":\"string\"},\"literal_text\":{\"description\":\"If true, the pattern will be treated as literal text with special regex characters escaped. Default is false.\",\"type\":\"boolean\"},\"path\":{\"description\":\"The directory to search in. Defaults to the current working directory.\",\"type\":\"string\"},\"pattern\":{\"description\":\"The regex pattern to search for in file contents\",\"type\":\"string\"}},\"required\":[\"pattern\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"ls\",\"strict\":false,\"description\":\"Shows files and subdirectories in tree structure for exploring project organization.\\n\\n<usage>\\n- Provide path to list (defaults to current working directory)\\n- Optional glob patterns to ignore\\n- Results displayed in tree structure\\n</usage>\\n\\n<features>\\n- Hierarchical view of files and directories\\n- Auto-skips hidden files/directories (starting with '.')\\n- Skips common system directories like __pycache__\\n- Can filter files matching specific patterns\\n</features>\\n\\n<limitations>\\n- Results limited to 1000 files\\n- Large directories truncated\\n- No file sizes or permissions shown\\n- Cannot recursively list all directories in large projects\\n</limitations>\\n\\n<cross_platform>\\n- Hidden file detection uses Unix convention (files starting with '.')\\n- Windows hidden files (with hidden attribute) not auto-skipped\\n- Common Windows directories (System32, Program Files) not in default ignore\\n- Path separators handled automatically (/ and \\\\ work)\\n</cross_platform>\\n\\n<tips>\\n- Use Glob for finding files by name patterns instead of browsing\\n- Use Grep for searching file contents\\n- Combine with other tools for effective exploration\\n</tips>\\n\",\"parameters\":{\"properties\":{\"depth\":{\"description\":\"The maximum depth to traverse\",\"type\":\"integer\"},\"ignore\":{\"description\":\"List of glob patterns to ignore\",\"items\":{},\"type\":\"array\"},\"path\":{\"description\":\"The path to the directory to list (defaults to current working directory)\",\"type\":\"string\"}},\"required\":[],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"sourcegraph\",\"strict\":false,\"description\":\"Search code across public repositories using Sourcegraph's GraphQL API.\\n\\n<usage>\\n- Provide search query using Sourcegraph syntax\\n- Optional result count (default: 10, max: 20)\\n- Optional timeout for request\\n</usage>\\n\\n<basic_syntax>\\n- \\\"fmt.Println\\\" - exact matches\\n- \\\"file:.go fmt.Println\\\" - limit to Go files\\n- \\\"repo:^github\\\\.com/golang/go$ fmt.Println\\\" - specific repos\\n- \\\"lang:go fmt.Println\\\" - limit to Go code\\n- \\\"fmt.Println AND log.Fatal\\\" - combined terms\\n- \\\"fmt\\\\.(Print|Printf|Println)\\\" - regex patterns\\n- \\\"\\\\\\\"exact phrase\\\\\\\"\\\" - exact phrase matching\\n- \\\"-file:test\\\" or \\\"-repo:forks\\\" - exclude matches\\n</basic_syntax>\\n\\n<key_filters>\\nRepository: repo:name, repo:^exact$, repo:org/repo@branch, -repo:exclude, fork:yes, archived:yes, visibility:public\\nFile: file:\\\\.js$, file:internal/, -file:test, file:has.content(text)\\nContent: content:\\\"exact\\\", -content:\\\"unwanted\\\", case:yes\\nType: type:symbol, type:file, type:path, type:diff, type:commit\\nTime: after:\\\"1 month ago\\\", before:\\\"2023-01-01\\\", author:name, message:\\\"fix\\\"\\nResult: select:repo, select:file, select:content, count:100, timeout:30s\\n</key_filters>\\n\\n<examples>\\n- \\\"file:.go context.WithTimeout\\\" - Go code using context.WithTimeout\\n- \\\"lang:typescript useState type:symbol\\\" - TypeScript React useState hooks\\n- \\\"repo:^github\\\\.com/kubernetes/kubernetes$ pod list type:file\\\" - Kubernetes pod files\\n- \\\"file:Dockerfile (alpine OR ubuntu) -content:alpine:latest\\\" - Dockerfiles with base images\\n</examples>\\n\\n<boolean_operators>\\n- \\\"term1 AND term2\\\" - both terms\\n- \\\"term1 OR term2\\\" - either term\\n- \\\"term1 NOT term2\\\" - term1 but not term2\\n- \\\"term1 and (term2 or term3)\\\" - grouping with parentheses\\n</boolean_operators>\\n\\n<limitations>\\n- Only searches public repositories\\n- Rate limits may apply\\n- Complex queries take longer\\n- Max 20 results per query\\n</limitations>\\n\\n<tips>\\n- Use specific file extensions to narrow results\\n- Add repo: filters for targeted searches\\n- Use type:symbol for function/method definitions\\n- Use type:file to find relevant files\\n</tips>\\n\",\"parameters\":{\"properties\":{\"context_window\":{\"description\":\"The context around the match to return (default: 10 lines)\",\"type\":\"integer\"},\"count\":{\"description\":\"Optional number of results to return (default: 10, max: 20)\",\"type\":\"integer\"},\"query\":{\"description\":\"The Sourcegraph search query\",\"type\":\"string\"},\"timeout\":{\"description\":\"Optional timeout in seconds (max 120)\",\"type\":\"integer\"}},\"required\":[\"query\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"view\",\"strict\":false,\"description\":\"Reads and displays file contents with line numbers for examining code, logs, or text data.\\n\\n<usage>\\n- Provide file path to read\\n- Optional offset: start reading from specific line (0-based)\\n- Optional limit: control lines read (default 2000)\\n- Don't use for directories (use LS tool instead)\\n</usage>\\n\\n<features>\\n- Displays contents with line numbers\\n- Can read from any file position using offset\\n- Handles large files by limiting lines read\\n- Auto-truncates very long lines for display\\n- Suggests similar filenames when file not found\\n</features>\\n\\n<limitations>\\n- Max file size: 250KB\\n- Default limit: 2000 lines\\n- Lines >2000 chars truncated\\n- Cannot display binary files/images (identifies them)\\n</limitations>\\n\\n<cross_platform>\\n- Handles Windows (CRLF) and Unix (LF) line endings\\n- Works with forward slashes (/) and backslashes (\\\\)\\n- Auto-detects text encoding for common formats\\n</cross_platform>\\n\\n<tips>\\n- Use with Glob to find files first\\n- For code exploration: Grep to find relevant files, then View to examine\\n- For large files: use offset parameter for specific sections\\n</tips>\\n\",\"parameters\":{\"properties\":{\"file_path\":{\"description\":\"The path to the file to read\",\"type\":\"string\"},\"limit\":{\"description\":\"The number of lines to read (defaults to 2000)\",\"type\":\"integer\"},\"offset\":{\"description\":\"The line number to start reading from (0-based)\",\"type\":\"integer\"}},\"required\":[\"file_path\"],\"type\":\"object\"}},\"type\":\"function\"},{\"function\":{\"name\":\"write\",\"strict\":false,\"description\":\"Creates or updates files in filesystem for saving/modifying text content.\\n\\n<usage>\\n- Provide file path to write\\n- Include content to write to file\\n- Tool creates necessary parent directories automatically\\n</usage>\\n\\n<features>\\n- Creates new files or overwrites existing ones\\n- Auto-creates parent directories if missing\\n- Checks if file modified since last read for safety\\n- Avoids unnecessary writes when content unchanged\\n</features>\\n\\n<limitations>\\n- Read file before writing to avoid conflicts\\n- Cannot append (rewrites entire file)\\n</limitations>\\n\\n<cross_platform>\\n- Use forward slashes (/) for compatibility\\n</cross_platform>\\n\\n<tips>\\n- Use View tool first to examine existing files before modifying\\n- Use LS tool to verify location when creating new files\\n- Combine with Glob/Grep to find and modify multiple files\\n- Include descriptive comments when changing existing code\\n</tips>\\n\",\"parameters\":{\"properties\":{\"content\":{\"description\":\"The content to write to the file\",\"type\":\"string\"},\"file_path\":{\"description\":\"The path to the file to write\",\"type\":\"string\"}},\"required\":[\"file_path\",\"content\"],\"type\":\"object\"}},\"type\":\"function\"}],\"stream\":true}"
178    headers:
179      Accept:
180      - application/json
181      Content-Type:
182      - application/json
183      User-Agent:
184      - OpenAI/Go 2.7.1
185    url: https://api.openai.com/v1/chat/completions
186    method: POST
187  response:
188    proto: HTTP/2.0
189    proto_major: 2
190    proto_minor: 0
191    content_length: -1
192    body: |+
193      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"role":"assistant","content":"","refusal":null},"finish_reason":null}],"usage":null,"obfuscation":"dpl8BMuY47"}
194
195      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Found"},"finish_reason":null}],"usage":null,"obfuscation":"uNNeuF7"}
196
197      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" "},"finish_reason":null}],"usage":null,"obfuscation":"tdSdPFQQVaR"}
198
199      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"10"},"finish_reason":null}],"usage":null,"obfuscation":"eJmLO2GGUZ"}
200
201      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" matches"},"finish_reason":null}],"usage":null,"obfuscation":"Kt94"}
202
203      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".\n"},"finish_reason":null}],"usage":null,"obfuscation":"wqsDyv3DP"}
204
205      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"Examples"},"finish_reason":null}],"usage":null,"obfuscation":"C5i6"}
206
207      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"pGw5kYwupN0"}
208
209      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" github"},"finish_reason":null}],"usage":null,"obfuscation":"7Q33d"}
210
211      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".com"},"finish_reason":null}],"usage":null,"obfuscation":"Fhi2Axwq"}
212
213      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/y"},"finish_reason":null}],"usage":null,"obfuscation":"OvCA6nir9K"}
214
215      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"inch"},"finish_reason":null}],"usage":null,"obfuscation":"XHHmeOqu"}
216
217      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"eng"},"finish_reason":null}],"usage":null,"obfuscation":"L2RZH7kGm"}
218
219      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ts"},"finish_reason":null}],"usage":null,"obfuscation":"QcdL3yZB8S"}
220
221      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ing"},"finish_reason":null}],"usage":null,"obfuscation":"t35TBT9sp"}
222
223      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"hua"},"finish_reason":null}],"usage":null,"obfuscation":"bqmojD4ds"}
224
225      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/go"},"finish_reason":null}],"usage":null,"obfuscation":"NcPV6H9sV"}
226
227      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"-"},"finish_reason":null}],"usage":null,"obfuscation":"shK49Hek694"}
228
229      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ethereum"},"finish_reason":null}],"usage":null,"obfuscation":"AKru"}
230
231      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"-ch"},"finish_reason":null}],"usage":null,"obfuscation":"8ZOse9qUO"}
232
233      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"inese"},"finish_reason":null}],"usage":null,"obfuscation":"J0WRHD8"}
234
235      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/c"},"finish_reason":null}],"usage":null,"obfuscation":"2U9aID3LUb"}
236
237      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"md"},"finish_reason":null}],"usage":null,"obfuscation":"1rbFczU3a6"}
238
239      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"h0xQEifNKOM"}
240
241      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"wn"},"finish_reason":null}],"usage":null,"obfuscation":"yJvTiJL48J"}
242
243      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ode"},"finish_reason":null}],"usage":null,"obfuscation":"lOzdCLxSM"}
244
245      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/main"},"finish_reason":null}],"usage":null,"obfuscation":"BxuEua2"}
246
247      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".go"},"finish_reason":null}],"usage":null,"obfuscation":"ftp3eDWmJ"}
248
249      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"6sGoRUVwJRZ"}
250
251      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"116"},"finish_reason":null}],"usage":null,"obfuscation":"MJ8mIu3ni"}
252
253      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"finish_reason":null}],"usage":null,"obfuscation":"wXpt0fmBxrN"}
254
255      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" github"},"finish_reason":null}],"usage":null,"obfuscation":"xGeOz"}
256
257      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".com"},"finish_reason":null}],"usage":null,"obfuscation":"nzZ2BYxB"}
258
259      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/open"},"finish_reason":null}],"usage":null,"obfuscation":"NqWmCTO"}
260
261      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"containers"},"finish_reason":null}],"usage":null,"obfuscation":"lO"}
262
263      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"YdpoeLK2yE6"}
264
265      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"um"},"finish_reason":null}],"usage":null,"obfuscation":"u81XTMtkDv"}
266
267      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"oci"},"finish_reason":null}],"usage":null,"obfuscation":"BuefUxHd3"}
268
269      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/c"},"finish_reason":null}],"usage":null,"obfuscation":"V1HQy4T4vv"}
270
271      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"md"},"finish_reason":null}],"usage":null,"obfuscation":"3ujJi492Ak"}
272
273      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"4fgHsoOgxHv"}
274
275      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"um"},"finish_reason":null}],"usage":null,"obfuscation":"ovHPyOQsLv"}
276
277      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"oci"},"finish_reason":null}],"usage":null,"obfuscation":"INro8qEP4"}
278
279      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/main"},"finish_reason":null}],"usage":null,"obfuscation":"rNzeMtj"}
280
281      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".go"},"finish_reason":null}],"usage":null,"obfuscation":"wCZPrSUJX"}
282
283      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"vzTUfsa4rpH"}
284
285      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"197"},"finish_reason":null}],"usage":null,"obfuscation":"R8UFiK9FH"}
286
287      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"finish_reason":null}],"usage":null,"obfuscation":"pD6OMeE63pS"}
288
289      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" github"},"finish_reason":null}],"usage":null,"obfuscation":"FXwvW"}
290
291      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".com"},"finish_reason":null}],"usage":null,"obfuscation":"Eq5KyUt1"}
292
293      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/qu"},"finish_reason":null}],"usage":null,"obfuscation":"XNJQOdGBt"}
294
295      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ay"},"finish_reason":null}],"usage":null,"obfuscation":"KNmoV6l3yT"}
296
297      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"kTkeXlorpKj"}
298
299      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"clair"},"finish_reason":null}],"usage":null,"obfuscation":"KZZJltg"}
300
301      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"core"},"finish_reason":null}],"usage":null,"obfuscation":"RDPhuny3"}
302
303      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/test"},"finish_reason":null}],"usage":null,"obfuscation":"Axs0F8Z"}
304
305      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/b"},"finish_reason":null}],"usage":null,"obfuscation":"8xtp6qcH6Z"}
306
307      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"is"},"finish_reason":null}],"usage":null,"obfuscation":"Jrm1qYPQMn"}
308
309      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ect"},"finish_reason":null}],"usage":null,"obfuscation":"WSUYMVBSJ"}
310
311      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/main"},"finish_reason":null}],"usage":null,"obfuscation":"RhE3PNl"}
312
313      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".go"},"finish_reason":null}],"usage":null,"obfuscation":"Fd0Eb3Jpg"}
314
315      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"slX8109EW4u"}
316
317      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"20"},"finish_reason":null}],"usage":null,"obfuscation":"K7bOFOQMoj"}
318
319      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":","},"finish_reason":null}],"usage":null,"obfuscation":"NhmLxpEWrJj"}
320
321      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" github"},"finish_reason":null}],"usage":null,"obfuscation":"IydG9"}
322
323      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".com"},"finish_reason":null}],"usage":null,"obfuscation":"2C31I34a"}
324
325      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/qu"},"finish_reason":null}],"usage":null,"obfuscation":"Rno0koNDy"}
326
327      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ay"},"finish_reason":null}],"usage":null,"obfuscation":"8WFZGGtvHb"}
328
329      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"HA8Ubu3Ebjj"}
330
331      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"clair"},"finish_reason":null}],"usage":null,"obfuscation":"dUgHt1q"}
332
333      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"core"},"finish_reason":null}],"usage":null,"obfuscation":"8O4HtL2a"}
334
335      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/test"},"finish_reason":null}],"usage":null,"obfuscation":"vH92XMc"}
336
337      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/c"},"finish_reason":null}],"usage":null,"obfuscation":"Cl2glwg4Zb"}
338
339      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"md"},"finish_reason":null}],"usage":null,"obfuscation":"X64rnJ5Nt9"}
340
341      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/"},"finish_reason":null}],"usage":null,"obfuscation":"mEu51K0GFlD"}
342
343      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"cle"},"finish_reason":null}],"usage":null,"obfuscation":"VCcn9jeJs"}
344
345      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"anc"},"finish_reason":null}],"usage":null,"obfuscation":"uvssewLAK"}
346
347      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"ache"},"finish_reason":null}],"usage":null,"obfuscation":"SrLSFu2P"}
348
349      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"/main"},"finish_reason":null}],"usage":null,"obfuscation":"OGjTyxJ"}
350
351      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":".go"},"finish_reason":null}],"usage":null,"obfuscation":"lhTqGzm86"}
352
353      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":":"},"finish_reason":null}],"usage":null,"obfuscation":"ETS3ehw43I5"}
354
355      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"19"},"finish_reason":null}],"usage":null,"obfuscation":"n8uvCRFjDX"}
356
357      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"\n"},"finish_reason":null}],"usage":null,"obfuscation":"xrqKRXai5U"}
358
359      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"+"},"finish_reason":null}],"usage":null,"obfuscation":"GzabmY4ghpV"}
360
361      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":"6"},"finish_reason":null}],"usage":null,"obfuscation":"nahFNhykFAK"}
362
363      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{"content":" more"},"finish_reason":null}],"usage":null,"obfuscation":"ZC6CYOz"}
364
365      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"usage":null,"obfuscation":"XK3xGk"}
366
367      data: {"id":"chatcmpl-Cb4nsxHSKTlBXIUBeVavXvVZQPQHm","object":"chat.completion.chunk","created":1762952636,"model":"gpt-5-2025-08-07","service_tier":"default","system_fingerprint":null,"choices":[],"usage":{"prompt_tokens":12757,"completion_tokens":1438,"total_tokens":14195,"prompt_tokens_details":{"cached_tokens":10240,"audio_tokens":0},"completion_tokens_details":{"reasoning_tokens":1344,"audio_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0}},"obfuscation":"oK9nzt3OxP3L"}
368
369      data: [DONE]
370
371    headers:
372      Content-Type:
373      - text/event-stream; charset=utf-8
374    status: 200 OK
375    code: 200
376    duration: 1m3.738215167s