Commit Graph
59 Commits
Author SHA1 Message Date
David KayaandCopilot f04e3b9dcc feat: cache same-turn approval selections
Add an AlwaysApprove flag to resolve-approval commands and cache
approved tool keys for the current request so repeated runtime
permissions are auto-approved immediately within the same turn.
The cache is cleared when the turn finishes to avoid leaking across
future requests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:24:55 +01:00
David KayaandCopilot 3ec69d990b feat: enable 'always approve for session' for runtime tools
Runtime tool permission requests (read, write, shell, store_memory) now
resolve stable approval names via fallback in the sidecar approval
coordinator, enabling the 'Always approve' button and session-level
auto-approval for built-in tools.

Backend:
- Add fallback tool names for PermissionRequestRead (read),
  PermissionRequestWrite (write), PermissionRequestShell (shell),
  and PermissionRequestMemory (store_memory)
- Add autoApprovedToolName parameter to RequiresToolCallApproval
  for permission-kind-based session approval matching
- Track tool.execution_start events in ToolNamesByCallId for
  supplementary exact-name resolution

Frontend:
- Use approval.toolName ?? approval.permissionKind as fallback key
  in resolveSessionApproval and ApprovalBanner
- Add shell, read, write permission-kind entries to builtin approval
  tool definitions so pruning preserves session overrides

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:20:14 +01:00
David KayaandCopilot 154787c336 fix: only project handoff tool calls as FunctionCallContent
AryxCopilotAgent was converting ALL Copilot tool requests (ask_user,
MCP tools, etc.) into FunctionCallContent. The Agent Framework's
AIAgentHostExecutor tracks every FunctionCallContent as an outstanding
request.  Since SDK-handled tools like ask_user never produce a
matching FunctionResultContent, HasOutstandingRequests stayed true and
TurnToken was never emitted — stalling group-chat advancement after
an ask_user interaction.

Now only handoff_to_* tool requests are projected as FunctionCallContent.
All other tool calls remain invisible to the Agent Framework executor,
matching the upstream GitHubCopilotAgent behaviour.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:12:42 +01:00
David KayaandCopilot 9d65e3d209 fix: restore real Copilot handoffs
Replace the broken forced-tool workaround with a repo-local Copilot
agent adapter that merges runtime handoff instructions and tool
declarations into Copilot sessions and projects Copilot tool requests
back into Agent Framework function-call updates.

Also add regression coverage for the adapter and document the runtime
integration detail in the architecture guide.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:07:58 +01:00
David KayaandCopilot 7247a68f24 fix: enforce real entry handoffs
Constrain the initial handoff triage agent so it cannot use regular
session tooling and must use a handoff tool on its first invocation.
This prevents the model from narrating delegation in plain text while
never actually transferring control.

Also add regression tests for the new entry-agent constraints.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 20:58:31 +01:00
David Kaya 85a9327f65 fix: surface handoff specialist activity\n\nQueue per-agent thinking updates from synchronous Copilot SDK session\nevents, flush them through the workflow runner, and promote handoff\ntargets to thinking immediately after handoff activity is emitted.\nThis fixes the UI case where downstream agents stayed on 'No status\nyet' during handoff patterns.\n\nAlso add targeted handoff diagnostics and regression tests.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 2026-03-27 20:49:52 +01:00
David KayaandCopilot 192c28f721 feat: surface MCP OAuth sidecar events
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 19:01:46 +01:00
David KayaandCopilot 380e402512 feat: add backend plan mode checkpoints
Add backend support for plan-mode turn shaping and exit-plan review
checkpoints. Run-turn commands now accept an interaction mode,
plan-mode prompt guidance tells agents to produce a plan and call
exit_plan_mode, and the sidecar emits a structured
exit-plan-mode-requested event when the SDK raises that session event.

For now the backend intentionally treats exit_plan_mode as a turn
boundary and graceful-degradation review checkpoint. The current
Agent Framework GitHubCopilotAgent wrapper does not expose a clean way
to bridge the live CopilotSession back into same-turn exit-plan
resolution, so that follow-up remains documented for the frontend and a
future backend slice.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 23:29:32 +01:00
David KayaandCopilot a1a044e7ca fix: filter internal runtime tools
Exclude internal runtime tools from sidecar capability discovery so they do not surface in the approval tool catalog.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 19:23:48 +01:00
David KayaandCopilot 2ae4bd01b4 feat: add ask_user support to sidecar
Implement the Copilot SDK user input round-trip in the backend:
- add user-input-requested and resolve-user-input protocol DTOs
- add a CopilotUserInputCoordinator that mirrors approval flow with
  pending TaskCompletionSource state and explicit resolution
