mirror of
https://github.com/davidkaya/aryx.git
synced 2026-08-28 13:47:12 +02:00
feat: add approval checkpoints backend
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -20,6 +20,7 @@ export const ipcChannels = {
|
||||
setSessionPinned: 'sessions:set-pinned',
|
||||
setSessionArchived: 'sessions:set-archived',
|
||||
sendSessionMessage: 'sessions:send-message',
|
||||
resolveSessionApproval: 'sessions:resolve-approval',
|
||||
querySessions: 'sessions:query',
|
||||
updateScratchpadSessionConfig: 'sessions:update-scratchpad-config',
|
||||
selectProject: 'selection:project',
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { ApprovalDecision } from '@shared/domain/approval';
|
||||
import type { SidecarCapabilities } from '@shared/contracts/sidecar';
|
||||
import type { PatternDefinition, ReasoningEffort } from '@shared/domain/pattern';
|
||||
import type { ProjectRecord } from '@shared/domain/project';
|
||||
@@ -25,6 +26,12 @@ export interface SendSessionMessageInput {
|
||||
content: string;
|
||||
}
|
||||
|
||||
export interface ResolveSessionApprovalInput {
|
||||
sessionId: string;
|
||||
approvalId: string;
|
||||
decision: ApprovalDecision;
|
||||
}
|
||||
|
||||
export interface UpdateScratchpadSessionConfigInput {
|
||||
sessionId: string;
|
||||
model: string;
|
||||
@@ -87,6 +94,7 @@ export interface ElectronApi {
|
||||
setSessionPinned(input: SetSessionPinnedInput): Promise<WorkspaceState>;
|
||||
setSessionArchived(input: SetSessionArchivedInput): Promise<WorkspaceState>;
|
||||
sendSessionMessage(input: SendSessionMessageInput): Promise<void>;
|
||||
resolveSessionApproval(input: ResolveSessionApprovalInput): Promise<WorkspaceState>;
|
||||
updateScratchpadSessionConfig(input: UpdateScratchpadSessionConfigInput): Promise<WorkspaceState>;
|
||||
querySessions(input: QuerySessionsInput): Promise<SessionQueryResult[]>;
|
||||
selectProject(projectId?: string): Promise<WorkspaceState>;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import type { PatternDefinition, PatternValidationIssue, ReasoningEffort } from '@shared/domain/pattern';
|
||||
import type { ApprovalCheckpointKind, ApprovalDecision } from '@shared/domain/approval';
|
||||
import type { ChatMessageRecord } from '@shared/domain/session';
|
||||
|
||||
export interface SidecarModeCapability {
|
||||
@@ -76,7 +77,18 @@ export interface RunTurnCommand {
|
||||
tooling?: RunTurnToolingConfig;
|
||||
}
|
||||
|
||||
export type SidecarCommand = DescribeCapabilitiesCommand | ValidatePatternCommand | RunTurnCommand;
|
||||
export interface ResolveApprovalCommand {
|
||||
type: 'resolve-approval';
|
||||
requestId: string;
|
||||
approvalId: string;
|
||||
decision: ApprovalDecision;
|
||||
}
|
||||
|
||||
export type SidecarCommand =
|
||||
| DescribeCapabilitiesCommand
|
||||
| ValidatePatternCommand
|
||||
| RunTurnCommand
|
||||
| ResolveApprovalCommand;
|
||||
|
||||
export interface RunTurnLocalMcpServerConfig {
|
||||
id: string;
|
||||
@@ -157,6 +169,20 @@ export interface AgentActivityEvent {
|
||||
toolName?: string;
|
||||
}
|
||||
|
||||
export interface ApprovalRequestedEvent {
|
||||
type: 'approval-requested';
|
||||
requestId: string;
|
||||
sessionId: string;
|
||||
approvalId: string;
|
||||
approvalKind: ApprovalCheckpointKind;
|
||||
agentId?: string;
|
||||
agentName?: string;
|
||||
toolName?: string;
|
||||
permissionKind?: string;
|
||||
title: string;
|
||||
detail?: string;
|
||||
}
|
||||
|
||||
export interface CommandErrorEvent {
|
||||
type: 'command-error';
|
||||
requestId: string;
|
||||
@@ -174,5 +200,6 @@ export type SidecarEvent =
|
||||
| TurnDeltaEvent
|
||||
| TurnCompleteEvent
|
||||
| AgentActivityEvent
|
||||
| ApprovalRequestedEvent
|
||||
| CommandErrorEvent
|
||||
| CommandCompleteEvent;
|
||||
|
||||
Reference in New Issue
Block a user