@context-action/core 0.8.8 → 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/README.md CHANGED
@@ -53,6 +53,23 @@ await actions.dispatch('increment');
53
53
  await actions.dispatch('setCount', 42);
54
54
  ```
55
55
 
56
+ ## Tool protocol boundary
57
+
58
+ MCP, JSON Schema, provider conversion, action schemas, and approval queues are
59
+ owned by [`@context-action/tool-protocol`](../tool-protocol/README.md). Core
60
+ only owns action registration and execution. This keeps the runtime usable
61
+ without a tool-calling or Zod dependency.
62
+
63
+ Install the protocol package separately when an integration needs it:
64
+
65
+ ```bash
66
+ npm install @context-action/tool-protocol zod
67
+ ```
68
+
69
+ The React-facing registry remains in `@context-action/react`; protocol symbols
70
+ such as `defineAction`, `listAllTools`, and `ToolManagementInterface` must be
71
+ imported from `@context-action/tool-protocol`.
72
+
56
73
  ## 🌟 Vanilla JavaScript Support
57
74
 
58
75
  **@context-action/core works perfectly with vanilla JavaScript!** No React, Vue, or any framework required.
package/dist/index.cjs CHANGED
@@ -105,7 +105,6 @@ async function executeSequential(context, createController) {
105
105
  }
106
106
  i = jumpIndex;
107
107
  context.jumpToPriority = void 0;
108
- continue;
109
108
  } else {
110
109
  context.jumpToPriority = void 0;
111
110
  i++;
@@ -986,55 +985,6 @@ function isActionRegisterDestroyedError(error) {
986
985
 
987
986
  //#endregion
988
987
  //#region src/ActionRegister.ts
989
- const dispatchOptionKeys = /* @__PURE__ */ new Set([
990
- "autoAbort",
991
- "debounce",
992
- "executionMode",
993
- "filter",
994
- "immediate",
995
- "queuePriority",
996
- "result",
997
- "retryOnError",
998
- "signal",
999
- "throttle",
1000
- "timeout"
1001
- ]);
1002
- function isRecord(value) {
1003
- return value !== null && typeof value === "object" && !Array.isArray(value);
1004
- }
1005
- function isOptionalNumber(value) {
1006
- return value === void 0 || typeof value === "number";
1007
- }
1008
- function isOptionalBoolean(value) {
1009
- return value === void 0 || typeof value === "boolean";
1010
- }
1011
- /**
1012
- * Recognize the deprecated options-first void-action proxy call.
1013
- *
1014
- * Every supplied field is validated so ordinary payloads that merely overlap
1015
- * one option name are not silently reinterpreted as dispatch options.
1016
- */
1017
- function isDispatchOptions(value) {
1018
- if (!isRecord(value)) return false;
1019
- const keys = Object.keys(value);
1020
- if (keys.length === 0 || keys.some((key) => !dispatchOptionKeys.has(key))) return false;
1021
- return keys.every((key) => {
1022
- const optionValue = value[key];
1023
- switch (key) {
1024
- case "debounce":
1025
- case "queuePriority":
1026
- case "throttle":
1027
- case "timeout": return isOptionalNumber(optionValue);
1028
- case "immediate": return isOptionalBoolean(optionValue);
1029
- case "executionMode": return optionValue === void 0 || optionValue === "sequential" || optionValue === "parallel" || optionValue === "race";
1030
- case "signal": return optionValue === void 0 || isRecord(optionValue) && typeof optionValue.aborted === "boolean" && typeof optionValue.addEventListener === "function";
1031
- case "retryOnError": return optionValue === void 0 || isRecord(optionValue) && typeof optionValue.maxAttempts === "number" && typeof optionValue.delay === "number";
1032
- case "autoAbort": return optionValue === void 0 || isRecord(optionValue) && typeof optionValue.enabled === "boolean" && isOptionalBoolean(optionValue.allowHandlerAbort) && (optionValue.onControllerCreated === void 0 || typeof optionValue.onControllerCreated === "function");
1033
- case "filter": return optionValue === void 0 || isRecord(optionValue) && (optionValue.handlerIds === void 0 || Array.isArray(optionValue.handlerIds) && optionValue.handlerIds.every((item) => typeof item === "string")) && (optionValue.excludeHandlerIds === void 0 || Array.isArray(optionValue.excludeHandlerIds) && optionValue.excludeHandlerIds.every((item) => typeof item === "string")) && (optionValue.priority === void 0 || isRecord(optionValue.priority)) && (optionValue.custom === void 0 || typeof optionValue.custom === "function");
1034
- case "result": return optionValue === void 0 || isRecord(optionValue) && (optionValue.strategy === void 0 || optionValue.strategy === "first" || optionValue.strategy === "last" || optionValue.strategy === "all" || optionValue.strategy === "merge" || optionValue.strategy === "custom") && (optionValue.merger === void 0 || typeof optionValue.merger === "function") && isOptionalBoolean(optionValue.collect) && isOptionalNumber(optionValue.maxResults) && isOptionalBoolean(optionValue.includeErrors);
1035
- }
1036
- });
1037
- }
1038
988
  /**
1039
989
  * Action Register for managing action handlers with priority-based execution
1040
990
  *
@@ -1057,10 +1007,8 @@ var ActionRegister = class {
1057
1007
  this.actionExecutionModes = /* @__PURE__ */ new Map();
1058
1008
  this.unregisterFunctions = /* @__PURE__ */ new Map();
1059
1009
  this.lastRegisteredTimestamps = /* @__PURE__ */ new Map();
1060
- this.filterCacheDisabled = true;
1061
1010
  this.handlerIdCounter = 0;
1062
1011
  this.controllerPool = [];
1063
- this.maxControllerPoolSize = 10;
1064
1012
  this.lifecycleState = "active";
1065
1013
  this.lifecycleController = new AbortController();
1066
1014
  this.activeDispatches = /* @__PURE__ */ new Set();
@@ -1098,7 +1046,6 @@ var ActionRegister = class {
1098
1046
  * // Function-based dispatching
1099
1047
  * await registry.actions.userLogin({ userId: '123', email: 'test@example.com' });
1100
1048
  * await registry.actions.resetApp();
1101
- * await registry.actions.resetApp({ debounce: 100 }); // Legacy options-first form
1102
1049
  * await registry.actions.resetApp(undefined, { debounce: 100 });
1103
1050
  * ```