- wire SessionConfig.OnUserInputRequest through CopilotAgentBundle
  and CopilotWorkflowRunner
- extend SidecarProtocolHost to emit user input events, accept
  resolve-user-input commands, and filter ask_user from runtime
  approval tools
- add regression tests for the new coordinator and protocol flow

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 17:34:49 +01:00
David KayaandCopilot 13c543e2fd feat: add structured tool approval details to sidecar protocol
Expose SDK permission request details on approval-requested events via a
new permissionDetail payload. This preserves the existing title/detail
summary while carrying the command, URL, diff, args, and other
kind-specific data needed for richer approval UI in the renderer.

Also adds sidecar coverage for all supported permission request kinds and
verifies the new payload serializes over the protocol.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 16:40:41 +01:00
David KayaandCopilot 1edd3aed55 refactor: rename sidecar host to Aryx
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 00:14:12 +01:00
David KayaandCopilot d88d00df0d fix: make copilot CLI path resolution cross-platform
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 23:44:49 +01:00
David KayaandCopilot d84b3021f2 feat: add sidecar turn cancellation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 22:04:14 +01:00
David KayaandCopilot e5878ba9e8 feat: auto-discover MCP servers from project and user config files
Scan .vscode/mcp.json, .mcp.json, .copilot/mcp.json (project-level) and
~/.copilot/mcp.json (user-level) for MCP server definitions. Discovered
servers require explicit user acceptance before activation.

Backend:
- Add ConfigScannerRegistry with per-format scanners and  substitution
- Add discovered tooling domain model with fingerprint-based change detection
- Integrate scanning into workspace load, project add, and project selection
- Merge accepted discovered MCPs into effective runtime tooling
- Extend sidecar contracts with env/headers for real-world MCP configs
- Add IPC channels for accept/dismiss/rescan operations

Frontend:
- Add DiscoveredToolingModal for reviewing pending MCP servers
- Auto-show modal when pending discoveries exist on load or project switch
- Add amber badge on sidebar project headers for pending discoveries
- Add discovered MCP section in Settings panel with accept/dismiss/rescan
- Group InlinePills tool dropdown by Workspace MCP / User MCP / Project MCP
- Pass effective project tooling (including accepted discoveries) to ChatPane

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:54:06 +01:00
David KayaandCopilot cc3c04b841 feat: enable scratchpad tooling frontend and instruction update
- Remove !isScratchpad gate on tooling/approval pills in ChatPane
- Update scratchpad agent guidance to permit tool/file usage
- Add EryxAppService scratchpad tooling integration tests
- Update ARCHITECTURE.md to reflect scratchpad tooling support

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:20:43 +01:00
David KayaandCopilot 4ecfa5bff6 feat: enable scratchpad tooling backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:14:19 +01:00
David KayaandCopilot 1bd0fcba3e refactor: improve sidecar backend structure
Refactor sidecar command dispatch, approval handling, transcript projection, stream merging, and tooling helpers while preserving behavior and expanding backend regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 20:11:59 +01:00
David KayaandCopilot f2c5b2cf1a fix: preserve handoff final authorship
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 00:15:30 +01:00
David KayaandCopilot 6460fe7173 fix: preserve agent authorship across projections
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 00:10:56 +01:00
David KayaandCopilot 9bfd7837aa fix: preserve handoff agent identity
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 00:02:46 +01:00
David KayaandCopilot 7c848113c0 fix: correct handoff output attribution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:55:30 +01:00
David Kaya 2fc03454c4 fix: block tools for handoff triage\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> 2026-03-24 23:51:38 +01:00
David KayaandCopilot 2c972a063a fix: tighten handoff routing behavior
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 23:47:31 +01:00
David KayaandCopilot 2e2caf78f9 feat: add graph-backed orchestration topology
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 22:44:17 +01:00
David KayaandCopilot 5ab0b22d15 fix: align orchestration behavior with agent framework docs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 22:09:52 +01:00
David KayaandCopilot 8b2e7cd2c0 refactor: simplify workflow request interpretation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 21:29:35 +01:00
David KayaandCopilot f1a96773c8 refactor: decompose CopilotWorkflowRunner
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 21:10:06 +01:00
David KayaandCopilot 44d9c43b09 refactor: resolve approval tools from SDK call ids
- correlate permission requests to tool names via ToolCallId when the
  workflow request stream exposes matching CallId values
- keep the url-to-web_fetch alias only as a narrow fallback when a
  matching tool call cannot be recovered
- cover generic permission-category lookup for url, shell, and read in
  sidecar tests

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 21:03:16 +01:00
David KayaandCopilot 7622d047b1 fix: auto-approve URL permission requests
- map GitHub Copilot SDK PermissionRequestUrl to web_fetch so runtime
  tool auto-approval matches URL fetch permissions
