every-plugin 0.0.6 → 0.1.1
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.
- package/README.md +1 -265
- package/dist/errors.d.ts +4 -4
- package/dist/index.d.ts +2 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -3
- package/dist/plugin.d.ts +74 -34
- package/dist/plugin.d.ts.map +1 -1
- package/dist/plugin.js +100 -17
- package/dist/runtime/errors.d.ts +38 -34
- package/dist/runtime/errors.d.ts.map +1 -1
- package/dist/runtime/errors.js +2 -0
- package/dist/runtime/index.d.ts +7 -4
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +5 -10
- package/dist/runtime/services/module-federation.service.d.ts +5 -6
- package/dist/runtime/services/module-federation.service.d.ts.map +1 -1
- package/dist/runtime/services/module-federation.service.js +53 -15
- package/dist/runtime/services/plugin.service.d.ts +13 -6
- package/dist/runtime/services/plugin.service.d.ts.map +1 -1
- package/dist/runtime/services/plugin.service.js +237 -94
- package/dist/runtime/services/secrets.service.d.ts.map +1 -1
- package/dist/runtime/services.d.ts +0 -1
- package/dist/runtime/services.d.ts.map +1 -1
- package/dist/runtime/services.js +0 -1
- package/dist/runtime/streaming/index.d.ts +4 -0
- package/dist/runtime/streaming/index.d.ts.map +1 -0
- package/dist/runtime/streaming/index.js +2 -0
- package/dist/runtime/streaming/state-effects.d.ts +28 -0
- package/dist/runtime/streaming/state-effects.d.ts.map +1 -0
- package/dist/runtime/streaming/state-effects.js +30 -0
- package/dist/runtime/streaming/streaming.d.ts +8 -0
- package/dist/runtime/streaming/streaming.d.ts.map +1 -0
- package/dist/runtime/streaming/streaming.js +107 -0
- package/dist/runtime/streaming/types.d.ts +19 -0
- package/dist/runtime/streaming/types.d.ts.map +1 -0
- package/dist/runtime/streaming/types.js +1 -0
- package/dist/runtime/test-utils.d.ts +3 -0
- package/dist/runtime/test-utils.d.ts.map +1 -0
- package/dist/runtime/test-utils.js +7 -0
- package/dist/runtime/types.d.ts +1 -1
- package/dist/runtime/types.d.ts.map +1 -1
- package/dist/runtime/validation.d.ts +2 -7
- package/dist/runtime/validation.d.ts.map +1 -1
- package/dist/testing/index.d.ts +25 -0
- package/dist/testing/index.d.ts.map +1 -0
- package/dist/testing/index.js +40 -0
- package/dist/testing/mocks/module-federation.service.d.ts +8 -0
- package/dist/testing/mocks/module-federation.service.d.ts.map +1 -0
- package/dist/testing/mocks/module-federation.service.js +35 -0
- package/package.json +27 -6
- package/dist/runtime/runtime.d.ts +0 -58
- package/dist/runtime/runtime.d.ts.map +0 -1
- package/dist/runtime/runtime.js +0 -75
- package/dist/runtime/runtime.test.d.ts +0 -2
- package/dist/runtime/runtime.test.d.ts.map +0 -1
- package/dist/runtime/runtime.test.js +0 -308
- package/dist/runtime/services/plugin-cache.service.d.ts +0 -18
- package/dist/runtime/services/plugin-cache.service.d.ts.map +0 -1
- package/dist/runtime/services/plugin-cache.service.js +0 -55
- package/dist/source.d.ts +0 -198
- package/dist/source.d.ts.map +0 -1
- package/dist/source.js +0 -90
package/README.md
CHANGED
|
@@ -1,265 +1 @@
|
|
|
1
|
-
# every-plugin
|
|
2
|
-
|
|
3
|
-
A modular plugin runtime & system built with [Effect.TS](https://effect.website/) for loading, initializing, and executing remote plugins via [Module Federation](https://module-federation.io/).
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install every-plugin
|
|
9
|
-
# or
|
|
10
|
-
bun add every-plugin
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Quick Start
|
|
14
|
-
|
|
15
|
-
### Basic Plugin Usage
|
|
16
|
-
|
|
17
|
-
```typescript
|
|
18
|
-
import { Effect, ManagedRuntime } from "effect";
|
|
19
|
-
import { PluginRuntime } from "every-plugin/runtime";
|
|
20
|
-
|
|
21
|
-
// Create a managed runtime (do this once per application/worker)
|
|
22
|
-
const runtime = ManagedRuntime.make(PluginRuntime.Live({
|
|
23
|
-
registry: {
|
|
24
|
-
"@my-org/data-processor": {
|
|
25
|
-
version: "1.0.0",
|
|
26
|
-
remoteUrl: "https://cdn.example.com/plugins/data-processor@latest/remoteEntry.js",
|
|
27
|
-
description: "Processes data items",
|
|
28
|
-
type: "pipeline"
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
secrets: {
|
|
32
|
-
API_KEY: "your-secret-key",
|
|
33
|
-
DATABASE_URL: "postgresql://..."
|
|
34
|
-
},
|
|
35
|
-
logger: customLogger // optional
|
|
36
|
-
}));
|
|
37
|
-
|
|
38
|
-
// Use the runtime to execute plugins
|
|
39
|
-
const result = await runtime.runPromise(
|
|
40
|
-
Effect.gen(function* () {
|
|
41
|
-
const pluginRuntime = yield* PluginRuntime;
|
|
42
|
-
|
|
43
|
-
// Use and execute a plugin in one step
|
|
44
|
-
const plugin = yield* pluginRuntime.usePlugin("@my-org/data-processor", {
|
|
45
|
-
apiKey: "{{API_KEY}}", // Will be hydrated from secrets
|
|
46
|
-
batchSize: 100
|
|
47
|
-
});
|
|
48
|
-
|
|
49
|
-
const output = yield* pluginRuntime.executePlugin(plugin, {
|
|
50
|
-
items: ["item1", "item2", "item3"]
|
|
51
|
-
});
|
|
52
|
-
|
|
53
|
-
return output;
|
|
54
|
-
})
|
|
55
|
-
);
|
|
56
|
-
|
|
57
|
-
console.log(result);
|
|
58
|
-
|
|
59
|
-
// Clean up when done
|
|
60
|
-
await runtime.dispose();
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Alternative: Convenience Factory Function
|
|
64
|
-
|
|
65
|
-
If you prefer a factory function, you can use the convenience wrapper:
|
|
66
|
-
|
|
67
|
-
```typescript
|
|
68
|
-
import { createPluginRuntime, PluginRuntime } from "every-plugin/runtime";
|
|
69
|
-
|
|
70
|
-
// This is equivalent to ManagedRuntime.make(PluginRuntime.Live(config))
|
|
71
|
-
const runtime = createPluginRuntime({
|
|
72
|
-
registry: { /* ... */ },
|
|
73
|
-
secrets: { /* ... */ }
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
const result = await runtime.runPromise(
|
|
77
|
-
Effect.gen(function* () {
|
|
78
|
-
const pluginRuntime = yield* PluginRuntime;
|
|
79
|
-
return yield* pluginRuntime.usePlugin(pluginId, config);
|
|
80
|
-
})
|
|
81
|
-
);
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Advanced Usage - Granular Control
|
|
85
|
-
|
|
86
|
-
```typescript
|
|
87
|
-
import { Effect } from "effect";
|
|
88
|
-
import { PluginRuntime } from "every-plugin/runtime";
|
|
89
|
-
|
|
90
|
-
const processWithGranularControl = Effect.gen(function* () {
|
|
91
|
-
const pluginRuntime = yield* PluginRuntime;
|
|
92
|
-
|
|
93
|
-
// Step-by-step plugin lifecycle
|
|
94
|
-
const constructor = yield* pluginRuntime.loadPlugin("@my-org/data-processor");
|
|
95
|
-
const instance = yield* pluginRuntime.instantiatePlugin(constructor);
|
|
96
|
-
const initialized = yield* pluginRuntime.initializePlugin(instance, config);
|
|
97
|
-
const output = yield* pluginRuntime.executePlugin(initialized, input);
|
|
98
|
-
|
|
99
|
-
return output;
|
|
100
|
-
});
|
|
101
|
-
|
|
102
|
-
await runtime.runPromise(processWithGranularControl);
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Worker Integration
|
|
106
|
-
|
|
107
|
-
Perfect for BullMQ workers or similar job processing systems:
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
import { Job } from "bullmq";
|
|
111
|
-
import { Effect } from "effect";
|
|
112
|
-
import { createPluginRuntime, PluginRuntime } from "every-plugin/runtime";
|
|
113
|
-
|
|
114
|
-
// Initialize runtime once per worker
|
|
115
|
-
const runtime = createPluginRuntime({
|
|
116
|
-
registry: pluginRegistry,
|
|
117
|
-
secrets: await loadSecrets(),
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
// Job processor
|
|
121
|
-
const processJob = (job: Job) =>
|
|
122
|
-
runtime.runPromise(
|
|
123
|
-
Effect.gen(function* () {
|
|
124
|
-
const pluginRuntime = yield* PluginRuntime;
|
|
125
|
-
const { pluginId, config, input } = job.data;
|
|
126
|
-
|
|
127
|
-
const plugin = yield* pluginRuntime.usePlugin(pluginId, config);
|
|
128
|
-
return yield* pluginRuntime.executePlugin(plugin, input);
|
|
129
|
-
})
|
|
130
|
-
);
|
|
131
|
-
|
|
132
|
-
// Worker setup
|
|
133
|
-
const worker = new Worker("my-queue", processJob);
|
|
134
|
-
|
|
135
|
-
// Cleanup on shutdown
|
|
136
|
-
process.on("SIGTERM", async () => {
|
|
137
|
-
await worker.close();
|
|
138
|
-
await runtime.dispose();
|
|
139
|
-
});
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
### React/Next.js Integration
|
|
143
|
-
|
|
144
|
-
```typescript
|
|
145
|
-
import { createPluginRuntime, PluginRuntime } from "every-plugin/runtime";
|
|
146
|
-
import { Effect } from "effect";
|
|
147
|
-
|
|
148
|
-
// Create runtime at app level
|
|
149
|
-
const pluginRuntime = createPluginRuntime({
|
|
150
|
-
registry: clientSideRegistry,
|
|
151
|
-
secrets: {} // No secrets on client side
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
// In a React component or API route
|
|
155
|
-
export async function executePlugin(pluginId: string, config: any, input: any) {
|
|
156
|
-
return pluginRuntime.runPromise(
|
|
157
|
-
Effect.gen(function* () {
|
|
158
|
-
const runtime = yield* PluginRuntime;
|
|
159
|
-
const plugin = yield* runtime.usePlugin(pluginId, config);
|
|
160
|
-
return yield* runtime.executePlugin(plugin, input);
|
|
161
|
-
})
|
|
162
|
-
);
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
// Cleanup in app teardown
|
|
166
|
-
export function cleanup() {
|
|
167
|
-
return pluginRuntime.dispose();
|
|
168
|
-
}
|
|
169
|
-
```
|
|
170
|
-
|
|
171
|
-
## Core Concepts
|
|
172
|
-
|
|
173
|
-
### Plugin Registry
|
|
174
|
-
|
|
175
|
-
The registry defines available plugins and their remote locations:
|
|
176
|
-
|
|
177
|
-
```typescript
|
|
178
|
-
type PluginRegistry = {
|
|
179
|
-
[pluginId: string]: {
|
|
180
|
-
version: string;
|
|
181
|
-
remoteUrl: string;
|
|
182
|
-
description?: string;
|
|
183
|
-
type?: string;
|
|
184
|
-
};
|
|
185
|
-
};
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
### Secret Hydration
|
|
189
|
-
|
|
190
|
-
Secrets are automatically hydrated using Mustache-style templating:
|
|
191
|
-
|
|
192
|
-
```typescript
|
|
193
|
-
const config = {
|
|
194
|
-
apiKey: "{{API_KEY}}", // Will be replaced with actual secret
|
|
195
|
-
endpoint: "https://api.example.com"
|
|
196
|
-
};
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### Plugin Lifecycle
|
|
200
|
-
|
|
201
|
-
1. **Load**: Download and cache the remote plugin module
|
|
202
|
-
2. **Instantiate**: Create a new instance of the plugin class
|
|
203
|
-
3. **Initialize**: Configure the plugin with validated config and secrets
|
|
204
|
-
4. **Execute**: Run the plugin with validated input, return validated output
|
|
205
|
-
|
|
206
|
-
### Error Handling
|
|
207
|
-
|
|
208
|
-
All operations return Effect types with proper error handling:
|
|
209
|
-
|
|
210
|
-
```typescript
|
|
211
|
-
const result = await runtime.runPromise(
|
|
212
|
-
Effect.gen(function* () {
|
|
213
|
-
const pluginRuntime = yield* PluginRuntime;
|
|
214
|
-
return yield* pluginRuntime.usePlugin(pluginId, config);
|
|
215
|
-
}).pipe(
|
|
216
|
-
Effect.catchAll((error) => {
|
|
217
|
-
console.error("Plugin execution failed:", error);
|
|
218
|
-
return Effect.succeed(null); // Fallback value
|
|
219
|
-
})
|
|
220
|
-
)
|
|
221
|
-
);
|
|
222
|
-
```
|
|
223
|
-
|
|
224
|
-
## API Reference
|
|
225
|
-
|
|
226
|
-
### `createPluginRuntime(config)`
|
|
227
|
-
|
|
228
|
-
Creates a managed runtime for plugin execution.
|
|
229
|
-
|
|
230
|
-
**Parameters:**
|
|
231
|
-
|
|
232
|
-
- `config.registry`: Plugin registry mapping
|
|
233
|
-
- `config.secrets`: Secret values for hydration (optional)
|
|
234
|
-
- `config.logger`: Custom logger implementation (optional)
|
|
235
|
-
|
|
236
|
-
**Returns:** `ManagedRuntime` instance
|
|
237
|
-
|
|
238
|
-
### `PluginRuntime`
|
|
239
|
-
|
|
240
|
-
Effect service tag for accessing the plugin runtime within Effect workflows.
|
|
241
|
-
|
|
242
|
-
### Plugin Runtime Methods
|
|
243
|
-
|
|
244
|
-
- `loadPlugin(pluginId)`: Load plugin constructor from registry
|
|
245
|
-
- `instantiatePlugin(constructor)`: Create plugin instance
|
|
246
|
-
- `initializePlugin(instance, config)`: Initialize with config and secrets
|
|
247
|
-
- `executePlugin(plugin, input)`: Execute plugin with input
|
|
248
|
-
- `usePlugin(pluginId, config)`: Load + instantiate + initialize in one step
|
|
249
|
-
|
|
250
|
-
## Development
|
|
251
|
-
|
|
252
|
-
```bash
|
|
253
|
-
# Install dependencies
|
|
254
|
-
bun install
|
|
255
|
-
|
|
256
|
-
# Build the package
|
|
257
|
-
bun run build
|
|
258
|
-
|
|
259
|
-
# Run tests
|
|
260
|
-
bun test
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
## License
|
|
264
|
-
|
|
265
|
-
MIT
|
|
1
|
+
# every-plugin
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export declare class PluginExecutionError extends Error {
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
readonly retryable: boolean;
|
|
3
|
+
constructor(message: string, retryable?: boolean);
|
|
4
4
|
}
|
|
5
5
|
export declare class ConfigurationError extends PluginExecutionError {
|
|
6
|
-
|
|
6
|
+
constructor(message: string);
|
|
7
7
|
}
|
|
8
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
8
|
+
//# sourceMappingURL=errors.d.ts.map
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/plugin.d.ts
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
import { Context,
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
import type { ConfigurationError
|
|
4
|
-
export declare
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
errors: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
8
|
-
message: z.ZodString;
|
|
9
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
10
|
-
stack: z.ZodOptional<z.ZodString>;
|
|
11
|
-
}, z.core.$strip>>>;
|
|
3
|
+
import type { ConfigurationError } from "./errors";
|
|
4
|
+
export declare function createConfigSchema<V extends z.ZodTypeAny = z.ZodRecord<z.ZodString, z.ZodUnknown>, S extends z.ZodTypeAny = z.ZodRecord<z.ZodString, z.ZodUnknown>>(variablesSchema?: V, secretsSchema?: S): z.ZodObject<{
|
|
5
|
+
variables: z.ZodOptional<V> | z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
6
|
+
secrets: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>> | z.ZodOptional<S>;
|
|
12
7
|
}, z.core.$strip>;
|
|
13
|
-
export declare function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}>;
|
|
17
|
-
export declare function createInputSchema<I extends z.ZodTypeAny>(inputSchema: I): I;
|
|
18
|
-
export declare const ErrorDetailsSchema: z.ZodObject<{
|
|
19
|
-
message: z.ZodString;
|
|
20
|
-
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
21
|
-
stack: z.ZodOptional<z.ZodString>;
|
|
22
|
-
}, z.core.$strip>;
|
|
23
|
-
export type ErrorDetails = z.infer<typeof ErrorDetailsSchema>;
|
|
24
|
-
export type Config<V extends z.ZodTypeAny = z.ZodRecord<z.ZodString, z.ZodUnknown>, S extends z.ZodTypeAny = z.ZodRecord<z.ZodString, z.ZodUnknown>> = z.infer<ReturnType<typeof createConfigSchema<V, S>>>;
|
|
25
|
-
export type Input<I extends z.ZodTypeAny> = z.infer<ReturnType<typeof createInputSchema<I>>>;
|
|
26
|
-
export type Output<T extends z.ZodTypeAny> = z.infer<ReturnType<typeof createOutputSchema<T>>>;
|
|
27
|
-
export interface Plugin<TInputSchema extends z.ZodTypeAny, TOutputSchema extends z.ZodTypeAny, TConfigSchema extends z.ZodTypeAny> {
|
|
28
|
-
readonly id: string;
|
|
29
|
-
readonly type: PluginType;
|
|
30
|
-
readonly inputSchema: TInputSchema;
|
|
31
|
-
readonly outputSchema: TOutputSchema;
|
|
32
|
-
readonly configSchema: TConfigSchema;
|
|
33
|
-
initialize(config?: z.infer<TConfigSchema>): Effect.Effect<void, ConfigurationError, PluginLoggerTag>;
|
|
34
|
-
execute(input: z.infer<TInputSchema>): Effect.Effect<z.infer<TOutputSchema>, PluginExecutionError, PluginLoggerTag>;
|
|
35
|
-
shutdown(): Effect.Effect<void, never, PluginLoggerTag>;
|
|
36
|
-
}
|
|
8
|
+
export declare function createStateSchema<T extends z.ZodTypeAny>(pluginStateSchema: T): z.ZodIntersection<z.ZodObject<{
|
|
9
|
+
nextPollMs: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10
|
+
}, z.core.$strip>, T>;
|
|
37
11
|
export type PluginType = "transformer" | "distributor" | "source";
|
|
38
12
|
export interface PluginMetadata {
|
|
39
13
|
remoteUrl: string;
|
|
@@ -53,5 +27,71 @@ export interface PluginLogger {
|
|
|
53
27
|
declare const PluginLoggerTag_base: Context.TagClass<PluginLoggerTag, "PluginLogger", PluginLogger>;
|
|
54
28
|
export declare class PluginLoggerTag extends PluginLoggerTag_base {
|
|
55
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Schema creators for contract-based plugins
|
|
32
|
+
*/
|
|
33
|
+
export declare function createPluginInputSchema<TContract, TStateSchema extends z.ZodTypeAny>(contract: TContract, stateSchema: TStateSchema): z.ZodDiscriminatedUnion<[z.ZodObject<any, z.core.$strip>, ...z.ZodObject<any, z.core.$strip>[]], "procedure">;
|
|
34
|
+
export declare function createPluginOutputSchema<TContract, TStateSchema extends z.ZodTypeAny>(contract: TContract, stateSchema: TStateSchema): z.ZodUnion<[z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, ...z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[]]>;
|
|
35
|
+
/**
|
|
36
|
+
* Unified Plugin interface for all plugin types
|
|
37
|
+
*/
|
|
38
|
+
export interface Plugin<TContract = Record<string, any>, TConfigSchema extends z.ZodTypeAny = z.ZodTypeAny, TStateSchema extends z.ZodTypeAny = z.ZodNull> {
|
|
39
|
+
readonly id: string;
|
|
40
|
+
readonly type: PluginType;
|
|
41
|
+
readonly contract: TContract;
|
|
42
|
+
readonly configSchema: TConfigSchema;
|
|
43
|
+
readonly stateSchema: TStateSchema;
|
|
44
|
+
readonly inputSchema: ReturnType<typeof createPluginInputSchema<TContract, TStateSchema>>;
|
|
45
|
+
readonly outputSchema: ReturnType<typeof createPluginOutputSchema<TContract, TStateSchema>>;
|
|
46
|
+
initialize(config?: z.infer<TConfigSchema>): Effect.Effect<void, ConfigurationError, PluginLoggerTag>;
|
|
47
|
+
shutdown(): Effect.Effect<void, never, PluginLoggerTag>;
|
|
48
|
+
createRouter(): any;
|
|
49
|
+
isStreamable(procedureName: string): boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* State transition utilities for plugins
|
|
53
|
+
* These provide a functional approach to state updates while keeping the API simple
|
|
54
|
+
*/
|
|
55
|
+
export declare const StateTransitions: {
|
|
56
|
+
/**
|
|
57
|
+
* Transition to a new phase with optional updates
|
|
58
|
+
*/
|
|
59
|
+
to: <T extends {
|
|
60
|
+
phase?: string;
|
|
61
|
+
}>(phase: string, updates?: Partial<T>) => (state: T) => T;
|
|
62
|
+
/**
|
|
63
|
+
* Add polling delay to state
|
|
64
|
+
*/
|
|
65
|
+
withPolling: <T>(delayMs: number) => (state: T) => T;
|
|
66
|
+
/**
|
|
67
|
+
* Set error state with message and stop polling
|
|
68
|
+
*/
|
|
69
|
+
withError: <T>(errorMessage: string) => (state: T) => T;
|
|
70
|
+
/**
|
|
71
|
+
* Preserve existing state with updates
|
|
72
|
+
*/
|
|
73
|
+
update: <T>(updates: Partial<T>) => (state: T) => T;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Simple pipe utility for composing state transformations
|
|
77
|
+
*/
|
|
78
|
+
export declare const pipe: <T>(value: T, ...fns: Array<(val: T) => T>) => T;
|
|
79
|
+
/**
|
|
80
|
+
* Simple plugin base class that uses pure oRPC patterns
|
|
81
|
+
* Plugin just needs to define contract, config, and create oRPC router
|
|
82
|
+
*/
|
|
83
|
+
export declare abstract class SimplePlugin<TContract, TConfigSchema extends z.ZodTypeAny, TStateSchema extends z.ZodTypeAny = z.ZodNull> implements Plugin<TContract, TConfigSchema, TStateSchema> {
|
|
84
|
+
abstract readonly id: string;
|
|
85
|
+
abstract readonly type: PluginType;
|
|
86
|
+
abstract readonly contract: TContract;
|
|
87
|
+
abstract readonly configSchema: TConfigSchema;
|
|
88
|
+
readonly stateSchema: TStateSchema;
|
|
89
|
+
get inputSchema(): z.ZodDiscriminatedUnion<[z.ZodObject<any, z.core.$strip>, ...z.ZodObject<any, z.core.$strip>[]], "procedure">;
|
|
90
|
+
get outputSchema(): z.ZodUnion<[z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>, ...z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>[]]>;
|
|
91
|
+
initialize(config?: z.infer<TConfigSchema>): Effect.Effect<void, ConfigurationError, PluginLoggerTag>;
|
|
92
|
+
abstract createRouter(): any;
|
|
93
|
+
shutdown(): Effect.Effect<void, never, PluginLoggerTag>;
|
|
94
|
+
isStreamable(procedureName: string): boolean;
|
|
95
|
+
}
|
|
56
96
|
export {};
|
|
57
97
|
//# sourceMappingURL=plugin.d.ts.map
|
package/dist/plugin.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"plugin.d.ts","sourceRoot":"","sources":["../src/plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACzC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,wBAAgB,kBAAkB,CACjC,CAAC,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,EAC/D,CAAC,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,UAAU,CAAC,EAC9D,eAAe,CAAC,EAAE,CAAC,EAAE,aAAa,CAAC,EAAE,CAAC;;;kBAKvC;AAED,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,CAAC,CAAC,UAAU,EACvD,iBAAiB,EAAE,CAAC;;sBAOpB;AAGD,MAAM,MAAM,UAAU,GAAG,aAAa,GAAG,aAAa,GAAG,QAAQ,CAAC;AAGlE,MAAM,WAAW,cAAc;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,UAAU,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AAO,MAAM,IAAI,GAAI,CAAC,EAAE,OAAO,CAAC,EAAE,GAAG,KAAK,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,CAAC,KAAG,CACzB,CAAC;AAEzC;;;GAGG;AACH,8BAAsB,YAAY,CACjC,SAAS,EACT,aAAa,SAAS,CAAC,CAAC,UAAU,EAClC,YAAY,SAAS,CAAC,CAAC,UAAU,GAAG,CAAC,CAAC,OAAO,CAC5C,YAAW,MAAM,CAAC,SAAS,EAAE,aAAa,EAAE,YAAY,CAAC;IAC1D,QAAQ,CAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IACnC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,YAAY,EAAE,aAAa,CAAC;IAE9C,QAAQ,CAAC,WAAW,EAA0B,YAAY,CAAC;IAG3D,IAAI,WAAW,kHAEd;IAED,IAAI,YAAY,wKAEf;IAGD,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,kBAAkB,EAAE,eAAe,CAAC;IAKrG,QAAQ,CAAC,YAAY,IAAI,GAAG;IAE5B,QAAQ,IAAI,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,eAAe,CAAC;IAKvD,YAAY,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;CAQ5C"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,25 +1,108 @@
|
|
|
1
|
-
import { Context } from "effect";
|
|
1
|
+
import { Context, Effect } from "effect";
|
|
2
2
|
import { z } from "zod";
|
|
3
|
-
// Helpers
|
|
4
|
-
export const createOutputSchema = (dataSchema) => z.object({
|
|
5
|
-
success: z.boolean(),
|
|
6
|
-
data: dataSchema.optional(),
|
|
7
|
-
errors: z.array(ErrorDetailsSchema).optional(),
|
|
8
|
-
});
|
|
9
3
|
export function createConfigSchema(variablesSchema, secretsSchema) {
|
|
10
4
|
return z.object({
|
|
11
|
-
variables:
|
|
12
|
-
secrets:
|
|
5
|
+
variables: variablesSchema ? variablesSchema.optional() : z.record(z.string(), z.unknown()).optional(),
|
|
6
|
+
secrets: secretsSchema ? secretsSchema.optional() : z.record(z.string(), z.unknown()).optional(),
|
|
13
7
|
});
|
|
14
8
|
}
|
|
15
|
-
export function
|
|
16
|
-
|
|
9
|
+
export function createStateSchema(pluginStateSchema) {
|
|
10
|
+
const BaseStreamingStateSchema = z.object({
|
|
11
|
+
nextPollMs: z.number().nullable().optional(), // null = terminate, undefined/0 = no delay, number = delay ms
|
|
12
|
+
});
|
|
13
|
+
return BaseStreamingStateSchema.and(pluginStateSchema);
|
|
17
14
|
}
|
|
18
|
-
// Core schemas
|
|
19
|
-
export const ErrorDetailsSchema = z.object({
|
|
20
|
-
message: z.string(),
|
|
21
|
-
details: z.record(z.string(), z.unknown()).optional(),
|
|
22
|
-
stack: z.string().optional(),
|
|
23
|
-
});
|
|
24
15
|
export class PluginLoggerTag extends Context.Tag("PluginLogger")() {
|
|
25
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* Schema creators for contract-based plugins
|
|
19
|
+
*/
|
|
20
|
+
export function createPluginInputSchema(contract, stateSchema) {
|
|
21
|
+
const contractEntries = Object.entries(contract);
|
|
22
|
+
const procedureSchemas = contractEntries.map(([procedureName, procedureSpec]) => {
|
|
23
|
+
// Extract input and output schemas from oRPC contract procedure
|
|
24
|
+
const inputSchema = procedureSpec['~orpc']?.inputSchema || z.object({});
|
|
25
|
+
const outputSchema = procedureSpec['~orpc']?.outputSchema || z.object({});
|
|
26
|
+
// Check if this procedure is streamable (has nextState in output)
|
|
27
|
+
const isStreamable = outputSchema._def?.shape?.nextState !== undefined;
|
|
28
|
+
const baseSchema = z.object({
|
|
29
|
+
procedure: z.literal(procedureName),
|
|
30
|
+
input: inputSchema,
|
|
31
|
+
});
|
|
32
|
+
// Only add state field for streamable procedures
|
|
33
|
+
return isStreamable
|
|
34
|
+
? baseSchema.extend({ state: stateSchema })
|
|
35
|
+
: baseSchema;
|
|
36
|
+
});
|
|
37
|
+
return z.discriminatedUnion("procedure", procedureSchemas);
|
|
38
|
+
}
|
|
39
|
+
export function createPluginOutputSchema(contract, stateSchema) {
|
|
40
|
+
const contractEntries = Object.entries(contract);
|
|
41
|
+
const procedureOutputSchemas = contractEntries.map(([_, procedureSpec]) => {
|
|
42
|
+
// Extract output schema from oRPC contract procedure
|
|
43
|
+
return procedureSpec['~orpc']?.outputSchema || z.object({});
|
|
44
|
+
});
|
|
45
|
+
// Return union of all procedure output schemas
|
|
46
|
+
return z.union(procedureOutputSchemas);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* State transition utilities for plugins
|
|
50
|
+
* These provide a functional approach to state updates while keeping the API simple
|
|
51
|
+
*/
|
|
52
|
+
export const StateTransitions = {
|
|
53
|
+
/**
|
|
54
|
+
* Transition to a new phase with optional updates
|
|
55
|
+
*/
|
|
56
|
+
to: (phase, updates = {}) => (state) => ({ ...state, phase, ...updates }),
|
|
57
|
+
/**
|
|
58
|
+
* Add polling delay to state
|
|
59
|
+
*/
|
|
60
|
+
withPolling: (delayMs) => (state) => ({ ...state, nextPollMs: delayMs }),
|
|
61
|
+
/**
|
|
62
|
+
* Set error state with message and stop polling
|
|
63
|
+
*/
|
|
64
|
+
withError: (errorMessage) => (state) => ({
|
|
65
|
+
...state,
|
|
66
|
+
phase: 'error',
|
|
67
|
+
errorMessage,
|
|
68
|
+
nextPollMs: null
|
|
69
|
+
}),
|
|
70
|
+
/**
|
|
71
|
+
* Preserve existing state with updates
|
|
72
|
+
*/
|
|
73
|
+
update: (updates) => (state) => ({ ...state, ...updates }),
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Simple pipe utility for composing state transformations
|
|
77
|
+
*/
|
|
78
|
+
export const pipe = (value, ...fns) => fns.reduce((acc, fn) => fn(acc), value);
|
|
79
|
+
/**
|
|
80
|
+
* Simple plugin base class that uses pure oRPC patterns
|
|
81
|
+
* Plugin just needs to define contract, config, and create oRPC router
|
|
82
|
+
*/
|
|
83
|
+
export class SimplePlugin {
|
|
84
|
+
stateSchema = z.null();
|
|
85
|
+
// Auto-generated schemas
|
|
86
|
+
get inputSchema() {
|
|
87
|
+
return createPluginInputSchema(this.contract, this.stateSchema);
|
|
88
|
+
}
|
|
89
|
+
get outputSchema() {
|
|
90
|
+
return createPluginOutputSchema(this.contract, this.stateSchema);
|
|
91
|
+
}
|
|
92
|
+
// Default implementations - runtime handles validation
|
|
93
|
+
initialize(config) {
|
|
94
|
+
return Effect.void;
|
|
95
|
+
}
|
|
96
|
+
shutdown() {
|
|
97
|
+
return Effect.void;
|
|
98
|
+
}
|
|
99
|
+
// Default streamable detection
|
|
100
|
+
isStreamable(procedureName) {
|
|
101
|
+
const contractEntries = Object.entries(this.contract);
|
|
102
|
+
const procedure = contractEntries.find(([name]) => name === procedureName);
|
|
103
|
+
if (!procedure)
|
|
104
|
+
return false;
|
|
105
|
+
const outputSchema = procedure[1]['~orpc']?.outputSchema;
|
|
106
|
+
return outputSchema?._def?.shape?.nextState !== undefined;
|
|
107
|
+
}
|
|
108
|
+
}
|
package/dist/runtime/errors.d.ts
CHANGED
|
@@ -1,41 +1,45 @@
|
|
|
1
1
|
import type { z } from "zod";
|
|
2
|
-
declare const PluginRuntimeError_base: new <A extends Record<string, any> = {}>(
|
|
3
|
-
|
|
4
|
-
? void
|
|
5
|
-
: { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] },
|
|
6
|
-
) => import("effect/Cause").YieldableError & {
|
|
7
|
-
readonly _tag: "PluginRuntimeError";
|
|
2
|
+
declare const PluginRuntimeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
3
|
+
readonly _tag: "PluginRuntimeError";
|
|
8
4
|
} & Readonly<A>;
|
|
9
5
|
export declare class PluginRuntimeError extends PluginRuntimeError_base<{
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}> {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
args: import("effect/Types").Equals<A, {}> extends true
|
|
19
|
-
? void
|
|
20
|
-
: { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] },
|
|
21
|
-
) => import("effect/Cause").YieldableError & {
|
|
22
|
-
readonly _tag: "ModuleFederationError";
|
|
6
|
+
readonly pluginId?: string;
|
|
7
|
+
readonly operation: string;
|
|
8
|
+
readonly cause?: Error;
|
|
9
|
+
readonly retryable: boolean;
|
|
10
|
+
}> {
|
|
11
|
+
}
|
|
12
|
+
declare const ModuleFederationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
13
|
+
readonly _tag: "ModuleFederationError";
|
|
23
14
|
} & Readonly<A>;
|
|
24
15
|
export declare class ModuleFederationError extends ModuleFederationError_base<{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}> {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
: { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] },
|
|
33
|
-
) => import("effect/Cause").YieldableError & {
|
|
34
|
-
readonly _tag: "ValidationError";
|
|
16
|
+
readonly pluginId: string;
|
|
17
|
+
readonly remoteUrl: string;
|
|
18
|
+
readonly cause?: Error;
|
|
19
|
+
}> {
|
|
20
|
+
}
|
|
21
|
+
declare const ValidationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
22
|
+
readonly _tag: "ValidationError";
|
|
35
23
|
} & Readonly<A>;
|
|
36
24
|
export declare class ValidationError extends ValidationError_base<{
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}> {
|
|
41
|
-
|
|
25
|
+
readonly pluginId: string;
|
|
26
|
+
readonly stage: "config" | "input" | "output" | "state";
|
|
27
|
+
readonly zodError: z.ZodError;
|
|
28
|
+
}> {
|
|
29
|
+
}
|
|
30
|
+
declare const StreamError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").Equals<A, {}> extends true ? void : { readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }) => import("effect/Cause").YieldableError & {
|
|
31
|
+
readonly _tag: "StreamError";
|
|
32
|
+
} & Readonly<A>;
|
|
33
|
+
export declare class StreamError extends StreamError_base<{
|
|
34
|
+
readonly pluginId: string;
|
|
35
|
+
readonly operation: "callback" | "state-extraction" | "item-extraction" | "stream-termination";
|
|
36
|
+
readonly cause?: Error;
|
|
37
|
+
readonly context?: {
|
|
38
|
+
readonly iteration?: number;
|
|
39
|
+
readonly itemsProcessed?: number;
|
|
40
|
+
readonly procedureName?: string;
|
|
41
|
+
};
|
|
42
|
+
}> {
|
|
43
|
+
}
|
|
44
|
+
export {};
|
|
45
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/runtime/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;AAE7B,qBAAa,kBAAmB,SAAQ,wBAAuC;
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/runtime/errors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;;;;AAE7B,qBAAa,kBAAmB,SAAQ,wBAAuC;IAC9E,QAAQ,CAAC,QAAQ,CAAC,EAA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