@elyx-code/project-logic-tree 0.0.7222 → 0.0.7223

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -73,12 +73,16 @@ export interface ICommandSubcommandOption {
73
73
  description: string;
74
74
  category: string;
75
75
  }
76
+ export declare enum CommandExecutionType {
77
+ ClientProcess = "client-process",
78
+ AgentProcess = "agent-process"
79
+ }
76
80
  export interface ICommandDefinition {
77
81
  command: string;
78
82
  label: string;
79
83
  description?: string;
80
84
  category: string;
81
- executionType?: 'fe-action' | 'backend-process' | 'ai-prompt';
85
+ executionType: CommandExecutionType | 'client-process' | 'agent-process';
82
86
  hasRichEditor?: boolean;
83
87
  subcommands?: ICommandSubcommandOption[];
84
88
  args?: ICommandArgDef[];
@@ -92,9 +96,20 @@ export interface ICommandExecutionContext {
92
96
  args: Record<string, any>;
93
97
  rawInput: string;
94
98
  }
99
+ export interface IBeforeSubmitResult {
100
+ canProceed: boolean;
101
+ notification?: {
102
+ text: string;
103
+ color?: 'success' | 'error' | 'warning' | 'info';
104
+ };
105
+ widgetType?: string;
106
+ widgetPayload?: any;
107
+ message?: string;
108
+ }
95
109
  export interface ICommandExecutionResult {
96
110
  success: boolean;
97
111
  message?: string;
112
+ metadata?: Record<string, any>;
98
113
  widgetType?: string;
99
114
  widgetPayload?: any;
100
115
  createdEntityId?: string;
@@ -102,6 +117,7 @@ export interface ICommandExecutionResult {
102
117
  }
103
118
  export type CommandStage = 'normal' | 'command' | 'subcommand' | 'option' | 'args';
104
119
  export interface ICommandExtensionModule extends IExtensionModuleCore {
120
+ beforeSubmit?: (ctx: ICommandExecutionContext) => Promise<IBeforeSubmitResult>;
105
121
  execute: (ctx: ICommandExecutionContext) => Promise<ICommandExecutionResult>;
106
122
  getOptions?: (stage: CommandStage, query: string, ctx: any) => Promise<any[]>;
107
123
  }