feat(mcp): tools to create session groups and file sessions under them - #673
Merged
Merged
Conversation
An assistant can now organise the sessions it starts: agentistics_session_groups (list), agentistics_session_group_create (optionally filing sessions in the same call) and agentistics_session_group_edit (add / remove / rename / delete), over the new /api/session-groups routes. Groups and sessions are addressed by id OR name/title/id prefix, and a reference that matches nothing or two things is refused (404/409) rather than guessed. The pure rules move to @agentistics/core (planGroupOp, resolveGroupRef, resolveSessionForGroup) so the web sidebar and the server use the same ones. Writes go through a new atomic updatePreferences, so a browser and an assistant changing groups at once cannot undo each other. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q6YYtbuG1MA3dzqc6Hiam3
3 tasks
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.
Summary
agentistics_session_groups(list),agentistics_session_group_create(optionally files sessions in the same call) andagentistics_session_group_edit(add/remove/rename/delete), over new/api/session-groupsroutes.Motivation
Requested: let LLMs create the groups and put the sessions they start inside, to keep the fleet organised.
Changes
@agentistics/coresessionGroups.ts: the pure planners move here (planGroupOp,resolveGroupRef,resolveSessionForGroup,sessionIdentityKey); the web module re-exports them, so both surfaces share one rule.server/sessions/session-groups-web.ts+ routes inindex.ts+capability-guard.ts(localShell).preferences.ts:updatePreferences, an atomic read-modify-write (the browser writes the same key).packages/mcp/agentistics-mcp.ts,docs/mcp.md,CLAUDE.md.Test plan
updatePreferencesAt(20 writers, none lost)Notes
The browser adopts a change made through the MCP when its tab regains focus (the same refresh every shared preference uses).
🤖 Generated with Claude Code