- include hook tool names in approval tool-name extraction
- include requested URLs in approval detail when manual review is still
  required
- add sidecar tests covering URL and hook permission handling

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:43:06 +01:00
David KayaandCopilot 130b114906 fix: use runtime tools for approval auto-approval
- load runtime tools dynamically from Copilot CLI capabilities via tools.list
- merge runtime tools with configured MCP and LSP tools in the approval catalog
- keep a fallback builtin runtime tool list when capabilities are unavailable
- move approval-tool pruning to the app service so dynamic tools are not dropped on load
- update approval UI and docs to use the corrected runtime-tool model

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:16:11 +01:00
David KayaandCopilot d5c538eed9 feat: add tool-specific approval overrides
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 20:02:29 +01:00
David KayaandCopilot 2aa8d73b2d feat: add approval checkpoints backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:48:58 +01:00
David KayaandCopilot 082af36255 fix: stabilize streamed message rendering
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 23:49:12 +01:00
David KayaandCopilot b88299f962 fix: improve streaming message merging
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 23:31:06 +01:00
David KayaandCopilot 794722673b fix: strengthen group chat collaboration guidance
Audit confirmed that single, sequential, concurrent, and handoff are mapped to distinct workflow builders as intended. Group-chat was also using the correct round-robin manager, but the agents only had one-shot role prompts, so the reviewer could behave like a fresh assistant instead of refining the draft in progress. Add explicit runtime guidance for group-chat participants plus clearer built-in Writer/Reviewer instructions and regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 23:22:09 +01:00
David KayaandCopilot cf699b2442 fix: stabilize TypeScript LSP startup
Seed new TypeScript LSP profiles with --stdio, validate that shared profiles keep the required flag, auto-add it for existing profiles in the sidecar runtime, and include recent stderr when a language server dies before completing a request. Add shared and sidecar regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 23:16:48 +01:00
David KayaandCopilot fe7155764c fix: resolve LSP serializer options
Configure the sidecar LSP tool serializer with a DefaultJsonTypeInfoResolver and freeze it read-only before handing it to AIFunctionFactory. Add regression coverage so enabling LSP-backed tools cannot reintroduce the runtime JsonSerializerOptions failure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 23:12:23 +01:00
David KayaandCopilot efa5c44e07 feat: add MCP and LSP tooling support
Add global MCP/LSP settings, per-session Activity toggles, sidecar runtime integration, tests, and documentation updates.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 22:51:03 +01:00
David KayaandCopilot 50a8e5dfbe refactor: rename Kopaya to Eryx
Rename the product, runtime surfaces, sidecar projects, docs, tests, and packaging outputs from Kopaya to Eryx across the repository.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 22:01:23 +01:00
David KayaandCopilot a77bd107ab fix: use Copilot launch command for version checks
Run the Copilot CLI version probe through the resolved launch path and args instead of invoking the Windows shim directly. This keeps the version check aligned with the SDK launch strategy and avoids false 'Version unknown' results from the Winget-installed Copilot executable.

Add a regression test covering the constructed launch command.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:27:17 +01:00
David KayaandCopilot bf5aa7ce57 feat: add Copilot version and account diagnostics
- report Copilot CLI version freshness as latest, outdated, or unknown
- expose active Copilot account metadata from the SDK auth status
- add best-effort GitHub organization context when gh is available
- document the frontend follow-up in HANDOVER.md

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 15:10:10 +01:00
David KayaandCopilot d68b1b99f3 feat: add Copilot connection diagnostics
Add backend support for Copilot connection and account-status UX without introducing raw provider credential management.

This change extends sidecar capabilities with explicit connection diagnostics, adds a refreshable capabilities IPC path, classifies common Copilot CLI failure modes, and includes a frontend handover document describing the new payload and expected UI states.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 12:58:40 +01:00
David KayaandCopilot 6e623b7bd6 fix: use live copilot model availability
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 11:07:43 +01:00
David KayaandCopilot 9799a959d6 fix: preserve single-chat final messages
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 10:43:59 +01:00
David KayaandCopilot 1b41cbd1e0 feat: add scratchpad chat sessions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 10:11:42 +01:00
David KayaandCopilot 16229b8b0a fix: stabilize streamed agent text
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 21:39:46 +01:00
David KayaandCopilot 039e570348 fix: strengthen handoff workflow guidance
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 21:38:02 +01:00
David KayaandCopilot f940b9d153 fix: enforce handoff delegation roles
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 21:13:16 +01:00
David KayaandCopilot d155085d0c fix: preserve handoff agent attribution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 20:32:22 +01:00