feat(core): configure tool availability per session#35691
Open
ksamirdev wants to merge 1 commit into
Open
Conversation
Add a public API endpoint and event-sourced mechanism for enabling or disabling tools on a per-session basis. Clients can POST a map of tool names to booleans which gets translated into Permission.Ruleset entries and composed with agent-level permissions at materialization time (session rules win via findLast semantics).
Contributor
|
The following comment was made by an LLM, it may be inaccurate: I found one potentially related PR:
This PR appears related as it also deals with tool visibility and session permissions, which is closely aligned with the current PR's focus on configuring tool availability per session. However, this appears to be an older PR (from the numbering). I recommend verifying whether #17089 has already been merged and if the current PR (35691) addresses any gaps or extends that functionality. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue for this PR
Closes #35647
Type of change
What does this PR do?
Implements session-scoped tool configuration through a new
POST /api/session/:sessionID/configureendpoint.The endpoint accepts
{tools: {bash: false, edit: true}}and translates that into Permission.Ruleset entries stored via a durablesession.tools.configuredevent. At materialization time, session rules are appended after agent permissions so they win via findLast semantics inwhollyDisabled().Passing tools as undefined clears session overrides.
How did you verify your code works?
bun run migration, SDK regenerated withbun run generateScreenshots / recordings
N/A
Checklist