1104
1051
  *
@@ -1107,9 +1054,8 @@ var ActionRegister = class {
1107
1054
  get actions() {
1108
1055
  if (!this._actionsProxy) this._actionsProxy = new Proxy({}, { get: (_target, prop) => {
1109
1056
  const actionKey = prop;
1110
- if (typeof prop === "string" && this.pipelines.has(actionKey)) return (payloadOrOptions, options) => {
1111
- if (isDispatchOptions(payloadOrOptions)) return this.dispatch(actionKey, void 0, payloadOrOptions);
1112
- return this.dispatch(actionKey, payloadOrOptions, options);
1057
+ if (typeof prop === "string" && this.pipelines.has(actionKey)) return (payload, options) => {
1058
+ return this.dispatch(actionKey, payload, options);
1113
1059
  };
1114
1060
  } });
1115
1061
  return this._actionsProxy;
@@ -1144,9 +1090,8 @@ var ActionRegister = class {
1144
1090
  get actionsWithResult() {
1145
1091
  if (!this._actionsWithResultProxy) this._actionsWithResultProxy = new Proxy({}, { get: (_target, prop) => {
1146
1092
  const actionKey = prop;
1147
- if (typeof prop === "string" && this.pipelines.has(actionKey)) return (payloadOrOptions, options) => {
1148
- if (isDispatchOptions(payloadOrOptions)) return this.dispatchWithResult(actionKey, void 0, payloadOrOptions);
1149
- return this.dispatchWithResult(actionKey, payloadOrOptions, options);
1093
+ if (typeof prop === "string" && this.pipelines.has(actionKey)) return (payload, options) => {
1094
+ return this.dispatchWithResult(actionKey, payload, options);
1150
1095
  };
1151
1096
  } });
1152
1097
  return this._actionsWithResultProxy;
@@ -1279,7 +1224,7 @@ var ActionRegister = class {
1279
1224
  const existing = pipeline[existingIndex];
1280
1225
  const existingUnregister = this.unregisterFunctions.get(handlerId);
1281
1226
  if (registration.config.replaceExisting) {
1282
- if (existing && existing.config.cleanup && typeof existing.config.cleanup === "function") try {
1227
+ if (existing?.config.cleanup && typeof existing.config.cleanup === "function") try {
1283
1228
  existing.config.cleanup();
1284
1229
  } catch (cleanupError) {
1285
1230
  this.log(`Cleanup error for replaced handler: ${String(action)}`, cleanupError, "warn");
@@ -1950,21 +1895,6 @@ var ActionRegister = class {
1950
1895
  return null;
1951
1896
  }
1952
1897
  /**
1953
- * 🔧 Generate optimized cache key for filter options
1954
- */
1955
- generateFilterCacheKey(filterOptions) {
1956
- if (!filterOptions) return "no-filter";
1957
- const parts = [];
1958
- if (filterOptions.handlerIds?.length) parts.push(`h:${filterOptions.handlerIds.slice().sort().join(",")}`);
1959
- if (filterOptions.excludeHandlerIds?.length) parts.push(`e:${filterOptions.excludeHandlerIds.slice().sort().join(",")}`);
1960
- if (filterOptions.priority) {
1961
- const { min, max } = filterOptions.priority;
1962
- if (min !== void 0 || max !== void 0) parts.push(`p:${min ?? "*"}-${max ?? "*"}`);
1963
- }
1964
- if (filterOptions.custom) return "custom-" + Date.now() + Math.random();
1965
- return parts.length > 0 ? parts.join("|") : "no-filter";
1966
- }
1967
- /**
1968
1898
  * 🔧 Create or reuse PipelineController from pool for better performance
1969
1899
  */
1970
1900
  getControllerFromPool(context, autoAbortController, autoAbortOptions) {
@@ -2004,12 +1934,6 @@ var ActionRegister = class {
2004
1934
  };
2005
1935
  return controller;
2006
1936
  }
2007
- /**
2008
- * 🔧 Return controller to pool for reuse
2009
- */
2010
- returnControllerToPool(controller) {
2011
- if (this.controllerPool.length < this.maxControllerPoolSize) this.controllerPool.push(controller);
2012
- }
2013
1937
  filterHandlers(handlers, filterOptions) {
2014
1938
  if (!filterOptions) return handlers;
2015
1939
  const handlerIdSet = filterOptions.handlerIds ? new Set(filterOptions.handlerIds) : null;
@@ -2017,7 +1941,7 @@ var ActionRegister = class {
2017
1941
  return handlers.filter((registration) => {
2018
1942
  const config = registration.config;
2019
1943
  if (handlerIdSet && !handlerIdSet.has(config.id)) return false;
2020
- if (excludeIdSet && excludeIdSet.has(config.id)) return false;
1944
+ if (excludeIdSet?.has(config.id)) return false;
2021
1945
  if (filterOptions.priority) {
2022
1946
  const priority = config.priority;
2023
1947
  if (filterOptions.priority.min !== void 0 && priority < filterOptions.priority.min) return false;
@@ -2300,7 +2224,7 @@ var ActionRegister = class {
2300
2224
  removeRegistration(action, registration, runCleanup = true) {
2301
2225
  const pipeline = this.pipelines.get(action);
2302
2226
  if (!pipeline) return false;
2303
- const index = pipeline.findIndex((candidate) => candidate === registration);
2227
+ const index = pipeline.indexOf(registration);
2304
2228
  if (index === -1) return false;
2305
2229
  pipeline.splice(index, 1);
2306
2230
  this.unregisterFunctions.delete(registration.id);
@@ -2593,7 +2517,7 @@ var ReactActionError = class ReactActionError extends Error {
2593
2517
  this.payload = payload;
2594
2518
  this.handlerId = handlerId;
2595
2519
  this.timestamp = Date.now();
2596
- if (originalError && originalError.stack) this.stack = originalError.stack;
2520
+ if (originalError?.stack) this.stack = originalError.stack;
2597
2521
  }
2598
2522
  /**
2599
2523
  * Create a React Error Boundary compatible error
@@ -2612,141 +2536,6 @@ function isReactActionError(error) {
2612
2536
  return error instanceof ReactActionError;
2613
2537
  }
2614
2538
 
2615
- //#endregion
2616
- //#region src/action-schema.ts
2617
- /**
2618
- * Zod 스키마를 JSON Schema로 변환 (Zod 4 네이티브 API)
2619
- *
2620
- * @param schema - Zod 스키마
2621
- * @returns JSON Schema (draft-7)
2622
- */
2623
- function zodToJsonSchema(schema, zodModule) {
2624
- return zodModule.toJSONSchema(schema, {
2625
- target: "draft-7",
2626
- metadata: zodModule.globalRegistry
2627
- });
2628
- }
2629
- /**
2630
- * Zod 스키마 기반 Action 정의
2631
- *
2632
- * defineTool 패턴을 기반으로 context-action에 맞게 구현:
2633
- * - Single Source of Truth: Zod 스키마로 타입 + 검증 + 메타데이터 통합
2634
- * - 런타임 검증: validate(), safeParse()
2635
- * - Tool Chain 호환: toMCP(), toOpenAI(), toAnthropic()
2636
- *
2637
- * @param options - Action 정의 옵션
2638
- * @param zodModule - Zod 모듈 (peerDependency로 주입)
2639
- * @returns UnifiedAction 인스턴스
2640
- *
2641
- * @example
2642
- * ```typescript
2643
- * import { z } from 'zod';
2644
- * import { defineAction } from '@context-action/core';
2645
- *
2646
- * const updateUserAction = defineAction({
2647
- * name: 'updateUser',
2648
- * description: 'Update user profile',
2649
- * parameters: z.object({
2650
- * id: z.string().min(1).meta({ description: 'User ID' }),
2651
- * name: z.string().min(2).max(50).meta({ description: 'User name' }),
2652
- * email: z.string().email().optional(),
2653
- * }),
2654
- * }, z);
2655
- *
2656
- * // 검증
2657
- * const validated = updateUserAction.validate({ id: '123', name: 'John' });
2658
- *
2659
- * // Tool chain 변환
2660
- * const mcpTool = updateUserAction.toMCP();
2661
- * ```
2662
- */
2663
- function defineAction(options, zodModule) {
2664
- const { name, description, parameters } = options;
2665
- const jsonSchema = zodToJsonSchema(parameters, zodModule);
2666
- return {
2667
- name,
2668
- description,
2669
- zodSchema: parameters,
2670
- jsonSchema,
2671
- validate: (payload) => {
2672
- return parameters.parse(payload);
2673
- },
2674
- safeParse: (payload) => {
2675
- return parameters.safeParse(payload);
2676
- },
2677
- toJSONSchema: () => jsonSchema,
2678
- toMCP: () => ({
2679
- name,
2680
- description,
2681
- inputSchema: jsonSchema
2682
- }),
2683
- toOpenAI: () => ({
2684
- type: "function",
2685
- function: {
2686
- name,
2687
- description,
2688
- parameters: {
2689
- type: "object",
2690
- properties: jsonSchema.properties ?? {},
2691
- required: jsonSchema.required
2692
- }
2693
- }
2694
- }),
2695
- toAnthropic: () => ({
2696
- name,
2697
- description,
2698
- input_schema: jsonSchema
2699
- })
2700
- };
2701
- }
2702
- /**
2703
- * 다중 Action 스키마 생성
2704
- *
2705
- * 여러 defineAction을 묶어서 ActionSchemaMap 생성
2706
- *
2707
- * @param actions - UnifiedAction 맵
2708
- * @returns ActionSchemaMap
2709
- *
2710
- * @example
2711
- * ```typescript
2712
- * const userActionSchema = createActionSchema({
2713
- * updateUser: defineAction({ ... }, z),
2714
- * deleteUser: defineAction({ ... }, z),
2715
- * });
2716
- *
2717
- * type UserActions = InferActionPayloadMap<typeof userActionSchema>;
2718
- * ```
2719
- */
2720
- function createActionSchema(actions) {
2721
- return actions;
2722
- }
2723
- /**
2724
- * Zod 모듈을 바인딩한 defineAction 팩토리 생성
2725
- *
2726
- * 매번 z 모듈을 전달하지 않아도 되도록 팩토리 패턴 제공
2727
- *
2728
- * @param zodModule - Zod 모듈
2729
- * @returns defineAction 함수 (z 바인딩됨)
2730
- *
2731
- * @example
2732
- * ```typescript
2733
- * import { z } from 'zod';
2734
- * import { createActionFactory } from '@context-action/core';
2735
- *
2736
- * const defineAction = createActionFactory(z);
2737
- *
2738
- * const updateUser = defineAction({
2739
- * name: 'updateUser',
2740
- * parameters: z.object({ id: z.string() }),
2741
- * });
2742
- * ```
2743
- */
2744
- function createActionFactory(zodModule) {
2745
- return (options) => {
2746
- return defineAction(options, zodModule);
2747
- };
2748
- }
2749
-
2750
2539
  //#endregion
2751
2540
  exports.ActionGuard = ActionGuard;
2752
2541
  exports.ActionRegister = ActionRegister;
@@ -2755,15 +2544,11 @@ exports.ActionTimeoutError = ActionTimeoutError;
2755
2544
  exports.ActionValidationError = ActionValidationError;
2756
2545
  exports.ReactActionError = ReactActionError;
2757
2546
  exports.ReactDevUtils = ReactDevUtils;
2758
- exports.createActionFactory = createActionFactory;
2759
2547
  exports.createActionHandler = createActionHandler;
2760
- exports.createActionSchema = createActionSchema;
2761
- exports.defineAction = defineAction;
2762
2548
  exports.executeParallel = executeParallel;
2763
2549
  exports.executeRace = executeRace;
2764
2550
  exports.executeSequential = executeSequential;
2765
2551
  exports.isActionRegisterDestroyedError = isActionRegisterDestroyedError;
2766
2552
  exports.isActionTimeoutError = isActionTimeoutError;
2767
2553
  exports.isActionValidationError = isActionValidationError;
2768
- exports.isReactActionError = isReactActionError;
2769
- exports.zodToJsonSchema = zodToJsonSchema;
2554
+ exports.isReactActionError = isReactActionError;
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 PipelineController<T = any, R = void> {
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 = any, R = void> = (payload: T, controller: PipelineController<T, R>) => R | Promise<R> | void | Promise<void>;
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 = any, R = void> {
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 = any, R = void> {
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?: ActionSchemaMap;
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, any> | undefined;
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 void | undefined ? K : never; }[keyof T];
232
- type PayloadActions<T extends ActionPayloadMap> = { [K in keyof T]: T[K] extends void | undefined ? never : K; }[keyof T];
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 ? (payloadOrOptions?: undefined | DispatchOptions, options?: DispatchOptions) => Promise<void> : (payload: T[K], options?: DispatchOptions) => Promise<void>; };
287
- get actionsWithResult(): { [K in keyof T]: T[K] extends void ? (payloadOrOptions?: undefined | DispatchOptions, options?: DispatchOptions) => Promise<ExecutionResult<any>> : (payload: T[K], options?: DispatchOptions) => Promise<ExecutionResult<any>>; };
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;
@@ -396,7 +317,7 @@ declare const ReactDevUtils: {
396
317
  enableDebugMode(): void;
397
318
  disableDebugMode(): void;
398
319
  isDebugMode(): boolean;
399
- log(component: string, action: string, message: string, data?: any): void;
320
+ log(component: string, action: string, message: string, data?: unknown): void;
400
321
  getStats(registry: ActionRegister<any>): {
401
322
  totalHandlers: number;
402
323
  reactHandlers: number;
@@ -405,13 +326,13 @@ declare const ReactDevUtils: {
405
326
  };
406
327
  declare class ReactActionError extends Error {
407
328
  readonly action: string;
408
- readonly payload?: any;
329
+ readonly payload?: unknown;
409
330
  readonly handlerId: string | undefined;
410
331
  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;
332
+ constructor(message: string, action: string, payload?: unknown, handlerId?: string | undefined, originalError?: Error);
333
+ static fromActionError(originalError: Error, action: string, payload?: unknown, handlerId?: string): ReactActionError;
413
334
  }
414
- declare function isReactActionError(error: any): error is ReactActionError;
335
+ declare function isReactActionError(error: unknown): error is ReactActionError;
415
336
  //#endregion
416
337
  //#region src/errors.d.ts
417
338
  interface ZodIssueLike {
@@ -452,5 +373,5 @@ declare function isActionValidationError(error: unknown): error is ActionValidat
452
373
  declare function isActionTimeoutError(error: unknown): error is ActionTimeoutError;
453
374
  declare function isActionRegisterDestroyedError(error: unknown): error is ActionRegisterDestroyedError;
454
375
  //#endregion
455
- export { type ActionDispatcher, ActionGuard, type ActionHandler, type ActionPayloadMap, ActionRegister, type ActionRegisterConfig, ActionRegisterDestroyedError, type ActionSchemaMap, ActionTimeoutError, ActionValidationError, type AnthropicToolDefinition, type DefineActionOptions, type DispatchOptions, type ExecutionMode, type ExecutionResult, type HandlerConfig, type HandlerRegistration, type InferActionPayloadMap, type JSONSchema, type JSONSchemaType, type MCPToolDefinition, type OpenAIToolDefinition, type PipelineContext, type PipelineController, ReactActionError, ReactDevUtils, type SafeParseResult, type UnifiedAction, type UnregisterFunction, createActionFactory, createActionHandler, createActionSchema, defineAction, executeParallel, executeRace, executeSequential, isActionRegisterDestroyedError, isActionTimeoutError, isActionValidationError, isReactActionError, zodToJsonSchema };
376
+ 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, ReactActionError, ReactDevUtils, type UnregisterFunction, createActionHandler, executeParallel, executeRace, executeSequential, isActionRegisterDestroyedError, isActionTimeoutError, isActionValidationError, isReactActionError };
456
377
  //# sourceMappingURL=index.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.cts","names":[],"sources":["../src/json-schema.ts","../src/action-schema.ts","../src/types.ts","../src/ActionRegister.ts","../src/action-guard.ts","../src/execution-modes.ts","../src/react-helpers.ts","../src/errors.ts"],"mappings":";;KAgBY;UA+BK;EAEf,OAAO,iBAAiB;EAGxB;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EAGA;EACA;EACA;EACA;EACA;EAGA,QAAQ;EACR;EACA;EACA;EAGA,aAAa,eAAe;EAC5B;EACA,iCAAiC;EAGjC;EACA;EAGA,QAAQ;EACR,QAAQ;EACR,QAAQ;EACR,MAAM;EAGN;EACA,QAAQ,eAAe;GAGtB;;UAYc;EAEf;EAEA;EAEA,aAAa;EAEb,eAAe;;UAQA;EACf;EACA;IAEE;IAEA;IAEA,YAAY;;;UASC;EAEf;EAEA;EAEA,cAAc;;;;KC9GX,aAAa;KASN,gBAAgB;EACtB;EAAe,MAAM;;EACrB;EAAgB,OAAO,EAAE;;UASd,oBAAoB,gBAAgB;EAEnD;EAEA;EAEA,YAAY,UAAU;;UAeP,cAAc;WAGpB;WAEA;WAEA,WAAW,UAAU;WAErB,YAAY;EAOrB,WAAW,qBAAqB;EAMhC,YAAY,qBAAqB,gBAAgB;EAIjD,oBAAoB;EAEpB,aAAa;EAEb,gBAAgB;EAEhB,mBAAmB;;UAUJ;GACd,qBAAqB;;KAqBZ,sBAAsB,UAAU,sBACzC,WAAW,IAAI,EAAE,WAAW,oBAAoB,KAAK;iBAaxC,gBACd,QAAQ,YACR,kBAAkB,IACjB;iBA6Ca,aAAa,gBAAgB,aAC3C,SAAS,oBAAoB,UAC7B,kBAAkB,IACjB,cAAc,EAAE,MAAM,UAAU;iBA8EnB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