Commit Graph
43 Commits
Author SHA1 Message Date
David KayaandCopilot 906433f408 feat: add git workflow backend operations
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-31 16:43:13 +01:00
David KayaandCopilot c702cf88e2 fix: approval pill count mismatch with duplicate MCP tool names
When multiple MCP servers expose tools with the same name, the approval
pill showed an incorrect count (e.g. 150/300) even when everything was
approved.  The numerator used a Set<string> to deduplicate by tool ID,
so shared tools were counted once, while the denominator counted each
group occurrence independently.

Extract countApprovedToolsInGroups() into shared/domain/tooling.ts and
switch to per-group counting that mirrors the totalItemCount formula.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-30 10:07:41 +02:00
David KayaandCopilot e956f8ea6c feat: emit tool-call file previews
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 23:55:25 +02:00
David KayaandCopilot d88ce0f00c feat: add message actions backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 22:59:56 +02:00
David KayaandCopilot 4726e2acea feat: allow branching from both user and assistant messages
- Relax branchSessionRecord validation to accept user or assistant roles
- Show "Branch from here" hover button on all conversation messages
- Contextual tooltip: "starting from this message" vs "continuing from this response"
- Add test for branching from assistant message
- Replace non-user rejection test with non-conversation rejection test

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 21:43:58 +02:00
David KayaandCopilot 7aae1b2cd5 feat: add backend session branching support
Add the backend contract and session-domain support for
'Branch from here':
- new branchSession IPC method and sessions:branch channel
- branchOrigin metadata on SessionRecord
- session branching helper that truncates the transcript at a
  chosen user message and clears runtime state
- AryxAppService branching flow with scratchpad directory support
- persistence normalization and regression coverage

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-29 18:24:05 +02:00
David KayaandCopilot 251316596c feat: add integrated terminal backend
- add a PTY manager with platform shell resolution and streamed data/exit events
- expose terminal lifecycle and terminal height IPC through preload and app service
- persist terminal panel height in workspace settings and document the backend contract
- add backend tests and validate native packaging with bun run package

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 23:15:16 +01:00
David KayaandCopilot 9ddd831b34 fix: preserve probed MCP tools across session switches
mergeDiscoveredToolingState now carries over probedTools from existing
servers when the config fingerprint is unchanged. The equality check in
syncProjectDiscoveredTooling also strips probedTools before comparing,
so runtime-only probe data never triggers a spurious state replacement.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 20:09:45 +01:00
David KayaandCopilot f0114058ba fix: show MCP tools in all provider groups when shared
When multiple MCP servers expose the same tool names (e.g., several
kusto-mcp instances), each server's group now shows its tools instead
of only the first server getting the tools and others showing 0/0.

Deduplicate the effectiveAutoApprovedCount to avoid double-counting
shared tools in the pill header.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 19:35:56 +01:00
David KayaandCopilot 8312a47bf1 feat: discover MCP tools via protocol probing for approval pill
When MCP server configs declare wildcard tools (empty tools array),
the Copilot SDK has no API to list individual tool names. Add direct
MCP protocol probing using @modelcontextprotocol/sdk to discover
available tools from each accepted server.

- Add McpToolProber service supporting stdio/SSE/HTTP transports
- Probe accepted MCP servers on project load, acceptance, and rescan
- Store probed tools on DiscoveredMcpServer and McpServerDefinition
- Use probed tools in listApprovalToolDefinitions when declared tools
  are empty, so the approval pill shows individual tool toggles
- Remove unused isMcpServerApprovalKey helper
- Fix effectiveAutoApprovedCount Math.max workaround in ChatPane
- Add comprehensive tests for probed tool behavior
- Update ARCHITECTURE.md tooling integration section

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 19:23:57 +01:00
David KayaandCopilot 3937904548 feat: add server-level MCP auto-approval for wildcard tool servers
MCP servers configured with empty tools arrays (wildcard) now appear in the
auto-approval pill with a server-level toggle. When toggled, a server-level
approval key (mcp_server:<name>) is added to autoApprovedToolNames. The
sidecar matches this key against PermissionRequestMcp.ServerName to auto-
approve all tools from that server without needing individual tool names.

- Add buildMcpServerApprovalKey/isMcpServerApprovalKey helpers
- Create approval groups for all MCP servers including empty-tools ones
- Add serverApprovalKey to ApprovalToolGroup for server-level toggles
- Update sidecar RequiresToolCallApproval to check server-level keys
- Include server-level keys in listApprovalToolNames for pruning safety
- Add tests for both shared domain and sidecar approval matching

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 18:34:19 +01:00
David KayaandCopilot 53a08e0ed4 feat: redesign auto-approval pill with server-level grouping and batch toggle
Group MCP tools by server and LSP tools by profile in the approval popover
instead of showing a flat list. Each server/profile group gets a collapsible
header with a batch toggle to approve/unapprove all tools at once. Add a
search filter (visible when >10 tools) and partial-state indicators for
groups with mixed approval. Add groupApprovalToolsByProvider shared helper
with tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-28 18:18:17 +01:00
David KayaandCopilot bb7e5d4108 fix: preserve editable pattern graphs
Add mode-aware graph mutation helpers for pattern topology so backend
code can add and remove agents without forcing a full graph rebuild.
Also preserve an existing pattern graph in savePattern instead of
re-syncing it from defaults, and cover the new behavior with shared
and main-process tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:50:01 +01:00
David KayaandCopilot 689b335220 feat: category-based approval for runtime tools
Replace 20+ individual runtime tool toggles with 5 permission categories
(read, write, shell, web_fetch, store_memory) matching how Copilot CLI,
Cline, and other coding agents handle approvals.

- Add resolveApprovalToolKey() to map permission kinds to category IDs
- Simplify fallbackRuntimeApprovalTools to 5 categories
- Thread alwaysApprove through PendingApprovalHandle → sidecar resolve
- Update ApprovalBanner to use category labels for Always Approve button
- Update ResolveApprovalCommand contract with alwaysApprove field
- Update tests for category-based model

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-27 21:36:27 +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 912677fba0 feat: add tool metadata registry with human-readable labels
Add a builtin tool label registry mapping all ~30 official SDK tool IDs
to human-readable display names. Update listApprovalToolDefinitions to
resolve labels from the registry instead of showing raw tool IDs like
read_bash or fetch_copilot_cli_documentation. Expand the fallback
runtime tool catalog from 6 to 23 non-internal standard tools.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-26 19:27:36 +01:00
David KayaandCopilot 968ae37279 feat: allow model selection in all single-agent sessions
Generalize the scratchpad-only model/reasoning-effort selector to work
in any session whose pattern has exactly one agent. This enables model
switching above the chat input for project 1-on-1 chats, not just
scratchpads.

- Rename ScratchpadSessionConfig -> SessionModelConfig across domain,
  contracts, IPC, preload, and renderer
- Replace isScratchpadProject guard with agents.length === 1 check in
  EryxAppService.updateSessionModelConfig and ChatPane pills gate
- Apply session model config in buildEffectivePattern whenever present,
  regardless of project type
- Seed sessionModelConfig on session creation for any single-agent
  pattern

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 22:41:46 +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 29c054f47d fix: require tool approval by default
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:23:01 +01:00
David KayaandCopilot ab4e217d74 refactor: rename app to aryx
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 21:11:36 +01:00
David KayaandCopilot d07bf30e81 feat: add markdown composer backend foundation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-25 19:19:58 +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 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 c6e20da8db fix: queue session approvals
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:56:21 +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 973e5eb25c feat: implement light mode with settings toggle
Add appearance theme support (dark/light/system) using CSS custom
property overrides. In light mode the Tailwind zinc scale is inverted
and semantic surface/border tokens are swapped, so all existing
utility classes pick up the new palette automatically.

- Add AppearanceTheme type and theme field to WorkspaceSettings
- Add setTheme IPC channel wiring (contracts, preload, handler, service)
- Add [data-theme='light'] CSS overrides for zinc scale, surface tokens,
  scrollbar, and markdown prose colours
- Add Appearance section to SettingsPanel with radio-button theme picker
- Apply data-theme attribute on document root via useEffect in App.tsx,
  with matchMedia listener for the system option

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 19:28:48 +01:00
David KayaandCopilot b742941559 feat: add rich run timeline backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-24 00:04:47 +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 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 ab4e9bcea9 feat: add git-aware project context
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-23 20:11:46 +01:00
David KayaandCopilot 4a229a1f88 feat: add session library backend APIs
Add persisted session and pattern metadata for pinning, archiving, manual titles, and favorite patterns. Expose backend query and mutation APIs for session library features, and cover the shared helpers with tests.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 19:33:20 +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 fd0256d62f feat: add scratchpad chat model controls
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-22 10:20:17 +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 f940b9d153 fix: enforce handoff delegation roles
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 21:13:16 +01:00
Copilot CLIandCopilot c8d23f91d1 feat: add packaging and validation coverage
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 09:30:37 +01:00
Copilot CLIandCopilot 9e509593d6 feat: scaffold electron orchestrator foundation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-21 09:27:28 +01:00