Module: Pikuri::Code

Defined in:
lib/pikuri-code.rb,
lib/pikuri/code/bash.rb,
lib/pikuri/code/extension.rb,
lib/pikuri/code/git_clone.rb,
lib/pikuri/code/bash/sandbox.rb,
lib/pikuri/code/bash/tokenizer.rb,
lib/pikuri/code/exit_plan_mode.rb,
lib/pikuri/code/enter_plan_mode.rb,
lib/pikuri/code/toolchain_paths.rb,
lib/pikuri/code/plan_mode_changed.rb,
lib/pikuri/code/git_repo_researcher.rb,
lib/pikuri/code/bash/passive_command_detector.rb

Defined Under Namespace

Modules: ToolchainPaths Classes: Bash, EnterPlanMode, ExitPlanMode, Extension, GitClone, PlanModeChanged

Constant Summary collapse

LOADER =
Zeitwerk::Loader.new
GIT_REPO_RESEARCHER =

Bundled "clone-and-dig" persona. Where SubAgent::RESEARCHER answers "look up one fact online", GIT_REPO_RESEARCHER answers "explore that repo's source for how it does X". Toolset is git_clone + +file_list+/+read+/+grep+/+glob+ (rebuilt onto the fresh workspace by SubAgent::SubAgentTool) + the RESEARCHER network reads (+web_search+/+web_scrape+/+fetch+). No +bash+/+edit+/+write+/+agent+.

It signals needs_temp_workspace: true and nothing more; SubAgent::SubAgentTool owns the temp-dir lifecycle. That view is disjoint from the parent's, so a path a cloned repo exfiltrates through the persona's reply is inert (the parent's containment check rejects it).

Trifecta-wise, same shape as SubAgent::RESEARCHER: leg (a) private data is near-zero (only the temp workspace + what it downloaded), so legs (b)/(c) — untrusted content + egress — are harmless. The one wrinkle is the historical RCE class on git clone itself, addressed by GitClone's HTTPS-only + no-submodules + Bubblewrap sandbox.

Returns:

  • (Pikuri::SubAgent::Persona)
Pikuri::SubAgent::Persona.new(
  name: 'git_repo_researcher',
  description: 'Clone a public git repo and explore it with file_list/read/grep/glob. ' \
               'Use when you need to dig through a repository\'s actual source, ' \
               'not just a page about it. Also has web_search/web_scrape/fetch. ' \
               'Returns one paragraph + citations.',
  tool_names: %w[git_clone file_list read grep glob web_search web_scrape fetch].freeze,
  system_prompt: Pikuri.prompt('persona-git-repo-researcher'),
  max_steps: 30,
  needs_temp_workspace: true
)