The release workflow tests hardcoded Windows-style backslash paths
(C:\workspace\...) which caused path.relative() to produce incorrect
results on Linux and macOS, where backslashes are not path separators.
Replace hardcoded paths with resolve()/join() calls that produce
platform-native paths, fixing CI failures on Linux and macOS.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add a global Telemetry section in the settings panel with:
- Toggle to enable/disable OTLP export
- Text input for the OTLP endpoint URL (default: http://localhost:4317)
- Guidance note about using \un run aspire\ for local testing
Wire the setting through the full stack:
- OpenTelemetrySettings type in shared domain with normalization
- IPC channel, preload binding, and handler for persistence
- SidecarClient forwards settings to createSidecarEnvironment
- Sidecar environment injects OTEL_EXPORTER_OTLP_ENDPOINT when enabled
- Settings loaded from workspace.json on startup and on change
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add OTLP export wiring for the sidecar and dev scripts to launch the standalone Aspire Dashboard during development.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The StreamingTextMerger (C#) and mergeStreamingText (TypeScript) contained
custom word-boundary heuristics that inserted spaces between streaming deltas
based on incorrect assumptions. Two bugs caused mid-word spaces:
1. Unconditional space insertion when incoming delta started with uppercase or
digit characters, breaking acronyms (MDA -> M DA, UAG -> UA G)
2. LooksLikeWordBoundary using global token counts that fired on nearly every
mid-word token split (writable -> wr itable, fragile -> frag ile)
Both upstream projects (Copilot SDK and Agent Framework) use simple string
concatenation for delta accumulation. LLM streaming tokens natively include
whitespace when needed, so no boundary detection is required.
Removed all boundary heuristic methods and replaced with plain concatenation.
Kept overlap detection and snapshot handling for event redelivery scenarios.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Fix useElapsedTimer to use completedAt instead of Date.now() for
finished runs, preventing wildly inaccurate durations (e.g. 9802m)
when reopening old sessions
- Extract formatElapsedMs as a shared pure formatter; reuse in
SubagentActivityCard
- Standardize icon column alignment across all activity row types
using consistent w-4 + h-[18px] icon containers
- Redesign collapsed header: status dot with pulse animation, bolder
status label, tabular-nums on elapsed time, cleaner hierarchy
- Polish expanded stream: timeline spine connecting activity items,
more prominent intent dividers with pill-style background,
tightened vertical rhythm
- Add unit tests for formatElapsedMs
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add multi-select mode to the sidebar session list, enabling users to
archive, restore, or delete multiple sessions at once.
UX:
- Ctrl+Click (Cmd+Click on Mac) any session to enter multi-select mode
- Animated checkboxes stagger-reveal across all visible sessions
- Click to toggle, Shift+Click for range selection
- Running sessions are excluded from selection (safety guard)
- Floating action bar slides up with count pill, Archive, Delete, Cancel
- Batch delete shows a confirmation dialog with hold-to-confirm for 3+
sessions and a scrollable list of session titles
- Batch archive shows an undo toast with 5-second auto-dismiss
- Escape key or Cancel button exits multi-select mode
Backend:
- batchSetSessionsArchived IPC: single load/mutate/persist cycle for N
sessions instead of N sequential calls
- batchDeleteSessions IPC: parallel cleanup of scratchpad dirs and SDK
sessions, then single workspace persist
Accessibility:
- Action bar: role=toolbar, aria-label
- Checkboxes: role=checkbox, aria-checked, keyboard-activatable
- Selection count: aria-live=polite
- Delete dialog: role=alertdialog, aria-modal, focus trap
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Main process now always emits resolved content in message-delta events,
making it the single authoritative text assembly point
- Renderer no longer imports or runs mergeStreamingText; uses main-process
resolved content directly with simple append as defensive fallback
- Forward assistant-intent events through the session event pipeline; track
currentIntent on SessionRecord, cleared on turn completion/cancellation
- Forward reasoning-delta events through the session event pipeline so
renderers can consume incremental reasoning text
- Add SessionEventKind entries: assistant-intent, reasoning-delta
- Add SessionEventRecord fields: intent, reasoningId, reasoningDelta
- Remove dead applyTurnDelta, applyMessageReclassified, applyAgentActivity
methods from AryxAppService (superseded by SessionTurnExecutor)
- Remove stale mergeStreamingText and appendRunActivityEvent imports from
AryxAppService
- Add 5 regression tests: resolved content path, simple append fallback,
intent set/clear lifecycle, duplicate suppression, intent preservation
during status transitions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Deep agent resolution in the sidecar now walks sub-workflow nodes so
nested agents carry subworkflowNodeId and subworkflowName on activity
events. New subworkflow-started / subworkflow-completed activity types
let the frontend track sub-workflow lifecycle.
The Activity panel groups nested agents under collapsible sub-workflow
cards with status badges, accent-colored left borders, and smooth
expand/collapse transitions. Cards auto-expand when a sub-workflow
starts running. Workflows without sub-workflow nodes render identically
to before.
Extracted AgentRow, SubWorkflowGroup, and shared accent constants to
a new components/activity/ feature directory. Added
resolveWorkflowAgentHierarchy and buildGroupedActivityRows for
hierarchical activity grouping with dynamic fallback for unresolved
sub-workflow agents.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add toolArguments to normalizeRunTimelineEvent output so persisted
sessions retain tool argument data across app restarts
- Add toolArguments field to AgentActivityState and propagate it in
applySessionEventActivity for real-time activity labels
- Add tests for normalization round-trip with and without toolArguments
- Add test for activity state including toolArguments
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When toolArguments doesn't contain the expected key (e.g. 'path' for
view), fall back to the first usable string value from any argument
key instead of showing misleading placeholders like 'Viewed a file'.
When no arguments exist at all, show just the tool name.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the flat, repetitive 'Agent used X' activity list with a
structured narrative timeline:
- Group consecutive same-tool calls into collapsible rows with context
(e.g. 'Viewed 4 files' with file names listed below)
- Use verb-based labels with arguments: 'Viewed ChatPane.tsx:148-250',
'Searched for tool-call', 'Edited runTimeline.ts'
- Promote report_intent events to phase dividers that segment the
timeline into labeled stages of work
- Show latest intent text in the collapsed header summary
- Use category-specific icons (Eye, Search, Pencil, Terminal, etc.)
instead of the universal wrench
- Render thinking steps as quoted blocks with 'N more' toggle for
consecutive groups
All data was already available in RunTimelineEventRecord.toolArguments;
this change surfaces it prominently instead of hiding it behind
expandable detail panels.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Extract seven responsibility clusters from the 3,466-line AryxAppService
monolith into focused service classes under src/main/services/:
- WorkflowManager: workflow CRUD, templates, validation, resolution
- McpProbeManager: MCP server probing, OAuth pre-auth, probe queuing
- DiscoveredToolingSyncService: tooling/customization scanning, watchers
- GitContextManager: git refresh orchestration, context updates, mutations
- CheckpointRecoveryManager: checkpoint retry/recovery state handling
- ApprovalCoordinator: approval/user-input/plan-review/OAuth state machine
- SessionTurnExecutor: turn execution, streaming deltas, finalization
AryxAppService remains the public facade consumed by IPC handlers but now
delegates internally via constructor-injected service instances. A new
AppServiceDeps type provides a clean dependency injection seam for testing.
The facade is reduced from 3,466 to 2,572 lines. All existing tests pass
with two test files migrated to constructor DI (appServiceGitRefresh,
appServiceMcpProbing). New focused tests added for WorkflowManager and
the DI seam itself.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Thread toolArguments from the sidecar through shared contracts, main-process pipeline, and into the renderer. Add ToolCallDetailPanel with inline summaries (command, path, pattern, etc.) and expandable argument details for every tool-call event in the activity timeline.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
In sequential workflows, multiple collapsible turn-activity panels shared
the same SessionRunRecord and displayed identical aggregate metrics (tool
calls, approvals, etc.) instead of per-agent counts.
Root cause: ChatPane grouped thinking messages correctly per agent, but
passed the full unfiltered run object to every TurnActivityPanel, so
summarizeActivity() counted all events from the entire run for each panel.
Changes:
- Extract filterEventsByAgent() and summarizeActivity() to
runTimelineFormatting.ts as pure, testable helpers
- Add agentNames (derived from thinking message authors) and isLastRunPanel
to the DisplayItem turn-activity variant in ChatPane
- TurnActivityPanel now filters run.events through filterEventsByAgent()
so each panel only counts events belonging to its agents
- Git summary / discard actions only render on the last panel of a run
- Per-agent timing derived from scoped events instead of run-level start
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
For builder-based orchestration modes (group-chat, handoff), the loop edge
maxIterations, workflow settings.maxIterations, and mode-specific settings
(e.g. groupChat.maxRounds) were independently editable but only the mode
settings controlled runtime behavior. This caused confusion when changing
one did not update the others.
Changes:
- Add syncBuilderModeEdgeIterations() to keep loop edge maxIterations in
sync with the authoritative mode settings for builder-based modes
- Wire sync into normalizeWorkflowDefinition so edges are consistent on
load/normalization
- Update scaffoldGraphForMode to accept optional settings instead of
hardcoded iteration values (4 for handoff, 5 for group-chat)
- Sync settings.maxIterations <-> groupChat.maxRounds bidirectionally
when either changes in the UI
- Make loop edge controls read-only in the graph inspector for
builder-based modes with explanatory text
- Add 8 consistency tests validating built-in workflows, scaffold
behavior, and normalization sync
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Show agent activity label in chat header (Thinking…, Using bash…, etc.)
instead of an anonymous pulsing dot
- Fix ThinkingProcess elapsed timer to tick live every second using
useElapsedTimer hook instead of stale useMemo computation
- Show completed/failed subagents for 3s grace period with fade-out
transition instead of instantly hiding them
- Transition activity labels to Completed state for 1.5s grace period
on session idle instead of abrupt removal
- Eliminate message flash during thinking reclassification by folding
trailing pending assistant messages into the thinking group
optimistically when they follow existing thinking messages
- Stabilize ThinkingProcess isActive flag by checking for pending
messages in the group rather than relying solely on array position
- Skip rendering empty pending messages inside ThinkingProcess steps
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The forward edges from triage to specialists participate in cycles
(triage→specialist + specialist→triage), so they must be marked with
isLoop, condition, and maxIterations to pass validation.
Fixes the Handoff Support Flow template and scaffoldGraphForMode()
for handoff mode. Updates the corresponding test expectation.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add first-class backend support for workflow orchestration modes,
including mode settings, graph scaffolding, mode-aware validation,
and real Agent Framework handoff/group-chat execution paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Delete src/shared/domain/pattern.ts and all pattern-specific renderer
components (PatternEditor, NewSessionModal, pattern-graph directory,
patternGraph lib) and their tests
- Migrate all renderer imports from @shared/domain/pattern to
@shared/domain/workflow (ReasoningEffort, reasoningEffortOptions,
WorkflowOrchestrationMode, AgentNodeConfig, WorkflowDefinition)
- Update App.tsx: remove workflowToPattern bridge, createDraftPattern,
NewSessionModal; sessions now created directly with default workflow
- Update ChatPane, ActivityPanel, Sidebar to accept WorkflowDefinition
instead of PatternDefinition and derive agents/mode from workflow
- Update SettingsPanel: remove PatternsSection nav item, pattern editing
state, and pattern-related props; update text references
- Update RunTimeline and modeAccent/modeVisuals records to use
WorkflowOrchestrationMode (drop magentic mode entry)
- Update sessionActivity.ts to use generic agent interface
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the invented code-executor node type entirely. Rename
function-executor to invoke-function to match Agent Framework's
InvokeFunctionTool declarative action. Update InvokeFunctionConfig to
use functionName, arguments, requireApproval, and resultVariable
properties matching the upstream schema.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- add shared workflow template and serialization helpers for YAML, Mermaid, and DOT export
- add pattern-to-workflow upgrade and template application flows in AryxAppService
- persist built-in and custom workflow templates in workspace state and expose new IPC/preload methods
- cover the new backend slice with shared and app-service tests
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add MVP code-executor and function-executor runtime support, request-port
bridging through Aryx user input, state-scope helpers, lockstep execution
mode handling, and validation/tests for new workflow node kinds.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the restriction that prevented users from deleting built-in
patterns (those with IDs prefixed 'pattern-'). Built-in patterns are
intended as starting points, not permanent fixtures.
Changes:
- Add deletedBuiltinPatternIds field to WorkspaceState to track which
built-in patterns the user has removed
- Update mergePatterns to skip deleted built-ins during workspace load,
preventing them from being re-added
- Remove the isBuiltinPattern guard from AryxAppService.deletePattern;
when a built-in is deleted, its ID is recorded in the tracking list
- Enable the delete button in SettingsPanel and PatternEditor for all
patterns (keep the 'Built-in pattern' label for context)
- Add 3 tests covering built-in deletion, custom deletion, and
selectedPatternId fallback
Users can still restore deleted built-ins via workspace reset.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Introduce a workspace-level agent library that allows users to define
agents once and reference them from multiple orchestration patterns.
Domain model:
- Add WorkspaceAgentDefinition type with name, model, instructions, etc.
- Extend PatternAgentDefinition with optional workspaceAgentId and overrides
- Add resolution helpers that merge workspace agent base with per-pattern overrides
- Extend WorkspaceSettings with agents array and normalize on load
IPC & main process:
- Add saveWorkspaceAgent/deleteWorkspaceAgent IPC channels and handlers
- Resolve workspace agent references in buildEffectivePattern before
sending to sidecar (no C# changes needed)
Settings UI:
- Add 'Agents' tab under Orchestration in the Settings panel
- Create WorkspaceAgentEditor component using ToolingEditorShell
- Show usage count (which patterns reference each agent)
Pattern editor integration:
- Add agent picker dropdown: 'New inline agent' or 'From library'
- Show linked badge (chain icon) on referenced agent graph nodes
- Show linked workspace agent banner in the inspector
- Add 'Save to Agent Library' action to promote inline agents
- Add 'Unlink' action to convert referenced agents back to inline
Tests:
- Add unit tests for resolution helpers (resolvePatternAgent,
resolvePatternAgents, findWorkspaceAgentUsages, normalize)
- Update existing tooling test for new agents field
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- parse prompt model and argument-hint metadata and persist model on prompt invocations
- expand markdown-linked file context in scanned prompt and instruction bodies
- discover .claude/rules instructions and support Claude-style paths metadata
- discover customization roots up to the nearest parent repository and watch them for changes
- apply per-turn prompt model overrides before sidecar execution
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Surface workflow-diagnostic session events (warnings and errors from
Agent Framework workflows) in the turn-event log of the Activity Panel.
- Add workflow-diagnostic case to formatTurnEventEntry with label/detail
formatting that includes executor ID, subworkflow ID, exception type,
and diagnostic message when present
- Add AlertTriangle icon for diagnostic events with error/warning color
- Add 5 tests covering executor-failed, workflow-warning, subworkflow-error,
workflow-error, and missing diagnosticKind fallback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the single aggregate thinking tile with per-turn thinking groups.
Instead of collecting all thinking messages into one flat array and
rendering a single ThinkingProcess before the last assistant message,
process session.messages in chronological order to produce interleaved
display items that naturally group consecutive thinking messages by turn.
Each turn now shows its own collapsible thinking tile placed inline
before its assistant response, with correct per-turn isActive state
and turnStartedAt from the matching run.
Also fixes a latent index-mismatch bug in getAssistantMessagePhase where
the visible-messages index was compared against the full session.messages
index, potentially hiding the Final badge when thinking messages existed.
Switched to ID-based comparison.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Remove the isPackaged guard from AutoUpdateService.start() so that
background update checks run in both packaged and dev builds.
forceDevUpdateConfig already handles dev-mode config correctly via
dev-app-update.yml — the start() gate was preventing the 10s initial
check and 4h periodic checks from ever being scheduled in dev.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Wire message-reclassified sidecar events through the main process to
the renderer, where reclassified messages are filtered out of the main
transcript and collected into a collapsible ThinkingProcess component.
Main process changes:
- Route message-reclassified via dedicated onMessageReclassified callback
- Add applyMessageReclassified handler that sets messageKind and emits
the session event for the renderer
- Forward assistant-intent and reasoning-delta as turn-scoped events
Renderer changes:
- Split session.messages into visibleMessages and thinkingMessages
- Render ThinkingProcess above the last assistant message
- ThinkingProcess auto-expands during active turns, collapses on finish
- Update messagePhase to skip thinking-kind messages for final detection
Tests:
- 3 new sessionWorkspace tests for reclassification apply/dedup/ignore
- 2 new messagePhase tests for thinking-kind handling
- Updated runTurnPending test fixtures for new callback
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add dev-app-update.yml so electron-updater can check GitHub releases
even when running with bun run dev. Remove the isPackaged guard from
checkForUpdates() so manual clicks always contact the update server.
Automatic periodic checks remain disabled in dev mode.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When electron-updater reports no update available, the service now
transitions to 'up-to-date' instead of reverting silently to 'idle'.
The troubleshooting UI shows a green check icon, 'Up to date' label,
and 'You are running the latest version of Aryx.' description.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>