Skip to content

fix(evi): namespace dynamic tool names and re-resolve gates per turn - #531

Merged
HugoRCD merged 1 commit into
mainfrom
fix/evi-dynamic-tools
Aug 9, 2026
Merged

fix(evi): namespace dynamic tool names and re-resolve gates per turn#531
HugoRCD merged 1 commit into
mainfrom
fix/evi-dynamic-tools

Conversation

@HugoRCD

@HugoRCD HugoRCD commented Aug 9, 2026

Copy link
Copy Markdown
Owner

Two defects surfaced by the first end-to-end before/after run from iMessage, plus a capture-quality follow-up.

Dynamic tool names

Dynamic map keys are bare tool names; there is no file-slug prefix. agent/tools/git.ts therefore registered push (not git__push), blob.ts registered upload_image, and ai-gateway.ts registered credits/report/generation, while every instruction, skill, and eval references the namespaced names. The keys now spell the namespace out (git__push, blob__upload_image, ai_gateway__*), matching the docs' manual-namespacing guidance.

Gates re-resolved per turn

The three gated tool files resolved only at session.started, which fires once per session. A durable session resumed on a fresh deployment never re-fires it, which is how a maintainer iMessage session lost the push tool mid-conversation right after a production redeploy. Each file now also re-resolves at turn.started, so the gate follows the turn's actual caller and survives redeploys.

Capture framing

The before-after skill now leads with element capture: pick the tightest stable selector (via browser__snapshot) so the frames crop to the change instead of showing the viewport at scroll zero; full-viewport capture is reserved for page-level changes.

No changeset: confined to apps/evi. Verified: tsc, 40 unit tests, eve build.

Summary by CodeRabbit

  • New Features

    • Capture workflows now support targeted element captures using stable selectors, including separate selectors for responsive or differing layouts.
    • Full-page captures can be requested explicitly when needed.
    • Capture guidance now includes selector discovery and responsive viewport recommendations.
  • Bug Fixes

    • Tool availability and authorization are refreshed when sessions resume or new turns begin, ensuring access reflects current permissions.
    • Tool names are now consistently grouped by their function for clearer identification.

@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
evi Ready Ready Preview Aug 9, 2026 2:28pm
4 Skipped Deployments
Project Deployment Actions Updated (UTC)
evlog-docs Skipped Skipped v0 Aug 9, 2026 2:28pm
evlog-render-lab Skipped Skipped Aug 9, 2026 2:28pm
evlog-telemetry Skipped Skipped Aug 9, 2026 2:28pm
just-use-evlog Skipped Skipped Aug 9, 2026 2:28pm

Request Review

@vercel
vercel Bot temporarily deployed to Preview – just-use-evlog August 9, 2026 14:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-render-lab August 9, 2026 14:25 Inactive
@changeset-bot

changeset-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: df25ecc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
vercel Bot temporarily deployed to Preview – evlog-telemetry August 9, 2026 14:25 Inactive
@vercel
vercel Bot temporarily deployed to Preview – evlog-docs August 9, 2026 14:25 Inactive
@github-actions github-actions Bot added the bug Something isn't working label Aug 9, 2026
@coderabbitai

coderabbitai Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 20fc18d9-5ff6-4855-bd4c-1f174cefde4a

📥 Commits

Reviewing files that changed from the base of the PR and between faad17f and df25ecc.

📒 Files selected for processing (4)
  • apps/evi/agent/skills/before-after/SKILL.md
  • apps/evi/agent/tools/ai-gateway.ts
  • apps/evi/agent/tools/blob.ts
  • apps/evi/agent/tools/git.ts

📝 Walkthrough

Walkthrough

The PR updates before-after capture guidance and namespaces AI Gateway, blob, and git tools. Dynamic tool access is now re-evaluated at session start and at each turn start.

Changes

Before-after capture guidance

Layer / File(s) Summary
Selector-based capture workflow
apps/evi/agent/skills/before-after/SKILL.md
The guidance uses stable selectors for localized changes, reserves viewport-zero captures for page-level changes, and clarifies full-page and responsive viewport usage.

Dynamic Evi tool exposure

Layer / File(s) Summary
Namespaced tool registration
apps/evi/agent/tools/ai-gateway.ts, apps/evi/agent/tools/blob.ts, apps/evi/agent/tools/git.ts
AI Gateway, blob upload, and git push tools now use namespaced keys.
Per-turn authorization resolution
apps/evi/agent/tools/ai-gateway.ts, apps/evi/agent/tools/blob.ts, apps/evi/agent/tools/git.ts
Tool availability is re-evaluated on turn.started using the current caller authorization. Existing session-start checks remain.

Estimated code review effort: 2 (Simple) | ~10 minutes

Sequence Diagram(s)

sequenceDiagram
  participant EviSession
  participant ToolResolver
  participant ToolRegistry
  EviSession->>ToolResolver: session.started authorization check
  ToolResolver->>ToolRegistry: register authorized tools
  EviSession->>ToolResolver: turn.started current caller
  ToolResolver->>ToolRegistry: re-evaluate current authorization
  ToolRegistry-->>EviSession: expose authorized namespaced tools
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the two primary changes: namespaced dynamic tool names and per-turn gate resolution.
Description check ✅ Passed The description explains the changes, the problems they solve, scope, and verification results; optional issue and documentation checklist items are not addressed.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/evi-dynamic-tools

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Thank you for following the naming conventions! 🙏

@pkg-pr-new

pkg-pr-new Bot commented Aug 9, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@evlog/cli@531
npm i https://pkg.pr.new/evlog@531
npm i https://pkg.pr.new/@evlog/nuxthub@531
npm i https://pkg.pr.new/@evlog/telemetry@531

commit: df25ecc

@HugoRCD HugoRCD self-assigned this Aug 9, 2026
@HugoRCD
HugoRCD merged commit 60b9fde into main Aug 9, 2026
22 checks passed
@HugoRCD
HugoRCD deleted the fix/evi-dynamic-tools branch August 9, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant