@context-action/core 0.8.8 → 0.9.2
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 +17 -0
- package/dist/index.cjs +8 -428
- package/dist/index.d.cts +26 -133
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +26 -133
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -420
- package/dist/index.js.map +1 -1
- package/package.json +6 -13
package/dist/index.d.cts
CHANGED
|
@@ -1,96 +1,20 @@
|
|
|
1
|
-
import { ZodObject, ZodRawShape, ZodType, z } from "zod";
|
|
2
|
-
//#region src/json-schema.d.ts
|
|
3
|
-
type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'null';
|
|
4
|
-
interface JSONSchema {
|
|
5
|
-
type?: JSONSchemaType | JSONSchemaType[];
|
|
6
|
-
title?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
default?: unknown;
|
|
9
|
-
examples?: unknown[];
|
|
10
|
-
minLength?: number;
|
|
11
|
-
maxLength?: number;
|
|
12
|
-
pattern?: string;
|
|
13
|
-
format?: string;
|
|
14
|
-
minimum?: number;
|
|
15
|
-
maximum?: number;
|
|
16
|
-
exclusiveMinimum?: number;
|
|
17
|
-
exclusiveMaximum?: number;
|
|
18
|
-
multipleOf?: number;
|
|
19
|
-
items?: JSONSchema;
|
|
20
|
-
minItems?: number;
|
|
21
|
-
maxItems?: number;
|
|
22
|
-
uniqueItems?: boolean;
|
|
23
|
-
properties?: Record<string, JSONSchema>;
|
|
24
|
-
required?: string[];
|
|
25
|
-
additionalProperties?: boolean | JSONSchema;
|
|
26
|
-
enum?: unknown[];
|
|
27
|
-
const?: unknown;
|
|
28
|
-
allOf?: JSONSchema[];
|
|
29
|
-
anyOf?: JSONSchema[];
|
|
30
|
-
oneOf?: JSONSchema[];
|
|
31
|
-
not?: JSONSchema;
|
|
32
|
-
$ref?: string;
|
|
33
|
-
$defs?: Record<string, JSONSchema>;
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
interface MCPToolDefinition {
|
|
37
|
-
name: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
inputSchema: JSONSchema;
|
|
40
|
-
outputSchema?: JSONSchema;
|
|
41
|
-
}
|
|
42
|
-
interface OpenAIToolDefinition {
|
|
43
|
-
type: 'function';
|
|
44
|
-
function: {
|
|
45
|
-
name: string;
|
|
46
|
-
description?: string;
|
|
47
|
-
parameters: JSONSchema;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
interface AnthropicToolDefinition {
|
|
51
|
-
name: string;
|
|
52
|
-
description?: string;
|
|
53
|
-
input_schema: JSONSchema;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/action-schema.d.ts
|
|
57
|
-
type ZodTypeAny = ZodType;
|
|
58
|
-
type SafeParseResult<T> = {
|
|
59
|
-
success: true;
|
|
60
|
-
data: T;
|
|
61
|
-
} | {
|
|
62
|
-
success: false;
|
|
63
|
-
error: z.ZodError;
|
|
64
|
-
};
|
|
65
|
-
interface DefineActionOptions<TSchema extends ZodRawShape> {
|
|
66
|
-
name: string;
|
|
67
|
-
description?: string;
|
|
68
|
-
parameters: ZodObject<TSchema>;
|
|
69
|
-
}
|
|
70
|
-
interface UnifiedAction<TPayload = unknown> {
|
|
71
|
-
readonly name: string;
|
|
72
|
-
readonly description?: string;
|
|
73
|
-
readonly zodSchema: ZodObject<ZodRawShape>;
|
|
74
|
-
readonly jsonSchema: JSONSchema;
|
|
75
|
-
validate: (payload: unknown) => TPayload;
|
|
76
|
-
safeParse: (payload: unknown) => SafeParseResult<TPayload>;
|
|
77
|
-
toJSONSchema: () => JSONSchema;
|
|
78
|
-
toMCP: () => MCPToolDefinition;
|
|
79
|
-
toOpenAI: () => OpenAIToolDefinition;
|
|
80
|
-
toAnthropic: () => AnthropicToolDefinition;
|
|
81
|
-
}
|
|
82
|
-
interface ActionSchemaMap {
|
|
83
|
-
[actionName: string]: UnifiedAction;
|
|
84
|
-
}
|
|
85
|
-
type InferActionPayloadMap<T extends ActionSchemaMap> = { [K in keyof T]: T[K] extends UnifiedAction<infer P> ? P : never; };
|
|
86
|
-
declare function zodToJsonSchema(schema: ZodTypeAny, zodModule: typeof z): JSONSchema;
|
|
87
|
-
declare function defineAction<TSchema extends ZodRawShape>(options: DefineActionOptions<TSchema>, zodModule: typeof z): UnifiedAction<z.infer<ZodObject<TSchema>>>;
|
|
88
|
-
declare function createActionSchema<T extends Record<string, UnifiedAction>>(actions: T): T & ActionSchemaMap;
|
|
89
|
-
declare function createActionFactory(zodModule: typeof z): <TSchema extends ZodRawShape>(options: DefineActionOptions<TSchema>) => UnifiedAction<z.infer<ZodObject<TSchema>>>;
|
|
90
|
-
//#endregion
|
|
91
1
|
//#region src/types.d.ts
|
|
92
2
|
type ActionPayloadMap = object;
|
|
93
|
-
interface
|
|
3
|
+
interface ActionSchemaLike {
|
|
4
|
+
safeParse(value: unknown): {
|
|
5
|
+
success: true;
|
|
6
|
+
data: unknown;
|
|
7
|
+
} | {
|
|
8
|
+
success: false;
|
|
9
|
+
error: {
|
|
10
|
+
message: string;
|
|
11
|
+
issues: readonly {
|
|
12
|
+
message: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface PipelineController<T = unknown, R = void> {
|
|
94
18
|
readonly signal?: AbortSignal;
|
|
95
19
|
abort(reason?: string): void;
|
|
96
20
|
modifyPayload(modifier: (payload: T) => T): void;
|
|
@@ -101,7 +25,7 @@ interface PipelineController<T = any, R = void> {
|
|
|
101
25
|
getResults(): R[];
|
|
102
26
|
mergeResult(merger: (previousResults: R[], currentResult: R) => R): void;
|
|
103
27
|
}
|
|
104
|
-
type ActionHandler<T =
|
|
28
|
+
type ActionHandler<T = unknown, R = void> = (payload: T, controller: PipelineController<T, R>) => R | Promise<R> | void | Promise<void>;
|
|
105
29
|
interface HandlerConfig<T = unknown> {
|
|
106
30
|
priority?: number;
|
|
107
31
|
id?: string;
|
|
@@ -113,13 +37,13 @@ interface HandlerConfig<T = unknown> {
|
|
|
113
37
|
cleanup?: () => void;
|
|
114
38
|
condition?: (payload: T) => boolean;
|
|
115
39
|
}
|
|
116
|
-
interface HandlerRegistration<T =
|
|
40
|
+
interface HandlerRegistration<T = unknown, R = void> {
|
|
117
41
|
handler: ActionHandler<T, R>;
|
|
118
42
|
config: Required<HandlerConfig<T>>;
|
|
119
43
|
id: string;
|
|
120
44
|
}
|
|
121
45
|
type ExecutionMode = 'sequential' | 'parallel' | 'race';
|
|
122
|
-
interface PipelineContext<T =
|
|
46
|
+
interface PipelineContext<T = unknown, R = void> {
|
|
123
47
|
action: string;
|
|
124
48
|
payload: T;
|
|
125
49
|
handlers: HandlerRegistration<T, R>[];
|
|
@@ -127,6 +51,7 @@ interface PipelineContext<T = any, R = void> {
|
|
|
127
51
|
deferOnceCleanup?: boolean;
|
|
128
52
|
signal?: AbortSignal;
|
|
129
53
|
trackHandlerPromise?<V>(promise: Promise<V>): Promise<V>;
|
|
54
|
+
collectedErrors?: HandlerError[];
|
|
130
55
|
aborted: boolean;
|
|
131
56
|
abortReason: string | undefined;
|
|
132
57
|
currentIndex: number;
|
|
@@ -147,7 +72,7 @@ interface ActionRegisterConfig {
|
|
|
147
72
|
useConcurrencyQueue?: boolean;
|
|
148
73
|
maxHandlersPerAction?: number;
|
|
149
74
|
errorHandler?: (error: Error, context: unknown) => void | Promise<void>;
|
|
150
|
-
schema?:
|
|
75
|
+
schema?: Record<string, ActionSchemaLike>;
|
|
151
76
|
validateOnDispatch?: boolean;
|
|
152
77
|
validationMode?: 'strict' | 'warn' | 'silent';
|
|
153
78
|
};
|
|
@@ -217,7 +142,7 @@ interface ExecutionResult<R = void> {
|
|
|
217
142
|
duration: number | undefined;
|
|
218
143
|
result: R | undefined;
|
|
219
144
|
error: Error | undefined;
|
|
220
|
-
metadata: Record<string,
|
|
145
|
+
metadata: Record<string, unknown> | undefined;
|
|
221
146
|
}>;
|
|
222
147
|
errors: HandlerError[];
|
|
223
148
|
}
|
|
@@ -228,8 +153,8 @@ interface HandlerError {
|
|
|
228
153
|
severity: 'blocking' | 'non-blocking';
|
|
229
154
|
}
|
|
230
155
|
type UnregisterFunction = () => void;
|
|
231
|
-
type VoidActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends
|
|
232
|
-
type PayloadActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends
|
|
156
|
+
type VoidActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends undefined | undefined ? K : never; }[keyof T];
|
|
157
|
+
type PayloadActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends undefined | undefined ? never : K; }[keyof T];
|
|
233
158
|
interface ActionDispatcher<T extends ActionPayloadMap> {
|
|
234
159
|
<K extends VoidActions<T>>(action: K, options?: DispatchOptions): Promise<void>;
|
|
235
160
|
<K extends VoidActions<T>>(action: K, payload?: undefined, options?: DispatchOptions): Promise<void>;
|
|
@@ -270,10 +195,8 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
270
195
|
private readonly isDebugMode;
|
|
271
196
|
private readonly maxHandlersPerAction;
|
|
272
197
|
private dispatchQueue?;
|
|
273
|
-
private filterCacheDisabled;
|
|
274
198
|
private handlerIdCounter;
|
|
275
199
|
private controllerPool;
|
|
276
|
-
private readonly maxControllerPoolSize;
|
|
277
200
|
private lifecycleState;
|
|
278
201
|
private readonly lifecycleController;
|
|
279
202
|
private readonly activeDispatches;
|
|
@@ -283,8 +206,8 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
283
206
|
private _actionsProxy?;
|
|
284
207
|
private _actionsWithResultProxy?;
|
|
285
208
|
constructor(config?: ActionRegisterConfig);
|
|
286
|
-
get actions(): { [K in keyof T]: T[K] extends void ? (
|
|
287
|
-
get actionsWithResult(): { [K in keyof T]: T[K] extends void ? (
|
|
209
|
+
get actions(): { [K in keyof T]: T[K] extends void ? (payload?: undefined, options?: DispatchOptions) => Promise<void> : (payload: T[K], options?: DispatchOptions) => Promise<void>; };
|
|
210
|
+
get actionsWithResult(): { [K in keyof T]: T[K] extends void ? (payload?: undefined, options?: DispatchOptions) => Promise<ExecutionResult<any>> : (payload: T[K], options?: DispatchOptions) => Promise<ExecutionResult<any>>; };
|
|
288
211
|
register<K extends keyof T, R = void>(action: K, handler: ActionHandler<T[K], R>, config?: HandlerConfig<T[K]>): UnregisterFunction;
|
|
289
212
|
private log;
|
|
290
213
|
private assertAcceptingWork;
|
|
@@ -309,9 +232,7 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
309
232
|
dispatchWithResult<K extends keyof T, R = void>(action: K, payload?: T[K], options?: DispatchOptions): Promise<ExecutionResult<R>>;
|
|
310
233
|
private _performDispatchWithResult;
|
|
311
234
|
private applyActionGuardControlsWithResult;
|
|
312
|
-
private generateFilterCacheKey;
|
|
313
235
|
private getControllerFromPool;
|
|
314
|
-
private returnControllerToPool;
|
|
315
236
|
private filterHandlers;
|
|
316
237
|
private processResults;
|
|
317
238
|
private executePipeline;
|
|
@@ -385,34 +306,6 @@ declare function executeSequential<T, R = void>(context: PipelineContext<T, R>,
|
|
|
385
306
|
declare function executeParallel<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>): Promise<void>;
|
|
386
307
|
declare function executeRace<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>): Promise<void>;
|
|
387
308
|
//#endregion
|
|
388
|
-
//#region src/react-helpers.d.ts
|
|
389
|
-
declare function createActionHandler<T extends ActionPayloadMap, K extends keyof T>(registry: ActionRegister<T>, action: K, handler: ActionHandler<T[K]>, config?: HandlerConfig<T[K]>): {
|
|
390
|
-
register: () => UnregisterFunction;
|
|
391
|
-
unregister: () => void;
|
|
392
|
-
registerWithCleanup: () => () => void;
|
|
393
|
-
config: Required<HandlerConfig<T[K]>>;
|
|
394
|
-
};
|
|
395
|
-
declare const ReactDevUtils: {
|
|
396
|
-
enableDebugMode(): void;
|
|
397
|
-
disableDebugMode(): void;
|
|
398
|
-
isDebugMode(): boolean;
|
|
399
|
-
log(component: string, action: string, message: string, data?: any): void;
|
|
400
|
-
getStats(registry: ActionRegister<any>): {
|
|
401
|
-
totalHandlers: number;
|
|
402
|
-
reactHandlers: number;
|
|
403
|
-
registryInfo: ReturnType<ActionRegister<any>["getRegistryInfo"]>;
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
declare class ReactActionError extends Error {
|
|
407
|
-
readonly action: string;
|
|
408
|
-
readonly payload?: any;
|
|
409
|
-
readonly handlerId: string | undefined;
|
|
410
|
-
readonly timestamp: number;
|
|
411
|
-
constructor(message: string, action: string, payload?: any, handlerId?: string | undefined, originalError?: Error);
|
|
412
|
-
static fromActionError(originalError: Error, action: string, payload?: any, handlerId?: string): ReactActionError;
|
|
413
|
-
}
|
|
414
|
-
declare function isReactActionError(error: any): error is ReactActionError;
|
|
415
|
-
//#endregion
|
|
416
309
|
//#region src/errors.d.ts
|
|
417
310
|
interface ZodIssueLike {
|
|
418
311
|
message: string;
|
|
@@ -452,5 +345,5 @@ declare function isActionValidationError(error: unknown): error is ActionValidat
|
|
|
452
345
|
declare function isActionTimeoutError(error: unknown): error is ActionTimeoutError;
|
|
453
346
|
declare function isActionRegisterDestroyedError(error: unknown): error is ActionRegisterDestroyedError;
|
|
454
347
|
//#endregion
|
|
455
|
-
export { type ActionDispatcher, ActionGuard, type ActionHandler, type ActionPayloadMap, ActionRegister, type ActionRegisterConfig, ActionRegisterDestroyedError, type
|
|
348
|
+
export { type ActionDispatcher, ActionGuard, type ActionHandler, type ActionPayloadMap, ActionRegister, type ActionRegisterConfig, ActionRegisterDestroyedError, type ActionSchemaLike, ActionTimeoutError, ActionValidationError, type DispatchOptions, type ExecutionMode, type ExecutionResult, type HandlerConfig, type HandlerRegistration, type PipelineContext, type PipelineController, type UnregisterFunction, executeParallel, executeRace, executeSequential, isActionRegisterDestroyedError, isActionTimeoutError, isActionValidationError };
|
|
456
349
|
//# sourceMappingURL=index.d.cts.map
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/execution-modes.ts","../src/errors.ts"],"mappings":";KAmBY;UASK;EACf,UAAU;IACJ;IAAe;;IAEf;IACA;MACE;MACA;QAAmB;;;;;UAgPZ,mBAAmB,aAAa;WAQtC,SAAS;EAGlB,MAAM;EAGN,cAAc,WAAW,SAAS,MAAM;EAGxC,cAAc;EA+Bd,eAAe;EAIf,OAAO,QAAQ;EAGf,UAAU,QAAQ;EAGlB,cAAc;EAGd,YAAY,SAAS,iBAAiB,KAAK,eAAe,MAAM;;KAoEtD,cAAc,aAAa,aACrC,SAAS,GACT,YAAY,mBAAmB,GAAG,OAC/B,IAAI,QAAQ,YAAY;UA6BZ,cAAc;EAE7B;EAGA;EAGA;EAGA;EAGA;EAGA;EAGA;EAGA;EAGA,aAAa,SAAS;;UAgBP,oBAAoB,aAAa;EAEhD,SAAS,cAAc,GAAG;EAG1B,QAAQ,SAAS,cAAc;EAG/B;;KA0BU;UAcK,gBAAgB,aAAa;EAE5C;EAGA,SAAS;EAGT,UAAU,oBAAoB,GAAG;EAGjC,mBAAmB,oBAAoB,GAAG;EAG1C;EAGA,SAAS;EAGT,qBAAqB,GAAG,SAAS,QAAQ,KAAK,QAAQ;EAGtD,kBAAkB;EAGlB;EAGA;EAGA;EAGA;EAGA;EAGA;EAGA,eAAe;EAGf,SAAS;EAGT;EAGA,mBAAmB;;UAkCJ;EAEf;EAGA;IAEE;IAGA;IAGA,uBAAuB;IAGvB;IAGA;IAGA,gBAAgB,OAAO,OAAO,4BAA4B;IAS1D,S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EAKtB;UAIQ;UAoEA;EAmBR;EAaA,gBAAgB;;;;UC1tER;EAER;EAGA,eAAe,OAAO;EAGtB,eAAe,OAAO;EAGtB;EAGA,iBAAiB;EAGjB,mBAAmB;;cA+BR;UACH;UACA;mBACS;mBACA;mBACA;mBAGA;UAET;EAEI,YAAA;UAKJ;UAWA;UAWA;UAYA;UA4EA;UAeA;EAsDF,SAAS,mBAAmB,qBAAqB;EAyEvD,SAAS,mBAAmB;EAsE5B,YAAY;EAyCZ;EAoCA,cAAc,oBAAoB;EAclC,qBAAqB,YAAY;EAYjC;EAYA;IAAc;IAAsB;;;;;iBCxchB,kBAAkB,GAAG,UACzC,SAAS,gBAAgB,GAAG,IAC5B,mBAAmB,cAAc,oBAAoB,GAAG,IAAI,kBAAkB,mBAAmB,GAAG,KACnG;iBA8LmB,gBAAgB,GAAG,UACvC,SAAS,gBAAgB,GAAG,IAC5B,mBAAmB,cAAc,oBAAoB,GAAG,IAAI,kBAAkB,mBAAmB,GAAG,KACnG;iBA+HmB,YAAY,GAAG,UACnC,SAAS,gBAAgB,GAAG,IAC5B,mBAAmB,cAAc,oBAAoB,GAAG,IAAI,kBAAkB,mBAAmB,GAAG,KACnG;;;UC3Xc;EACf;EACA;EACA;;cAqCW,8BAA8B;EAEhC;WAGO;EAMJ,YAAA,gBAAgB;WAiBZ;MAKZ,mBAAmB;MAenB;MAeA;MAeA;MAOA;EASJ;;;;;;;cAgBW,2BAA2B;WAIpB;WACA;EAJT;EAGS,YAAA,gBACA;;cAQP,qCAAqC;WAI9B;WACA;EAJT;EAGS,YAAA,sBACA;;iBAcJ,wBACd,iBACC,SAAS;iBAKI,qBACd,iBACC,SAAS;iBAKI,+BACd,iBACC,SAAS"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,96 +1,20 @@
|
|
|
1
|
-
import { ZodObject, ZodRawShape, ZodType, z } from "zod";
|
|
2
|
-
//#region src/json-schema.d.ts
|
|
3
|
-
type JSONSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'array' | 'object' | 'null';
|
|
4
|
-
interface JSONSchema {
|
|
5
|
-
type?: JSONSchemaType | JSONSchemaType[];
|
|
6
|
-
title?: string;
|
|
7
|
-
description?: string;
|
|
8
|
-
default?: unknown;
|
|
9
|
-
examples?: unknown[];
|
|
10
|
-
minLength?: number;
|
|
11
|
-
maxLength?: number;
|
|
12
|
-
pattern?: string;
|
|
13
|
-
format?: string;
|
|
14
|
-
minimum?: number;
|
|
15
|
-
maximum?: number;
|
|
16
|
-
exclusiveMinimum?: number;
|
|
17
|
-
exclusiveMaximum?: number;
|
|
18
|
-
multipleOf?: number;
|
|
19
|
-
items?: JSONSchema;
|
|
20
|
-
minItems?: number;
|
|
21
|
-
maxItems?: number;
|
|
22
|
-
uniqueItems?: boolean;
|
|
23
|
-
properties?: Record<string, JSONSchema>;
|
|
24
|
-
required?: string[];
|
|
25
|
-
additionalProperties?: boolean | JSONSchema;
|
|
26
|
-
enum?: unknown[];
|
|
27
|
-
const?: unknown;
|
|
28
|
-
allOf?: JSONSchema[];
|
|
29
|
-
anyOf?: JSONSchema[];
|
|
30
|
-
oneOf?: JSONSchema[];
|
|
31
|
-
not?: JSONSchema;
|
|
32
|
-
$ref?: string;
|
|
33
|
-
$defs?: Record<string, JSONSchema>;
|
|
34
|
-
[key: string]: unknown;
|
|
35
|
-
}
|
|
36
|
-
interface MCPToolDefinition {
|
|
37
|
-
name: string;
|
|
38
|
-
description?: string;
|
|
39
|
-
inputSchema: JSONSchema;
|
|
40
|
-
outputSchema?: JSONSchema;
|
|
41
|
-
}
|
|
42
|
-
interface OpenAIToolDefinition {
|
|
43
|
-
type: 'function';
|
|
44
|
-
function: {
|
|
45
|
-
name: string;
|
|
46
|
-
description?: string;
|
|
47
|
-
parameters: JSONSchema;
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
interface AnthropicToolDefinition {
|
|
51
|
-
name: string;
|
|
52
|
-
description?: string;
|
|
53
|
-
input_schema: JSONSchema;
|
|
54
|
-
}
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/action-schema.d.ts
|
|
57
|
-
type ZodTypeAny = ZodType;
|
|
58
|
-
type SafeParseResult<T> = {
|
|
59
|
-
success: true;
|
|
60
|
-
data: T;
|
|
61
|
-
} | {
|
|
62
|
-
success: false;
|
|
63
|
-
error: z.ZodError;
|
|
64
|
-
};
|
|
65
|
-
interface DefineActionOptions<TSchema extends ZodRawShape> {
|
|
66
|
-
name: string;
|
|
67
|
-
description?: string;
|
|
68
|
-
parameters: ZodObject<TSchema>;
|
|
69
|
-
}
|
|
70
|
-
interface UnifiedAction<TPayload = unknown> {
|
|
71
|
-
readonly name: string;
|
|
72
|
-
readonly description?: string;
|
|
73
|
-
readonly zodSchema: ZodObject<ZodRawShape>;
|
|
74
|
-
readonly jsonSchema: JSONSchema;
|
|
75
|
-
validate: (payload: unknown) => TPayload;
|
|
76
|
-
safeParse: (payload: unknown) => SafeParseResult<TPayload>;
|
|
77
|
-
toJSONSchema: () => JSONSchema;
|
|
78
|
-
toMCP: () => MCPToolDefinition;
|
|
79
|
-
toOpenAI: () => OpenAIToolDefinition;
|
|
80
|
-
toAnthropic: () => AnthropicToolDefinition;
|
|
81
|
-
}
|
|
82
|
-
interface ActionSchemaMap {
|
|
83
|
-
[actionName: string]: UnifiedAction;
|
|
84
|
-
}
|
|
85
|
-
type InferActionPayloadMap<T extends ActionSchemaMap> = { [K in keyof T]: T[K] extends UnifiedAction<infer P> ? P : never; };
|
|
86
|
-
declare function zodToJsonSchema(schema: ZodTypeAny, zodModule: typeof z): JSONSchema;
|
|
87
|
-
declare function defineAction<TSchema extends ZodRawShape>(options: DefineActionOptions<TSchema>, zodModule: typeof z): UnifiedAction<z.infer<ZodObject<TSchema>>>;
|
|
88
|
-
declare function createActionSchema<T extends Record<string, UnifiedAction>>(actions: T): T & ActionSchemaMap;
|
|
89
|
-
declare function createActionFactory(zodModule: typeof z): <TSchema extends ZodRawShape>(options: DefineActionOptions<TSchema>) => UnifiedAction<z.infer<ZodObject<TSchema>>>;
|
|
90
|
-
//#endregion
|
|
91
1
|
//#region src/types.d.ts
|
|
92
2
|
type ActionPayloadMap = object;
|
|
93
|
-
interface
|
|
3
|
+
interface ActionSchemaLike {
|
|
4
|
+
safeParse(value: unknown): {
|
|
5
|
+
success: true;
|
|
6
|
+
data: unknown;
|
|
7
|
+
} | {
|
|
8
|
+
success: false;
|
|
9
|
+
error: {
|
|
10
|
+
message: string;
|
|
11
|
+
issues: readonly {
|
|
12
|
+
message: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
interface PipelineController<T = unknown, R = void> {
|
|
94
18
|
readonly signal?: AbortSignal;
|
|
95
19
|
abort(reason?: string): void;
|
|
96
20
|
modifyPayload(modifier: (payload: T) => T): void;
|
|
@@ -101,7 +25,7 @@ interface PipelineController<T = any, R = void> {
|
|
|
101
25
|
getResults(): R[];
|
|
102
26
|
mergeResult(merger: (previousResults: R[], currentResult: R) => R): void;
|
|
103
27
|
}
|
|
104
|
-
type ActionHandler<T =
|
|
28
|
+
type ActionHandler<T = unknown, R = void> = (payload: T, controller: PipelineController<T, R>) => R | Promise<R> | void | Promise<void>;
|
|
105
29
|
interface HandlerConfig<T = unknown> {
|
|
106
30
|
priority?: number;
|
|
107
31
|
id?: string;
|
|
@@ -113,13 +37,13 @@ interface HandlerConfig<T = unknown> {
|
|
|
113
37
|
cleanup?: () => void;
|
|
114
38
|
condition?: (payload: T) => boolean;
|
|
115
39
|
}
|
|
116
|
-
interface HandlerRegistration<T =
|
|
40
|
+
interface HandlerRegistration<T = unknown, R = void> {
|
|
117
41
|
handler: ActionHandler<T, R>;
|
|
118
42
|
config: Required<HandlerConfig<T>>;
|
|
119
43
|
id: string;
|
|
120
44
|
}
|
|
121
45
|
type ExecutionMode = 'sequential' | 'parallel' | 'race';
|
|
122
|
-
interface PipelineContext<T =
|
|
46
|
+
interface PipelineContext<T = unknown, R = void> {
|
|
123
47
|
action: string;
|
|
124
48
|
payload: T;
|
|
125
49
|
handlers: HandlerRegistration<T, R>[];
|
|
@@ -127,6 +51,7 @@ interface PipelineContext<T = any, R = void> {
|
|
|
127
51
|
deferOnceCleanup?: boolean;
|
|
128
52
|
signal?: AbortSignal;
|
|
129
53
|
trackHandlerPromise?<V>(promise: Promise<V>): Promise<V>;
|
|
54
|
+
collectedErrors?: HandlerError[];
|
|
130
55
|
aborted: boolean;
|
|
131
56
|
abortReason: string | undefined;
|
|
132
57
|
currentIndex: number;
|
|
@@ -147,7 +72,7 @@ interface ActionRegisterConfig {
|
|
|
147
72
|
useConcurrencyQueue?: boolean;
|
|
148
73
|
maxHandlersPerAction?: number;
|
|
149
74
|
errorHandler?: (error: Error, context: unknown) => void | Promise<void>;
|
|
150
|
-
schema?:
|
|
75
|
+
schema?: Record<string, ActionSchemaLike>;
|
|
151
76
|
validateOnDispatch?: boolean;
|
|
152
77
|
validationMode?: 'strict' | 'warn' | 'silent';
|
|
153
78
|
};
|
|
@@ -217,7 +142,7 @@ interface ExecutionResult<R = void> {
|
|
|
217
142
|
duration: number | undefined;
|
|
218
143
|
result: R | undefined;
|
|
219
144
|
error: Error | undefined;
|
|
220
|
-
metadata: Record<string,
|
|
145
|
+
metadata: Record<string, unknown> | undefined;
|
|
221
146
|
}>;
|
|
222
147
|
errors: HandlerError[];
|
|
223
148
|
}
|
|
@@ -228,8 +153,8 @@ interface HandlerError {
|
|
|
228
153
|
severity: 'blocking' | 'non-blocking';
|
|
229
154
|
}
|
|
230
155
|
type UnregisterFunction = () => void;
|
|
231
|
-
type VoidActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends
|
|
232
|
-
type PayloadActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends
|
|
156
|
+
type VoidActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends undefined | undefined ? K : never; }[keyof T];
|
|
157
|
+
type PayloadActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends undefined | undefined ? never : K; }[keyof T];
|
|
233
158
|
interface ActionDispatcher<T extends ActionPayloadMap> {
|
|
234
159
|
<K extends VoidActions<T>>(action: K, options?: DispatchOptions): Promise<void>;
|
|
235
160
|
<K extends VoidActions<T>>(action: K, payload?: undefined, options?: DispatchOptions): Promise<void>;
|
|
@@ -270,10 +195,8 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
270
195
|
private readonly isDebugMode;
|
|
271
196
|
private readonly maxHandlersPerAction;
|
|
272
197
|
private dispatchQueue?;
|
|
273
|
-
private filterCacheDisabled;
|
|
274
198
|
private handlerIdCounter;
|
|
275
199
|
private controllerPool;
|
|
276
|
-
private readonly maxControllerPoolSize;
|
|
277
200
|
private lifecycleState;
|
|
278
201
|
private readonly lifecycleController;
|
|
279
202
|
private readonly activeDispatches;
|
|
@@ -283,8 +206,8 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
283
206
|
private _actionsProxy?;
|
|
284
207
|
private _actionsWithResultProxy?;
|
|
285
208
|
constructor(config?: ActionRegisterConfig);
|
|
286
|
-
get actions(): { [K in keyof T]: T[K] extends void ? (
|
|
287
|
-
get actionsWithResult(): { [K in keyof T]: T[K] extends void ? (
|
|
209
|
+
get actions(): { [K in keyof T]: T[K] extends void ? (payload?: undefined, options?: DispatchOptions) => Promise<void> : (payload: T[K], options?: DispatchOptions) => Promise<void>; };
|
|
210
|
+
get actionsWithResult(): { [K in keyof T]: T[K] extends void ? (payload?: undefined, options?: DispatchOptions) => Promise<ExecutionResult<any>> : (payload: T[K], options?: DispatchOptions) => Promise<ExecutionResult<any>>; };
|
|
288
211
|
register<K extends keyof T, R = void>(action: K, handler: ActionHandler<T[K], R>, config?: HandlerConfig<T[K]>): UnregisterFunction;
|
|
289
212
|
private log;
|
|
290
213
|
private assertAcceptingWork;
|
|
@@ -309,9 +232,7 @@ declare class ActionRegister<T extends ActionPayloadMap = Record<string, unknown
|
|
|
309
232
|
dispatchWithResult<K extends keyof T, R = void>(action: K, payload?: T[K], options?: DispatchOptions): Promise<ExecutionResult<R>>;
|
|
310
233
|
private _performDispatchWithResult;
|
|
311
234
|
private applyActionGuardControlsWithResult;
|
|
312
|
-
private generateFilterCacheKey;
|
|
313
235
|
private getControllerFromPool;
|
|
314
|
-
private returnControllerToPool;
|
|
315
236
|
private filterHandlers;
|
|
316
237
|
private processResults;
|
|
317
238
|
private executePipeline;
|
|
@@ -385,34 +306,6 @@ declare function executeSequential<T, R = void>(context: PipelineContext<T, R>,
|
|
|
385
306
|
declare function executeParallel<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>): Promise<void>;
|
|
386
307
|
declare function executeRace<T, R = void>(context: PipelineContext<T, R>, createController: (registration: HandlerRegistration<T, R>, index: number) => PipelineController<T, R>): Promise<void>;
|
|
387
308
|
//#endregion
|
|
388
|
-
//#region src/react-helpers.d.ts
|
|
389
|
-
declare function createActionHandler<T extends ActionPayloadMap, K extends keyof T>(registry: ActionRegister<T>, action: K, handler: ActionHandler<T[K]>, config?: HandlerConfig<T[K]>): {
|
|
390
|
-
register: () => UnregisterFunction;
|
|
391
|
-
unregister: () => void;
|
|
392
|
-
registerWithCleanup: () => () => void;
|
|
393
|
-
config: Required<HandlerConfig<T[K]>>;
|
|
394
|
-
};
|
|
395
|
-
declare const ReactDevUtils: {
|
|
396
|
-
enableDebugMode(): void;
|
|
397
|
-
disableDebugMode(): void;
|
|
398
|
-
isDebugMode(): boolean;
|
|
399
|
-
log(component: string, action: string, message: string, data?: any): void;
|
|
400
|
-
getStats(registry: ActionRegister<any>): {
|
|
401
|
-
totalHandlers: number;
|
|
402
|
-
reactHandlers: number;
|
|
403
|
-
registryInfo: ReturnType<ActionRegister<any>["getRegistryInfo"]>;
|
|
404
|
-
};
|
|
405
|
-
};
|
|
406
|
-
declare class ReactActionError extends Error {
|
|
407
|
-
readonly action: string;
|
|
408
|
-
readonly payload?: any;
|
|
409
|
-
readonly handlerId: string | undefined;
|
|
410
|
-
readonly timestamp: number;
|
|
411
|
-
constructor(message: string, action: string, payload?: any, handlerId?: string | undefined, originalError?: Error);
|
|
412
|
-
static fromActionError(originalError: Error, action: string, payload?: any, handlerId?: string): ReactActionError;
|
|
413
|
-
}
|
|
414
|
-
declare function isReactActionError(error: any): error is ReactActionError;
|
|
415
|
-
//#endregion
|
|
416
309
|
//#region src/errors.d.ts
|
|
417
310
|
interface ZodIssueLike {
|
|
418
311
|
message: string;
|
|
@@ -452,5 +345,5 @@ declare function isActionValidationError(error: unknown): error is ActionValidat
|
|
|
452
345
|
declare function isActionTimeoutError(error: unknown): error is ActionTimeoutError;
|
|
453
346
|
declare function isActionRegisterDestroyedError(error: unknown): error is ActionRegisterDestroyedError;
|
|
454
347
|
//#endregion
|
|
455
|
-
export { type ActionDispatcher, ActionGuard, type ActionHandler, type ActionPayloadMap, ActionRegister, type ActionRegisterConfig, ActionRegisterDestroyedError, type
|
|
348
|
+
export { type ActionDispatcher, ActionGuard, type ActionHandler, type ActionPayloadMap, ActionRegister, type ActionRegisterConfig, ActionRegisterDestroyedError, type ActionSchemaLike, ActionTimeoutError, ActionValidationError, type DispatchOptions, type ExecutionMode, type ExecutionResult, type HandlerConfig, type HandlerRegistration, type PipelineContext, type PipelineController, type UnregisterFunction, executeParallel, executeRace, executeSequential, isActionRegisterDestroyedError, isActionTimeoutError, isActionValidationError };
|
|
456
349
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/execution-modes.ts","../src/errors.ts"],"mappings":";KAmBY;UASK;EACf,UAAU;IACJ;IAAe;;IAEf;IACA;MACE;MACA;QAAmB;;;;;UAgPZ,mBAAmB,aAAa;WAQtC,SAAS;EAGlB,MA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