Skip to content

feat(core): E7 tools — uteke_search, read_file, gh - #26

Merged
ajianaz merged 2 commits into
developfrom
feat/e7-tools
Aug 27, 2026
Merged

ajianaz merged 2 commits into
developfrom
feat/e7-tools

Conversation

@ajianaz

@ajianaz ajianaz commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

What

  • uteke_search (ReadOnly): semantic memory recall via the uteke CLI (uteke recall <q> --json), same pattern as cora_search
  • read_file (ReadOnly): jailed file read sharing the write_file jail semantics — traversal/symlink escapes rejected with distinct errors, 1 MiB cap
  • gh (Write, approval-gated): whitelist of 3 ops (issue_comment, issue_create, pr_create), fixed --repo, exact command line shown in the approval prompt, injectable binary for fake-binary tests
  • refactor: extracted subprocess module (run_with_timeout + 30s ceiling) shared by cora_search / uteke_search / gh

Why

Issue #7: the agent needs memory recall, repo file access, and GitHub ops as first-class tools, each with the right risk classification so the E6 approval gate enforces Write ops while ReadOnly ops stay frictionless.

Testing

  • cargo test --workspace: 95 passed, 0 failed (17 new tests)
  • cargo clippy --workspace --all-targets: 0 warnings
  • cora review: no issues found
  • gh tool proven end-to-end against a fake binary: recorded argv matches the whitelist exactly

- uteke_search (ReadOnly): semantic memory recall via uteke CLI
- read_file (ReadOnly): jailed file read, symlink-escape proof, 1 MiB cap
- gh (Write, approval-gated): whitelisted ops only (issue_comment,
  issue_create, pr_create), fixed --repo, injectable binary for tests
- refactor: shared subprocess module (run_with_timeout + 30s ceiling)
  replaces the copy inside cora_search
- wiring: all tools registered in tole-cli build_registry

Closes #7
.get(k)
.and_then(Value::as_str)
.map(|v| v.to_string())
.filter(|v| !v.trim().is_empty())
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown

🔍 Cora AI Code Review

✅ No issues found. Code looks good!


Review powered by cora-code · BYOK · MIT

CodeCora PR review flagged that number/base/title were passed to gh as
arbitrary non-empty strings; a leading-dash value could inject flags and
redirect the fixed --repo. Now:
- number: ASCII digits only
- base: branch charset [A-Za-z0-9._/-], no leading dash
- title: no leading dash
- body: payload of --body (clap consumes it as a value); audit string
  still quotes anything dash-led

Adds rejects_argument_injection test.
@ajianaz
ajianaz merged commit 51722f4 into develop Aug 27, 2026
11 checks passed
@ajianaz
ajianaz deleted the feat/e7-tools branch August 27, 2026 02:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants