Skip to content

feat: Implement dynamic impulse radius classification of tools - #236

Open
marcelklehr wants to merge 18 commits into
mainfrom
feat/impulse-radius
Open

marcelklehr wants to merge 18 commits into
mainfrom
feat/impulse-radius

Conversation

@marcelklehr

Copy link
Copy Markdown
Member

to automatically judge need for user confirmation

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (N/A)

to automatically judge need for user confirmation

Assisted-by: ClaudeCode:claude-opus-4-8
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…citly destructive tools

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
…lassification

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
@marcelklehr
marcelklehr marked this pull request as ready for review September 15, 2026 09:09
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>

@lukasdotcom lukasdotcom left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'll do a more in depth review tomorrow, but here are some things that I found for the tool categorizations. Feel free to ignore them if you disagree with any of these.

  • update_page_content for collectives should be destructive. You could also just make sure it is adding text and only mark it destructive then.
  • For duckduckgo and youtube it does not have an impulse radius. Before this they didn't require a confirmation, but now they would require confirmation.
  • For remove_reaction I wouldn't consider that destructive.

…lementing the confirmation dialog

Assisted-by: ClaudeCode:claude-opus-5
Signed-off-by: Marcel Klehr <mklehr@gmx.net>

@julien-nc julien-nc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

How does it work with MCP tools? They default to EXTERNAL. Can an admin assign a radius later? If not, won't they stick with "always_confirm"?


@tool
@dangerous_tool
@impulse(ImpulseRadius.SELF)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Should be destructive or always_confirm, no?


@tool
@safe_tool
@impulse(ImpulseRadius.SELF)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It is ambiguous but since it can overwrite existing files, should it be considered as destructive like files.upoad_file for example? (@destructive_if(path_taken))


@tool
@dangerous_tool
@impulse(transfer_radius)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Spotted by Qwen:

when destination_path is omitted the conversion writes over/near the source; no destructive_if (compare with copy_file, which has destination_taken). Verify in-place semantics and mark accordingly.

@edward-ly

edward-ly commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

I'm also not currently seeing the impulse radii being passed to the Assistant chat. Do they need to be added here, perhaps?

def _task_tool_calls(self, task: Task) -> tuple[list[dict[str, typing.Any]], list[dict[str, typing.Any]]]:

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