@ever-works/sim-ai-plugin 1.0.0 → 1.0.5

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,115 @@
1
+ import { IPlugin, IPipelinePlugin, IFormSchemaProvider, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, ValidationResult, ConnectionValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState } from '@ever-works/plugin';
2
+
3
+ /** Step IDs for the SIM AI pipeline. */
4
+ type SimAiStepId = 'validate-sim' | 'prepare-payload' | 'execute-workflow' | 'collect-results' | 'capture-screenshots' | 'cleanup';
5
+ /** Data source types for passing data to SIM */
6
+ type DataSourceType = 'inline' | 'github-repo';
7
+ /** Input payload sent to SIM workflow */
8
+ interface SimWorkflowInput {
9
+ metadata: {
10
+ workId: string;
11
+ workName: string;
12
+ workSlug: string;
13
+ workDescription?: string;
14
+ prompt?: string;
15
+ generationMethod?: string;
16
+ targetItems: number;
17
+ };
18
+ existingSummary?: {
19
+ totalItems: number;
20
+ categories: string[];
21
+ tags: string[];
22
+ sampleItems: Array<{
23
+ name: string;
24
+ url?: string;
25
+ }>;
26
+ };
27
+ dataSource?: {
28
+ type: DataSourceType;
29
+ repoUrl?: string;
30
+ accessToken?: string;
31
+ branch?: string;
32
+ path?: string;
33
+ };
34
+ workflowParams?: Record<string, unknown>;
35
+ }
36
+ /** Expected output from SIM workflow */
37
+ interface SimWorkflowOutput {
38
+ items: SimOutputItem[];
39
+ categories?: Array<{
40
+ name: string;
41
+ description?: string;
42
+ }>;
43
+ tags?: Array<{
44
+ name: string;
45
+ }>;
46
+ brands?: Array<{
47
+ name: string;
48
+ url?: string;
49
+ }>;
50
+ }
51
+ /** Single item in SIM workflow output */
52
+ interface SimOutputItem {
53
+ name: string;
54
+ description?: string;
55
+ url?: string;
56
+ source_url?: string;
57
+ content?: string;
58
+ category?: string;
59
+ tags?: string[];
60
+ brand?: string;
61
+ images?: string[];
62
+ metadata?: Record<string, unknown>;
63
+ }
64
+ /** Resolved settings for the SIM AI plugin */
65
+ interface SimAiSettings {
66
+ apiKey: string;
67
+ baseUrl: string;
68
+ defaultWorkflowId?: string;
69
+ timeoutMs: number;
70
+ }
71
+
72
+ /**
73
+ * SIM AI Workflows Plugin
74
+ *
75
+ * Full pipeline plugin that delegates work generation to SIM AI workflows.
76
+ * SIM AI is an open-source AI agent workflow builder — this plugin triggers
77
+ * deployed SIM workflows and collects structured item results.
78
+ */
79
+ declare class SimAiPlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider {
80
+ readonly id = "sim-ai";
81
+ readonly name = "SIM AI Workflows";
82
+ readonly version = "1.0.0";
83
+ readonly category: PluginCategory;
84
+ readonly capabilities: readonly ["pipeline", "form-schema-provider"];
85
+ readonly configurationMode: "user-required";
86
+ readonly handledConfigFields: readonly ["*"];
87
+ readonly settingsSchema: JsonSchema;
88
+ private context;
89
+ onLoad(context: PluginContext): Promise<void>;
90
+ onUnload(): Promise<void>;
91
+ healthCheck(): Promise<PluginHealthCheck>;
92
+ isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
93
+ validateSettings(settings: Record<string, unknown>): Promise<ValidationResult>;
94
+ validateConnection(rawSettings: Record<string, unknown>): Promise<ConnectionValidationResult>;
95
+ getManifest(): PluginManifest;
96
+ getFormFields(): FormFieldDefinition[];
97
+ getFormGroups(): FormFieldGroup[];
98
+ validateFormInput(values: Record<string, unknown>): ValidationResult;
99
+ getDefaultValues(): Record<string, unknown>;
100
+ getStepDefinitions(): readonly PipelineStepDefinition[];
101
+ private _lastState;
102
+ private _lastAbortController;
103
+ execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
104
+ cancel(): Promise<void>;
105
+ getState(): PipelineState<SimAiStepId> | null;
106
+ private resolveSimSettings;
107
+ private resolveWorkflowId;
108
+ private captureScreenshots;
109
+ /**
110
+ * Flatten a ResolvedSettings map into plain key->value pairs.
111
+ */
112
+ private flattenSettings;
113
+ }
114
+
115
+ export { SimAiPlugin, type SimAiSettings, type SimAiStepId, type SimOutputItem, type SimWorkflowInput, type SimWorkflowOutput, SimAiPlugin as default };
@@ -0,0 +1,115 @@
1
+ import { IPlugin, IPipelinePlugin, IFormSchemaProvider, PluginCategory, JsonSchema, PluginContext, PluginHealthCheck, ValidationResult, ConnectionValidationResult, PluginManifest, FormFieldDefinition, FormFieldGroup, PipelineStepDefinition, WorkReference, GenerationRequest, ExistingItems, PipelineExecutionOptions, PipelineProgressCallback, PipelineResult, PipelineState } from '@ever-works/plugin';
2
+
3
+ /** Step IDs for the SIM AI pipeline. */
4
+ type SimAiStepId = 'validate-sim' | 'prepare-payload' | 'execute-workflow' | 'collect-results' | 'capture-screenshots' | 'cleanup';
5
+ /** Data source types for passing data to SIM */
6
+ type DataSourceType = 'inline' | 'github-repo';
7
+ /** Input payload sent to SIM workflow */
8
+ interface SimWorkflowInput {
9
+ metadata: {
10
+ workId: string;
11
+ workName: string;
12
+ workSlug: string;
13
+ workDescription?: string;
14
+ prompt?: string;
15
+ generationMethod?: string;
16
+ targetItems: number;
17
+ };
18
+ existingSummary?: {
19
+ totalItems: number;
20
+ categories: string[];
21
+ tags: string[];
22
+ sampleItems: Array<{
23
+ name: string;
24
+ url?: string;
25
+ }>;
26
+ };
27
+ dataSource?: {
28
+ type: DataSourceType;
29
+ repoUrl?: string;
30
+ accessToken?: string;
31
+ branch?: string;
32
+ path?: string;
33
+ };
34
+ workflowParams?: Record<string, unknown>;
35
+ }
36
+ /** Expected output from SIM workflow */
37
+ interface SimWorkflowOutput {
38
+ items: SimOutputItem[];
39
+ categories?: Array<{
40
+ name: string;
41
+ description?: string;
42
+ }>;
43
+ tags?: Array<{
44
+ name: string;
45
+ }>;
46
+ brands?: Array<{
47
+ name: string;
48
+ url?: string;
49
+ }>;
50
+ }
51
+ /** Single item in SIM workflow output */
52
+ interface SimOutputItem {
53
+ name: string;
54
+ description?: string;
55
+ url?: string;
56
+ source_url?: string;
57
+ content?: string;
58
+ category?: string;
59
+ tags?: string[];
60
+ brand?: string;
61
+ images?: string[];
62
+ metadata?: Record<string, unknown>;
63
+ }
64
+ /** Resolved settings for the SIM AI plugin */
65
+ interface SimAiSettings {
66
+ apiKey: string;
67
+ baseUrl: string;
68
+ defaultWorkflowId?: string;
69
+ timeoutMs: number;
70
+ }
71
+
72
+ /**
73
+ * SIM AI Workflows Plugin
74
+ *
75
+ * Full pipeline plugin that delegates work generation to SIM AI workflows.
76
+ * SIM AI is an open-source AI agent workflow builder — this plugin triggers
77
+ * deployed SIM workflows and collects structured item results.
78
+ */
79
+ declare class SimAiPlugin implements IPlugin, IPipelinePlugin, IFormSchemaProvider {
80
+ readonly id = "sim-ai";
81
+ readonly name = "SIM AI Workflows";
82
+ readonly version = "1.0.0";
83
+ readonly category: PluginCategory;
84
+ readonly capabilities: readonly ["pipeline", "form-schema-provider"];
85
+ readonly configurationMode: "user-required";
86
+ readonly handledConfigFields: readonly ["*"];
87
+ readonly settingsSchema: JsonSchema;
88
+ private context;
89
+ onLoad(context: PluginContext): Promise<void>;
90
+ onUnload(): Promise<void>;
91
+ healthCheck(): Promise<PluginHealthCheck>;
92
+ isAvailable(settings?: Record<string, unknown>): Promise<boolean>;
93
+ validateSettings(settings: Record<string, unknown>): Promise<ValidationResult>;
94
+ validateConnection(rawSettings: Record<string, unknown>): Promise<ConnectionValidationResult>;
95
+ getManifest(): PluginManifest;
96
+ getFormFields(): FormFieldDefinition[];
97
+ getFormGroups(): FormFieldGroup[];
98
+ validateFormInput(values: Record<string, unknown>): ValidationResult;
99
+ getDefaultValues(): Record<string, unknown>;
100
+ getStepDefinitions(): readonly PipelineStepDefinition[];
101
+ private _lastState;
102
+ private _lastAbortController;
103
+ execute(work: WorkReference, request: GenerationRequest, existing: ExistingItems, options?: PipelineExecutionOptions, onProgress?: PipelineProgressCallback): Promise<PipelineResult>;
104
+ cancel(): Promise<void>;
105
+ getState(): PipelineState<SimAiStepId> | null;
106
+ private resolveSimSettings;
107
+ private resolveWorkflowId;
108
+ private captureScreenshots;
109
+ /**
110
+ * Flatten a ResolvedSettings map into plain key->value pairs.
111
+ */
112
+ private flattenSettings;
113
+ }
114
+
115
+ export { SimAiPlugin, type SimAiSettings, type SimAiStepId, type SimOutputItem, type SimWorkflowInput, type SimWorkflowOutput, SimAiPlugin as default };