@outputai/core 0.8.2-next.ec4c07d.0 → 0.9.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@outputai/core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "The core module of the output framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -73,6 +73,7 @@
|
|
|
73
73
|
"#internal_activities": "./src/internal_activities/index.js"
|
|
74
74
|
},
|
|
75
75
|
"scripts": {
|
|
76
|
-
"worker": "node ./src/worker/index.js"
|
|
76
|
+
"worker": "node ./src/worker/index.js",
|
|
77
|
+
"build": "pnpm exec tsc -p ./tsconfig.typecheck.json"
|
|
77
78
|
}
|
|
78
79
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Export all types from the interface
|
|
3
3
|
*
|
|
4
4
|
*/
|
|
5
|
-
export * from './interface/index.
|
|
5
|
+
export * from './interface/index.js';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Exports all errors
|
|
9
9
|
*/
|
|
10
|
-
export * from './errors.
|
|
10
|
+
export * from './errors.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Expose z from Zod as a convenience.
|
|
@@ -22,7 +22,7 @@ export type EvaluatorOptions = {
|
|
|
22
22
|
*/
|
|
23
23
|
export type EvaluatorFunction<
|
|
24
24
|
InputSchema extends AnyZodSchema | undefined = undefined,
|
|
25
|
-
Result extends EvaluationResult
|
|
25
|
+
Result extends EvaluationResult = EvaluationResult
|
|
26
26
|
> = InputSchema extends AnyZodSchema ?
|
|
27
27
|
( input: z.infer<InputSchema> ) => Promise<Result> :
|
|
28
28
|
() => Promise<Result>;
|
|
@@ -34,7 +34,7 @@ export type EvaluatorFunction<
|
|
|
34
34
|
*
|
|
35
35
|
* It adds input validation based on the `inputSchema`.
|
|
36
36
|
*/
|
|
37
|
-
export type EvaluatorFunctionWrapper<EvaluatorFunction> =
|
|
37
|
+
export type EvaluatorFunctionWrapper<EvaluatorFunction extends ( ...args: any ) => any> = // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
38
38
|
Parameters<EvaluatorFunction> extends [infer Input] ?
|
|
39
39
|
( input: Input ) => ReturnType<EvaluatorFunction> :
|
|
40
40
|
() => ReturnType<EvaluatorFunction>;
|
package/src/interface/step.d.ts
CHANGED
|
@@ -36,7 +36,7 @@ export type StepFunction<
|
|
|
36
36
|
* @param input - The Step input; it matches the schema defined by `inputSchema`.
|
|
37
37
|
* @returns A value matching the schema defined by `outputSchema`.
|
|
38
38
|
*/
|
|
39
|
-
export type StepFunctionWrapper<StepFunction> =
|
|
39
|
+
export type StepFunctionWrapper<StepFunction extends ( ...args: any ) => any> = // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
40
40
|
Parameters<StepFunction> extends [infer Input] ?
|
|
41
41
|
( input: Input ) => ReturnType<StepFunction> :
|
|
42
42
|
() => ReturnType<StepFunction>;
|
|
@@ -133,7 +133,7 @@ export type WorkflowFunction<
|
|
|
133
133
|
> = InputSchema extends AnyZodSchema ?
|
|
134
134
|
( input: z.infer<InputSchema>, context: WorkflowContext<InputSchema, OutputSchema> ) =>
|
|
135
135
|
Promise<OutputSchema extends AnyZodSchema ? z.infer<OutputSchema> : void> :
|
|
136
|
-
( input
|
|
136
|
+
( input: undefined | null, context: WorkflowContext<InputSchema, OutputSchema> ) =>
|
|
137
137
|
Promise<OutputSchema extends AnyZodSchema ? z.infer<OutputSchema> : void>;
|
|
138
138
|
|
|
139
139
|
/**
|
|
@@ -149,7 +149,7 @@ export type WorkflowFunction<
|
|
|
149
149
|
* @param options - Additional options for the invocation.
|
|
150
150
|
* @returns A value matching the schema defined by `outputSchema`.
|
|
151
151
|
*/
|
|
152
|
-
export type WorkflowFunctionWrapper<WorkflowFunction> =
|
|
152
|
+
export type WorkflowFunctionWrapper<WorkflowFunction extends ( ...args: any ) => any> = // eslint-disable-line @typescript-eslint/no-explicit-any
|
|
153
153
|
[Parameters<WorkflowFunction>[0]] extends [undefined | null] ?
|
|
154
154
|
( input?: undefined | null, options?: WorkflowInvocationOptions ) =>
|
|
155
155
|
ReturnType<WorkflowFunction> :
|