Repository navigation
feat(toolkit): the kind of an edge, when connect can make more than one - #96
Merged
Merged
Conversation
A workflow connection is one thing, so `connect` never said what kind of
edge it made. A specification's clauses are joined by typed edges
(refines, verifies, depends-on), and a sidecar for them has to be told
which one a drawn connection is.
The sidecar lists the kinds in its capabilities (`diagnostic.edgeRoles`,
`[{ id, label, description? }]`, parsed onto `SidecarCapabilities`). The
create-edge handler asks which with a quick pick and sends it as
`args.role`: a role given on the operation, or the only one listed, is
taken without asking; a headless caller gets no pick and the sidecar's
default applies; a dismissed pick makes no connection. The delete handler
sends the edge's `cal:edgeRole` as `args.role`, so the right one of
several edges between two nodes goes. A sidecar that lists no roles is
treated exactly as before.
Claude-Session: https://claude.ai/code/session_012yAjXyWw6JyWsXvHG3cG9c
4 tasks done
…e headless Review of #96: - Every connect asked the sidecar for its capabilities, a process of its own, before the connect itself: two spawns per edge for every consumer, 2N for an agent's create-edges of N. `SidecarInvoker.edgeRoles` now asks once per sidecar command for the session (a failed ask is not kept), and both the create-edge and the delete handler use it. - The create-edges MCP tool passed the agent's args through without `headless`, so with a sidecar listing several kinds an agent's call opened a quick pick on the person's screen, and a dismissed pick made no edge while the tool reported success. The tool now marks each edge headless, and its description tells the agent to name the kind in `args.role` (else the sidecar's default kind is made). - Delete sent the edge's role even to a sidecar that lists no kinds; it now sends one only when the sidecar does. Tests: edge-roles.test.ts gains the once-per-session ask, the retry after a failed ask, the headless connect and the delete handler with and without listed kinds; mcp-diagram-module.test.ts expects the headless marker. Claude-Session: https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8
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
A workflow connection is one thing, so
connectnever said what kind of edge it made. A specification's clauses are joined by typed edges (refines, verifies, depends-on), and a sidecar for them has to be told which one a drawn connection is. Plan item N7 of the ndf-ide plan.diagnostic.edgeRoles,[{ id, label, description? }], parsed ontoSidecarCapabilities.edgeRoles(parseEdgeRoles).args.role. A role given on the operation, or the only one listed, is taken without asking; a headless caller gets no pick (the sidecar's default applies); a dismissed pick makes no connection. The capabilities are asked once per sidecar command for the session (SidecarInvoker.edgeRoles), not on every connect.cal:edgeRoleasargs.role, so the right one of several edges between two nodes goes.roleargument.edge-roles.test.ts(6 tests); CHANGELOG entry. Neutral: the roles and their words come from the sidecar.Independent of #90–#95.
Test plan
npm run typecheck,npm run check:neutralityhttps://claude.ai/code/session_012yAjXyWw6JyWsXvHG3cG9c
Review fixes (28cce2f)
args.role. Before, an agent's call could open a quick pick mid-tool-call.https://claude.ai/code/session_01E8WfqKknDNN6xpNVcJL5K8