Skip to content

Refactor package metadata and implement tool approval mechanism - #16

Closed
gitricko wants to merge 12 commits into
mainfrom
allow-all-button
Closed

gitricko wants to merge 12 commits into
mainfrom
allow-all-button

Conversation

@gitricko

Copy link
Copy Markdown
Owner

This pull request updates the branding and enhances the tool approval workflow for the VS Code extension. The most significant changes include renaming the extension from "Hermes AI Agent" to "Hermes Code Agent" and introducing a safer, more flexible tool permission system that supports persistent whitelisting and a new approval mode.

Branding Updates:

  • Renamed the extension in package.json from "hermes-ai-agent" to "hermes-code-agent", updated the display name, description, and version number, and changed the activity bar title to "Hermes Code Agent". [1] [2]
  • Updated keywords in package.json to reflect the new branding ("hermes agent" instead of "hermes").

Tool Approval and Security Improvements:

  • Added a new approval mode, configurable via ~/.hermes/config.yaml, to determine if explicit tool approval is required; defaults to safe mode if the config is missing or unparseable.
  • Implemented persistent tool whitelisting: users can now "Always Allow" a tool, which stores it in workspace state and skips future prompts for that tool. [1] [2]…whitelisting options

Copilot AI review requested due to automatic review settings May 25, 2026 03:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR rebrands the VS Code extension from “Hermes AI Agent” to “Hermes Code Agent” and enhances the tool permission workflow by adding a configurable approval mode plus persistent tool whitelisting to reduce repeated prompts.

Changes:

  • Renamed extension metadata (name, display name, description, activity bar title) and bumped version.
  • Added a tool approval gating mechanism driven by ~/.hermes/config.yaml and introduced “Always Allow” to persist tool approvals in workspace state.
  • Updated lockfile metadata to reflect the new package name/version.

Reviewed changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/extension.ts Adds approval mode reading + persistent tool whitelisting in the permission request handler.
package.json Updates extension branding fields and increments version.
package-lock.json Updates lockfile package name/version to match the rebranded extension.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/extension.ts Outdated
gitricko and others added 2 commits May 24, 2026 23:32
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 2 comments.

Comment thread src/extension.ts
Comment thread src/extension.ts
Comment on lines 274 to 285
const allowOptionId = optionIdByIntent(params, 'allow');
const denyOptionId = optionIdByIntent(params, 'deny');
const allow = 'Allow Once';
const deny = 'Deny';
const always = 'Always Allow';
const choice = await vscode.window.showWarningMessage(
summarizePermissionRequest(params),
{ modal: true },
allow,
deny,
allow,
always,
);
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread src/extension.ts Fixed
gitricko and others added 2 commits May 25, 2026 00:18
…expression'

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
…ests

The 'Always Allow' button now checks if the tool identifier is the fallback
'an action' (indicating a malformed permission request). If it is, the action
is approved for this request only, but not persisted to the whitelist. This
prevents a situation where a user could accidentally whitelist all future
malformed/unknown permission requests by clicking 'Always Allow' once.

Addresses review comment on PR #16 at discussion_r3296018150

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

Comment thread src/extension.ts
Comment thread src/extension.ts
Comment on lines 291 to +295
const allowOptionId = optionIdByIntent(params, 'allow');
const denyOptionId = optionIdByIntent(params, 'deny');
const allow = 'Allow Once';
const deny = 'Deny';
const always = 'Always Allow';
Comment thread src/extension.ts
gitricko and others added 2 commits May 25, 2026 00:30
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 3 changed files in this pull request and generated 3 comments.

Comment thread src/extension.ts Outdated
Comment thread src/extension.ts
Comment on lines 304 to 308
const choice = await vscode.window.showWarningMessage(
summarizePermissionRequest(params),
{ modal: true },
allow,
deny,
...buttons,
);
Comment thread package.json
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@gitricko gitricko closed this May 25, 2026
@gitricko
gitricko deleted the allow-all-button branch May 25, 2026 17:21
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.

4 participants