@ever-works/gemini-plugin 1.0.0 → 1.0.6

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.
@@ -0,0 +1,77 @@
1
+ import { IPlugin, IPipelinePlugin, IFormSchemaProvider, ICodeEditPlugin, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, AiModel, ConnectionValidationResult, ValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState, CodeEditRequest, CodeEditOptions, CodeEditResult } from '@ever-works/plugin';
2
+
3
+ /**
4
+ * Step IDs for the Gemini pipeline.
5
+ * All steps run sequentially (non-parallelizable).
6
+ */
7
+ type GeminiStepId = 'setup-gemini' | 'prepare-context' | 'generate-items' | 'collect-results' | 'capture-screenshots' | 'cleanup';
8
+ /**
9
+ * All step IDs as an array for iteration
10
+ */
11
+ declare const GEMINI_STEP_IDS: readonly GeminiStepId[];
12
+ /**
13
+ * Type guard for GeminiStepId
14
+ */
15
+ declare function isGeminiStepId(value: string): value is GeminiStepId;
16
+
17
+ /**
18
+ * Gemini Generator Plugin
19
+ *
20
+ * Full pipeline plugin that delegates the entire generation to Gemini CLI.
21
+ * Runs a single Gemini CLI session that handles web search,
22
+ * content creation, and file generation autonomously.
23
+ */
24
+ declare class GeminiPlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider, ICodeEditPlugin {
25
+ readonly id = "gemini";
26
+ readonly name = "Gemini Generator";
27
+ readonly providerName = "Gemini CLI";
28
+ readonly version = "1.0.0";
29
+ readonly category: PluginCategory;
30
+ readonly capabilities: readonly ["pipeline", "form-schema-provider", "code-edit"];
31
+ readonly configurationMode: "user-required";
32
+ readonly handledConfigFields: readonly ["*"];
33
+ readonly settingsSchema: JsonSchema;
34
+ private context;
35
+ private state;
36
+ private abortController;
37
+ private killProcess;
38
+ onLoad(context: PluginContext): Promise<void>;
39
+ onUnload(): Promise<void>;
40
+ healthCheck(): Promise<PluginHealthCheck>;
41
+ listModels(): Promise<readonly AiModel[]>;
42
+ private getRealSecret;
43
+ isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
44
+ validateConnection(settings: Record<string, unknown>): Promise<ConnectionValidationResult>;
45
+ validateSettings(settings: Record<string, unknown>): ValidationResult;
46
+ getManifest(): PluginManifest;
47
+ private validateApiKey;
48
+ getFormFields(): FormFieldDefinition[];
49
+ getFormGroups(): FormFieldGroup[];
50
+ validateFormInput(values: Record<string, unknown>): ValidationResult;
51
+ getDefaultValues(): Record<string, unknown>;
52
+ getStepDefinitions(): readonly PipelineStepDefinition[];
53
+ execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
54
+ cancel(): Promise<void>;
55
+ getState(): PipelineState<GeminiStepId> | null;
56
+ private runScreenshotCapture;
57
+ private createGeminiStreamHandlers;
58
+ private buildGeminiLogFromStdout;
59
+ private extractContentText;
60
+ private extractString;
61
+ private truncateLogMessage;
62
+ private startStep;
63
+ private completeStep;
64
+ private failStep;
65
+ private skipStep;
66
+ private emitGeminiLog;
67
+ private getStepName;
68
+ private getRunningStepId;
69
+ private extractErrorDetail;
70
+ private setState;
71
+ private handleError;
72
+ private handleCancel;
73
+ executeCodeEdit(request: CodeEditRequest, options?: CodeEditOptions): Promise<CodeEditResult>;
74
+ cancelCodeEdit(): Promise<void>;
75
+ }
76
+
77
+ export { GEMINI_STEP_IDS, GeminiPlugin, type GeminiStepId, GeminiPlugin as default, isGeminiStepId };
@@ -0,0 +1,77 @@
1
+ import { IPlugin, IPipelinePlugin, IFormSchemaProvider, ICodeEditPlugin, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, AiModel, ConnectionValidationResult, ValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState, CodeEditRequest, CodeEditOptions, CodeEditResult } from '@ever-works/plugin';
2
+
3
+ /**
4
+ * Step IDs for the Gemini pipeline.
5
+ * All steps run sequentially (non-parallelizable).
6
+ */
7
+ type GeminiStepId = 'setup-gemini' | 'prepare-context' | 'generate-items' | 'collect-results' | 'capture-screenshots' | 'cleanup';
8
+ /**
9
+ * All step IDs as an array for iteration
10
+ */
11
+ declare const GEMINI_STEP_IDS: readonly GeminiStepId[];
12
+ /**
13
+ * Type guard for GeminiStepId
14
+ */
15
+ declare function isGeminiStepId(value: string): value is GeminiStepId;
16
+
17
+ /**
18
+ * Gemini Generator Plugin
19
+ *
20
+ * Full pipeline plugin that delegates the entire generation to Gemini CLI.
21
+ * Runs a single Gemini CLI session that handles web search,
22
+ * content creation, and file generation autonomously.
23
+ */
24
+ declare class GeminiPlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider, ICodeEditPlugin {
25
+ readonly id = "gemini";
26
+ readonly name = "Gemini Generator";
27
+ readonly providerName = "Gemini CLI";
28
+ readonly version = "1.0.0";
29
+ readonly category: PluginCategory;
30
+ readonly capabilities: readonly ["pipeline", "form-schema-provider", "code-edit"];
31
+ readonly configurationMode: "user-required";
32
+ readonly handledConfigFields: readonly ["*"];
33
+ readonly settingsSchema: JsonSchema;
34
+ private context;
35
+ private state;
36
+ private abortController;
37
+ private killProcess;
38
+ onLoad(context: PluginContext): Promise<void>;
39
+ onUnload(): Promise<void>;
40
+ healthCheck(): Promise<PluginHealthCheck>;
41
+ listModels(): Promise<readonly AiModel[]>;
42
+ private getRealSecret;
43
+ isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
44
+ validateConnection(settings: Record<string, unknown>): Promise<ConnectionValidationResult>;
45
+ validateSettings(settings: Record<string, unknown>): ValidationResult;
46
+ getManifest(): PluginManifest;
47
+ private validateApiKey;
48
+ getFormFields(): FormFieldDefinition[];
49
+ getFormGroups(): FormFieldGroup[];
50
+ validateFormInput(values: Record<string, unknown>): ValidationResult;
51
+ getDefaultValues(): Record<string, unknown>;
52
+ getStepDefinitions(): readonly PipelineStepDefinition[];
53
+ execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
54
+ cancel(): Promise<void>;
55
+ getState(): PipelineState<GeminiStepId> | null;
56
+ private runScreenshotCapture;
57
+ private createGeminiStreamHandlers;
58
+ private buildGeminiLogFromStdout;
59
+ private extractContentText;
60
+ private extractString;
61
+ private truncateLogMessage;
62
+ private startStep;
63
+ private completeStep;
64
+ private failStep;
65
+ private skipStep;
66
+ private emitGeminiLog;
67
+ private getStepName;
68
+ private getRunningStepId;
69
+ private extractErrorDetail;
70
+ private setState;
71
+ private handleError;
72
+ private handleCancel;
73
+ executeCodeEdit(request: CodeEditRequest, options?: CodeEditOptions): Promise<CodeEditResult>;
74
+ cancelCodeEdit(): Promise<void>;
75
+ }
76
+
77
+ export { GEMINI_STEP_IDS, GeminiPlugin, type GeminiStepId, GeminiPlugin as default, isGeminiStepId };