@classytic/arc 2.8.0 → 2.8.3

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.
Files changed (117) hide show
  1. package/README.md +10 -1
  2. package/dist/{BaseController-CpMfCXdn.mjs → BaseController-DAGGc5Xn.mjs} +76 -25
  3. package/dist/{EventTransport-n1KBxC_N.d.mts → EventTransport-CinyO7zQ.d.mts} +37 -1
  4. package/dist/{ResourceRegistry-BOtJuRCs.mjs → ResourceRegistry-Dq3_zBQP.mjs} +17 -5
  5. package/dist/adapters/index.d.mts +2 -2
  6. package/dist/adapters/index.mjs +1 -1
  7. package/dist/{adapters-BxGgSHjj.mjs → adapters-BBqAVvPK.mjs} +11 -0
  8. package/dist/audit/index.d.mts +1 -1
  9. package/dist/audit/index.mjs +1 -1
  10. package/dist/audit/mongodb.d.mts +1 -1
  11. package/dist/audit/mongodb.mjs +1 -1
  12. package/dist/auth/index.d.mts +4 -4
  13. package/dist/auth/index.mjs +3 -3
  14. package/dist/auth/redis-session.d.mts +1 -1
  15. package/dist/{betterAuthOpenApi-CHCIuA-p.mjs → betterAuthOpenApi-C5lDyRH2.mjs} +1 -1
  16. package/dist/cache/index.d.mts +2 -2
  17. package/dist/cli/commands/describe.mjs +1 -1
  18. package/dist/cli/commands/docs.mjs +2 -2
  19. package/dist/cli/commands/generate.mjs +1 -1
  20. package/dist/cli/commands/init.mjs +10 -10
  21. package/dist/cli/commands/introspect.mjs +3 -3
  22. package/dist/core/index.d.mts +3 -3
  23. package/dist/core/index.mjs +5 -5
  24. package/dist/{core-BfrfxNqO.mjs → core-DKSwNSXf.mjs} +1 -1
  25. package/dist/{createActionRouter-CbkIAaGh.mjs → createActionRouter-Df1BuawX.mjs} +87 -21
  26. package/dist/{createApp-Cy8eUNKQ.mjs → createApp-BOYjBgdI.mjs} +16 -7
  27. package/dist/{defineResource-CovBXvTB.mjs → defineResource-Bb_Bdhtw.mjs} +60 -33
  28. package/dist/docs/index.d.mts +2 -2
  29. package/dist/docs/index.mjs +1 -1
  30. package/dist/dynamic/index.d.mts +2 -2
  31. package/dist/dynamic/index.mjs +1 -1
  32. package/dist/{errorHandler-BeN-ERN7.d.mts → errorHandler-CdZDavNH.d.mts} +2 -2
  33. package/dist/{errorHandler-BW08lEiy.mjs → errorHandler-mzqk4cGl.mjs} +1 -1
  34. package/dist/{eventPlugin-CAOWMQS8.d.mts → eventPlugin-CVxlE6De.d.mts} +1 -1
  35. package/dist/{eventPlugin-x4jo3sG0.mjs → eventPlugin-D91S2YF4.mjs} +19 -1
  36. package/dist/events/index.d.mts +399 -28
  37. package/dist/events/index.mjs +345 -29
  38. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  39. package/dist/events/transports/redis-stream-entry.mjs +3 -1
  40. package/dist/events/transports/redis.d.mts +1 -1
  41. package/dist/factory/index.d.mts +1 -1
  42. package/dist/factory/index.mjs +2 -152
  43. package/dist/hooks/index.d.mts +1 -1
  44. package/dist/idempotency/index.d.mts +3 -3
  45. package/dist/idempotency/mongodb.d.mts +1 -1
  46. package/dist/idempotency/mongodb.mjs +18 -6
  47. package/dist/idempotency/redis.d.mts +1 -1
  48. package/dist/idempotency/redis.mjs +10 -1
  49. package/dist/{index-BpMhrFgn.d.mts → index-BgmMdpm8.d.mts} +1 -1
  50. package/dist/{index-CBru2y5Y.d.mts → index-CSkeivBx.d.mts} +3 -3
  51. package/dist/{index-qct60lnl.d.mts → index-CpTSDqmD.d.mts} +60 -6
  52. package/dist/index.d.mts +8 -8
  53. package/dist/index.mjs +7 -7
  54. package/dist/integrations/event-gateway.d.mts +1 -1
  55. package/dist/integrations/event-gateway.mjs +1 -1
  56. package/dist/integrations/index.d.mts +1 -1
  57. package/dist/integrations/mcp/index.d.mts +2 -2
  58. package/dist/integrations/mcp/index.mjs +1 -1
  59. package/dist/integrations/mcp/testing.d.mts +1 -1
  60. package/dist/integrations/mcp/testing.mjs +1 -1
  61. package/dist/{interface-IJqN3pXK.d.mts → interface-BVuMfeVv.d.mts} +596 -125
  62. package/dist/loadResources-Bksk8ydA.mjs +154 -0
  63. package/dist/{mongodb-B1eVtFhw.d.mts → mongodb-B8U2xaLj.d.mts} +1 -1
  64. package/dist/{mongodb-NShVZDMr.d.mts → mongodb-X7LbEjTN.d.mts} +10 -1
  65. package/dist/{openapi-AYLVjqVe.mjs → openapi-CYCuekCn.mjs} +50 -3
  66. package/dist/org/index.d.mts +2 -2
  67. package/dist/permissions/index.d.mts +3 -3
  68. package/dist/plugins/index.d.mts +5 -5
  69. package/dist/plugins/index.mjs +8 -8
  70. package/dist/plugins/tracing-entry.d.mts +1 -1
  71. package/dist/plugins/tracing-entry.mjs +1 -1
  72. package/dist/policies/index.d.mts +1 -1
  73. package/dist/presets/index.d.mts +3 -3
  74. package/dist/presets/index.mjs +1 -1
  75. package/dist/presets/multiTenant.d.mts +1 -1
  76. package/dist/{presets-BFrGvvjL.mjs → presets-C2xgzW6x.mjs} +10 -18
  77. package/dist/{queryCachePlugin-BCFVXnxK.d.mts → queryCachePlugin-CnTZZTC5.d.mts} +1 -1
  78. package/dist/{redis-stream-CF1lrKVk.d.mts → redis-stream-D54N5oXs.d.mts} +1 -1
  79. package/dist/{redis-Bunu3qWg.d.mts → redis-z3sFr1UP.d.mts} +1 -1
  80. package/dist/registry/index.d.mts +1 -1
  81. package/dist/registry/index.mjs +1 -1
  82. package/dist/{resourceToTools-C_1SMiCz.mjs → resourceToTools-O_HwWXFa.mjs} +194 -64
  83. package/dist/rpc/index.d.mts +1 -1
  84. package/dist/rpc/index.mjs +1 -1
  85. package/dist/scope/index.d.mts +2 -2
  86. package/dist/testing/index.d.mts +2 -2
  87. package/dist/testing/index.mjs +1 -1
  88. package/dist/types/index.d.mts +5 -5
  89. package/dist/{types-gUxAIZHp.d.mts → types-Bg2X42_m.d.mts} +30 -9
  90. package/dist/{types-BoaZHr-2.d.mts → types-CVC4HOKi.d.mts} +1 -1
  91. package/dist/{types-Ct0PUUSp.d.mts → types-CcG4avic.d.mts} +1 -1
  92. package/dist/utils/index.d.mts +43 -17
  93. package/dist/utils/index.mjs +5 -5
  94. package/dist/{utils-B-l6410F.mjs → utils-yYT3HDXt.mjs} +65 -13
  95. package/package.json +10 -9
  96. package/skills/arc/SKILL.md +79 -6
  97. /package/dist/{caching-CHH-iHs3.mjs → caching-CjybdRwx.mjs} +0 -0
  98. /package/dist/{circuitBreaker-BGVoB1hD.d.mts → circuitBreaker-CvXkjfrW.d.mts} +0 -0
  99. /package/dist/{circuitBreaker-l18oRgL5.mjs → circuitBreaker-cmi5XDv5.mjs} +0 -0
  100. /package/dist/{elevation-UJO3-NvX.d.mts → elevation-s5ykdNHr.d.mts} +0 -0
  101. /package/dist/{errors-Cg58SLNi.mjs → errors-BF2bIOIS.mjs} +0 -0
  102. /package/dist/{errors-BI8kEKsO.d.mts → errors-Bmn3eZT6.d.mts} +0 -0
  103. /package/dist/{externalPaths-BQ8QijNH.d.mts → externalPaths-Bapitwvd.d.mts} +0 -0
  104. /package/dist/{fields-DoeDgh2b.d.mts → fields-DC4So2M2.d.mts} +0 -0
  105. /package/dist/{interface-CkkWm5uR.d.mts → interface-B-pe8fhj.d.mts} +0 -0
  106. /package/dist/{interface-bpoLKKqx.d.mts → interface-DplgQO2e.d.mts} +0 -0
  107. /package/dist/{metrics-DuhiSEZI.mjs → metrics-TuOmguhi.mjs} +0 -0
  108. /package/dist/{mongodb-5Ff3w8jy.mjs → mongodb-B5O6xaW1.mjs} +0 -0
  109. /package/dist/{pluralize-BneOJkpi.mjs → pluralize-A0tWEl1K.mjs} +0 -0
  110. /package/dist/{replyHelpers-CXtJDAZ0.mjs → replyHelpers-BLojtuvR.mjs} +0 -0
  111. /package/dist/{requestContext-xHIKedG6.mjs → requestContext-DYvHl113.mjs} +0 -0
  112. /package/dist/{schemaConverter-Y5EejTnJ.mjs → schemaConverter-OxfCshus.mjs} +0 -0
  113. /package/dist/{sessionManager-BkzVU8h2.d.mts → sessionManager-D-oNWHz3.d.mts} +0 -0
  114. /package/dist/{sse-CD5Hghpu.mjs → sse-CJpt7LGI.mjs} +0 -0
  115. /package/dist/{tracing-xqXzWeaf.d.mts → tracing-DxjKk7eW.d.mts} +0 -0
  116. /package/dist/{types-CN6JvmYz.d.mts → types-C72d3NDn.d.mts} +0 -0
  117. /package/dist/{versioning-CPU_5Xfs.mjs → versioning-Cm8qoFDg.mjs} +0 -0
@@ -1,6 +1,6 @@
1
- import { t as BaseController } from "./BaseController-CpMfCXdn.mjs";
1
+ import { t as BaseController } from "./BaseController-DAGGc5Xn.mjs";
2
2
  import { n as normalizePermissionResult } from "./applyPermissionResult-D6GPMsvh.mjs";
3
- import { t as pluralize } from "./pluralize-BneOJkpi.mjs";
3
+ import { t as pluralize } from "./pluralize-A0tWEl1K.mjs";
4
4
  import { z } from "zod";
5
5
  //#region src/integrations/mcp/createMcpServer.ts
6
6
  /**
@@ -274,6 +274,15 @@ function buildRequestContext(input, auth, operation, policyFilters, scopeOverrid
274
274
  query: {},
275
275
  body: void 0
276
276
  };
277
+ case "action": {
278
+ const { id: _actionId, ...actionBody } = input;
279
+ return {
280
+ ...base,
281
+ params: { id: String(_actionId ?? "") },
282
+ query: {},
283
+ body: actionBody
284
+ };
285
+ }
277
286
  }
278
287
  }
279
288
  /**
@@ -548,7 +557,6 @@ const ANNOTATIONS = {
548
557
  */
549
558
  function resourceToTools(resource, config = {}) {
550
559
  const controller = resource.controller ?? (resource.adapter ? createMcpController(resource) : void 0);
551
- if (!controller) return [];
552
560
  const explicitFieldRules = resource.schemaOptions?.fieldRules;
553
561
  const hiddenFields = resource.schemaOptions?.hiddenFields;
554
562
  const readonlyFields = resource.schemaOptions?.readonlyFields;
@@ -558,72 +566,101 @@ function resourceToTools(resource, config = {}) {
558
566
  const sortableFields = resource.queryParser?.allowedSortFields;
559
567
  const allowedOperators = resource.queryParser?.allowedOperators;
560
568
  const hasSoftDelete = resource._appliedPresets?.includes("softDelete") ?? false;
561
- let ops = ALL_CRUD_OPS.filter((op) => {
562
- if (resource.disabledRoutes?.includes(op)) return false;
563
- return true;
564
- });
565
- if (config.operations) ops = ops.filter((op) => config.operations?.includes(op));
566
569
  const tools = [];
567
570
  const prefix = config.toolNamePrefix;
568
- for (const op of ops) {
569
- const name = config.names?.[op] ?? (op === "list" ? `${prefix ? `${prefix}_` : ""}list_${pluralize(resource.name)}` : `${prefix ? `${prefix}_` : ""}${op}_${resource.name}`);
570
- tools.push({
571
- name,
572
- description: config.descriptions?.[op] ?? defaultDescription(op, resource.displayName, hasSoftDelete, {
573
- filterableFields,
574
- allowedOperators,
575
- sortableFields
576
- }),
577
- annotations: ANNOTATIONS[op],
578
- inputSchema: buildInputSchema(op, fieldRules, {
579
- hiddenFields,
580
- readonlyFields,
581
- extraHideFields: config.hideFields,
582
- filterableFields,
583
- allowedOperators,
584
- adapterBodies
585
- }),
586
- handler: createHandler(op, controller, resource.name, resource.permissions)
571
+ if (!controller) {} else {
572
+ let ops = ALL_CRUD_OPS.filter((op) => {
573
+ if (resource.disabledRoutes?.includes(op)) return false;
574
+ return true;
587
575
  });
588
- }
589
- for (const route of resource.additionalRoutes ?? []) {
590
- const mcpHandler = route.mcpHandler;
591
- if (!route.wrapHandler && !mcpHandler) continue;
592
- if (!mcpHandler && ![
593
- "POST",
594
- "PUT",
595
- "PATCH",
596
- "DELETE"
597
- ].includes(route.method)) continue;
598
- const opName = route.operation ?? slugifyRoute(route.method, route.path);
599
- const hasId = route.path.includes(":id");
600
- const inputShape = {};
601
- if (hasId) inputShape.id = z.string().describe("Resource ID");
602
- if (mcpHandler) tools.push({
603
- name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
604
- description: route.summary ?? route.description ?? `${opName} on ${resource.displayName}`,
605
- annotations: { openWorldHint: true },
606
- inputSchema: inputShape,
607
- handler: async (input, _ctx) => {
608
- try {
609
- return await mcpHandler(input);
610
- } catch (err) {
611
- return {
612
- content: [{
613
- type: "text",
614
- text: `Error: ${err instanceof Error ? err.message : String(err)}`
615
- }],
616
- isError: true
617
- };
576
+ if (config.operations) ops = ops.filter((op) => config.operations?.includes(op));
577
+ for (const op of ops) {
578
+ const name = config.names?.[op] ?? (op === "list" ? `${prefix ? `${prefix}_` : ""}list_${pluralize(resource.name)}` : `${prefix ? `${prefix}_` : ""}${op}_${resource.name}`);
579
+ tools.push({
580
+ name,
581
+ description: config.descriptions?.[op] ?? defaultDescription(op, resource.displayName, hasSoftDelete, {
582
+ filterableFields,
583
+ allowedOperators,
584
+ sortableFields
585
+ }),
586
+ annotations: ANNOTATIONS[op],
587
+ inputSchema: buildInputSchema(op, fieldRules, {
588
+ hiddenFields,
589
+ readonlyFields,
590
+ extraHideFields: config.hideFields,
591
+ filterableFields,
592
+ allowedOperators,
593
+ adapterBodies
594
+ }),
595
+ handler: createHandler(op, controller, resource.name, resource.permissions)
596
+ });
597
+ }
598
+ for (const route of resource.additionalRoutes ?? []) {
599
+ if (route.mcp === false) continue;
600
+ const mcpHandler = route.mcpHandler;
601
+ if (!route.wrapHandler && !mcpHandler) continue;
602
+ if (!mcpHandler && ![
603
+ "POST",
604
+ "PUT",
605
+ "PATCH",
606
+ "DELETE"
607
+ ].includes(route.method)) continue;
608
+ const opName = route.operation ?? slugifyRoute(route.method, route.path);
609
+ const hasId = route.path.includes(":id");
610
+ const mcpConfig = typeof route.mcp === "object" && route.mcp !== null ? route.mcp : void 0;
611
+ const toolDescription = mcpConfig?.description ?? route.summary ?? route.description ?? `${opName} on ${resource.displayName}`;
612
+ const toolAnnotations = mcpConfig?.annotations ? { ...mcpConfig.annotations } : { openWorldHint: true };
613
+ const inputShape = {};
614
+ if (hasId) inputShape.id = z.string().describe("Resource ID");
615
+ if (mcpHandler) tools.push({
616
+ name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
617
+ description: toolDescription,
618
+ annotations: toolAnnotations,
619
+ inputSchema: inputShape,
620
+ handler: async (input, _ctx) => {
621
+ try {
622
+ return await mcpHandler(input);
623
+ } catch (err) {
624
+ return {
625
+ content: [{
626
+ type: "text",
627
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`
628
+ }],
629
+ isError: true
630
+ };
631
+ }
618
632
  }
619
- }
620
- });
621
- else tools.push({
622
- name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
623
- description: route.summary ?? route.description ?? `${opName} on ${resource.displayName}`,
624
- annotations: { openWorldHint: true },
633
+ });
634
+ else tools.push({
635
+ name: prefix ? `${prefix}_${opName}_${resource.name}` : `${opName}_${resource.name}`,
636
+ description: toolDescription,
637
+ annotations: toolAnnotations,
638
+ inputSchema: inputShape,
639
+ handler: createAdditionalRouteHandler(route, controller, hasId)
640
+ });
641
+ }
642
+ }
643
+ if (resource.actions) for (const [actionName, entry] of Object.entries(resource.actions)) {
644
+ const def = typeof entry === "function" ? { handler: entry } : entry;
645
+ if (typeof def !== "function" && "mcp" in def && def.mcp === false) continue;
646
+ const mcpCfg = typeof def !== "function" && typeof def.mcp === "object" ? def.mcp : void 0;
647
+ const description = mcpCfg?.description ?? (typeof def !== "function" ? def.description : void 0) ?? `${actionName} action on ${resource.displayName}`;
648
+ const annotations = mcpCfg?.annotations ? { ...mcpCfg.annotations } : { destructiveHint: true };
649
+ const inputShape = { id: z.string().describe("Resource ID") };
650
+ const rawSchema = typeof def !== "function" ? def.schema : void 0;
651
+ if (rawSchema && typeof rawSchema === "object") {
652
+ const converted = convertActionSchemaToZod(rawSchema);
653
+ for (const [key, val] of Object.entries(converted)) inputShape[key] = val;
654
+ }
655
+ const toolName = prefix ? `${prefix}_${actionName}_${resource.name}` : `${actionName}_${resource.name}`;
656
+ const handler = typeof entry === "function" ? entry : def.handler;
657
+ const actionPerms = (typeof def !== "function" ? def.permissions : void 0) ?? resource.actionPermissions;
658
+ tools.push({
659
+ name: toolName,
660
+ description: String(description),
661
+ annotations,
625
662
  inputSchema: inputShape,
626
- handler: createAdditionalRouteHandler(route, controller, hasId)
663
+ handler: createActionToolHandler(actionName, handler, actionPerms, resource.name, resource.permissions)
627
664
  });
628
665
  }
629
666
  return tools;
@@ -889,5 +926,98 @@ function createMcpController(resource) {
889
926
  matchesFilter: resource.adapter?.matchesFilter
890
927
  });
891
928
  }
929
+ /**
930
+ * Convert an action schema (JSON Schema, Zod, or legacy field map) to a Zod
931
+ * shape for MCP tool input. This mirrors `normalizeActionSchema` in
932
+ * `createActionRouter.ts` but produces Zod types for the MCP SDK.
933
+ */
934
+ function convertActionSchemaToZod(raw) {
935
+ if ("_zod" in raw && typeof raw.shape === "object") return { ...raw.shape };
936
+ if ((raw.type === "object" || "properties" in raw) && typeof raw.properties === "object" && raw.properties !== null) {
937
+ const props = raw.properties;
938
+ return jsonSchemaPropsToZod(props, new Set(Array.isArray(raw.required) ? raw.required : []));
939
+ }
940
+ const result = {};
941
+ for (const [fieldName, fieldSchema] of Object.entries(raw)) {
942
+ if (fieldName === "type" || fieldName === "properties" || fieldName === "required") continue;
943
+ if (!fieldSchema || typeof fieldSchema !== "object") continue;
944
+ const fs = fieldSchema;
945
+ const desc = typeof fs.description === "string" ? fs.description : `${fieldName} field`;
946
+ const isOptional = fs.required === false;
947
+ const base = jsonSchemaTypeToZod(fs);
948
+ result[fieldName] = isOptional ? base.optional().describe(desc) : base.describe(desc);
949
+ }
950
+ return result;
951
+ }
952
+ function jsonSchemaPropsToZod(props, requiredSet) {
953
+ const result = {};
954
+ for (const [name, schema] of Object.entries(props)) {
955
+ const desc = typeof schema.description === "string" ? schema.description : name;
956
+ const base = jsonSchemaTypeToZod(schema);
957
+ result[name] = requiredSet.has(name) ? base.describe(desc) : base.optional().describe(desc);
958
+ }
959
+ return result;
960
+ }
961
+ function jsonSchemaTypeToZod(schema) {
962
+ const type = typeof schema.type === "string" ? schema.type : "string";
963
+ if (Array.isArray(schema.enum) && schema.enum.length > 0) return z.enum(schema.enum);
964
+ switch (type) {
965
+ case "number":
966
+ case "integer": return z.number();
967
+ case "boolean": return z.boolean();
968
+ case "array": return z.array(z.unknown());
969
+ case "object": return z.record(z.string(), z.unknown());
970
+ default: return z.string();
971
+ }
972
+ }
973
+ /**
974
+ * Create an MCP tool handler for a declarative action.
975
+ *
976
+ * Uses the SAME `evaluatePermission()` and `buildRequestContext()` as
977
+ * CRUD tools — single code path for permission side effects, scope
978
+ * construction, and request context assembly. This eliminates the
979
+ * DRY/drift risk flagged in the review: REST and MCP action tools now
980
+ * share identical context-building machinery.
981
+ */
982
+ function createActionToolHandler(actionName, handler, permissions, resourceName, _resourcePermissions) {
983
+ return async (input, ctx) => {
984
+ const session = ctx.session;
985
+ const permResult = await evaluatePermission(permissions, session, resourceName, actionName, input);
986
+ if (permResult && !permResult.granted) return {
987
+ content: [{
988
+ type: "text",
989
+ text: JSON.stringify({
990
+ success: false,
991
+ error: permResult.reason ?? `Permission denied for action '${actionName}'`
992
+ })
993
+ }],
994
+ isError: true
995
+ };
996
+ const reqCtx = buildRequestContext({
997
+ ...input,
998
+ action: actionName
999
+ }, session, "action", permResult?.filters, permResult?.scope);
1000
+ const id = typeof input.id === "string" ? input.id : "";
1001
+ const { id: _discardId, ...data } = input;
1002
+ try {
1003
+ const result = await handler(id, data, reqCtx);
1004
+ return { content: [{
1005
+ type: "text",
1006
+ text: JSON.stringify({
1007
+ success: true,
1008
+ data: result
1009
+ })
1010
+ }] };
1011
+ } catch (err) {
1012
+ return {
1013
+ content: [{
1014
+ type: "text",
1015
+ text: `Error: ${err instanceof Error ? err.message : String(err)}`
1016
+ }],
1017
+ isError: true
1018
+ };
1019
+ }
1020
+ };
1021
+ }
892
1022
  //#endregion
893
1023
  export { fieldRulesToZod as n, createMcpServer as r, resourceToTools as t };
@@ -1,4 +1,4 @@
1
- import { r as CircuitBreakerOptions } from "../circuitBreaker-BGVoB1hD.mjs";
1
+ import { r as CircuitBreakerOptions } from "../circuitBreaker-CvXkjfrW.mjs";
2
2
 
3
3
  //#region src/rpc/serviceClient.d.ts
4
4
  interface RetryConfig {
@@ -1,4 +1,4 @@
1
- import { t as CircuitBreaker } from "../circuitBreaker-l18oRgL5.mjs";
1
+ import { t as CircuitBreaker } from "../circuitBreaker-cmi5XDv5.mjs";
2
2
  //#region src/rpc/serviceClient.ts
3
3
  /**
4
4
  * Service Client — Resource-Oriented RPC
@@ -1,5 +1,5 @@
1
- import { _ as isAuthenticated, a as getClientId, b as isOrgInScope, c as getOrgRoles, d as getScopeContextMap, f as getServiceScopes, g as hasOrgAccess, h as getUserRoles, i as getAncestorOrgIds, l as getRequestScope, m as getUserId, n as PUBLIC_SCOPE, o as getOrgContext, p as getTeamId, r as RequestScope, s as getOrgId, t as AUTHENTICATED_SCOPE, u as getScopeContext, v as isElevated, x as isService, y as isMember } from "../types-CN6JvmYz.mjs";
2
- import { i as elevationPlugin, n as ElevationOptions, r as _default, t as ElevationEvent } from "../elevation-UJO3-NvX.mjs";
1
+ import { _ as isAuthenticated, a as getClientId, b as isOrgInScope, c as getOrgRoles, d as getScopeContextMap, f as getServiceScopes, g as hasOrgAccess, h as getUserRoles, i as getAncestorOrgIds, l as getRequestScope, m as getUserId, n as PUBLIC_SCOPE, o as getOrgContext, p as getTeamId, r as RequestScope, s as getOrgId, t as AUTHENTICATED_SCOPE, u as getScopeContext, v as isElevated, x as isService, y as isMember } from "../types-C72d3NDn.mjs";
2
+ import { i as elevationPlugin, n as ElevationOptions, r as _default, t as ElevationEvent } from "../elevation-s5ykdNHr.mjs";
3
3
  import { FastifyReply, FastifyRequest } from "fastify";
4
4
 
5
5
  //#region src/scope/rateLimitKey.d.ts
@@ -1,5 +1,5 @@
1
- import { Yt as CrudRepository, m as AnyRecord, qt as ResourceDefinition } from "../interface-IJqN3pXK.mjs";
2
- import { d as ResourceLike, r as CreateAppOptions } from "../types-gUxAIZHp.mjs";
1
+ import { Zt as CrudRepository, m as AnyRecord, qt as ResourceDefinition } from "../interface-BVuMfeVv.mjs";
2
+ import { d as ResourceLike, r as CreateAppOptions } from "../types-Bg2X42_m.mjs";
3
3
  import Fastify, { FastifyInstance, FastifyServerOptions } from "fastify";
4
4
  import { Connection } from "mongoose";
5
5
  import { Mock } from "vitest";
@@ -1796,7 +1796,7 @@ function runEventTests(resourceName, displayName, events) {
1796
1796
  * ```
1797
1797
  */
1798
1798
  async function createTestApp(options = {}) {
1799
- const { createApp } = await import("../createApp-Cy8eUNKQ.mjs").then((n) => n.r);
1799
+ const { createApp } = await import("../createApp-BOYjBgdI.mjs").then((n) => n.r);
1800
1800
  const { useInMemoryDb = true, mongoUri: providedMongoUri, ...appOptions } = options;
1801
1801
  const defaultAuth = {
1802
1802
  type: "jwt",
@@ -1,5 +1,5 @@
1
- import { _ as isAuthenticated, c as getOrgRoles, g as hasOrgAccess, n as PUBLIC_SCOPE, p as getTeamId, r as RequestScope, s as getOrgId, t as AUTHENTICATED_SCOPE, v as isElevated, y as isMember } from "../types-CN6JvmYz.mjs";
2
- import { $ as PresetFunction, $t as QueryOptions, A as EventsDecorator, B as InferResourceDoc, Bt as FastifyHandler, C as ConfigError, Ct as TypedResourceConfig, D as CrudRouterOptions, Dt as ValidationResult, E as CrudRouteKey, Et as ValidateOptions, F as GracefulShutdownOptions, G as LookupOption, H as IntrospectionPluginOptions, Ht as IControllerResponse, I as HealthCheck, J as ObjectId, K as MiddlewareConfig, L as HealthOptions, M as FastifyWithAuth, N as FastifyWithDecorators, O as CrudSchemas, Ot as envelope, P as FieldRule, Q as PopulateOption, Qt as PaginationParams, R as InferAdapterDoc, Rt as ControllerHandler, S as AuthenticatorContext, St as TypedRepository, T as CrudController, Tt as UserOrganization, U as JWTPayload, Ut as IRequestContext, V as IntrospectionData, Vt as IController, W as JwtContext, Wt as RouteHandler, X as OwnershipCheck, Xt as InferDoc, Y as OpenApiSchemas, Yt as CrudRepository, Z as ParsedQuery, Zt as PaginatedResult, _ as ArcInternalMetadata, _t as RouteMcpConfig, at as RegistryStats, b as AuthPluginOptions, bt as TokenPair, ct as RequestWithExtras, d as ActionHandlerFn, dt as ResourceHookContext, et as PresetHook, f as ActionsMap, ft as ResourceHooks, g as ArcDecorator, gt as RouteHandlerMethod, h as ApiResponse, ht as RouteDefinition, it as RegistryEntry, j as FastifyRequestExtras, jt as BaseControllerOptions, k as EventDefinition, kt as getUserId, l as ActionDefinition, lt as ResourceCacheConfig, m as AnyRecord, mt as ResourcePermissions, nt as QueryParserInterface, ot as RequestContext, p as AdditionalRoute, pt as ResourceMetadata, q as MiddlewareHandler, rt as RateLimitConfig, st as RequestIdOptions, tt as PresetResult, u as ActionEntry, ut as ResourceConfig, v as ArcRequest, vt as RouteSchemaOptions, w as ControllerQueryOptions, wt as UserLike, x as Authenticator, xt as TypedController, y as AuthHelpers, yt as ServiceContext, z as InferDocType, zt as ControllerLike } from "../interface-IJqN3pXK.mjs";
3
- import { i as UserBase, n as PermissionContext, r as PermissionResult, t as PermissionCheck } from "../types-BoaZHr-2.mjs";
4
- import { n as ElevationOptions, t as ElevationEvent } from "../elevation-UJO3-NvX.mjs";
5
- export { AUTHENTICATED_SCOPE, ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AdditionalRoute, AnyRecord, ApiResponse, ArcDecorator, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, BaseControllerOptions, ConfigError, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRepository, CrudRouteKey, CrudRouterOptions, CrudSchemas, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, LookupOption, MiddlewareConfig, MiddlewareHandler, ObjectId, OpenApiSchemas, OwnershipCheck, PUBLIC_SCOPE, PaginatedResult, PaginationParams, ParsedQuery, PermissionCheck, PermissionContext, PermissionResult, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryOptions, QueryParserInterface, RateLimitConfig, RegistryEntry, RegistryStats, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResourceCacheConfig, ResourceConfig, ResourceHookContext, ResourceHooks, ResourceMetadata, ResourcePermissions, RouteDefinition, RouteHandler, RouteHandlerMethod, RouteMcpConfig, RouteSchemaOptions, ServiceContext, TokenPair, TypedController, TypedRepository, TypedResourceConfig, UserBase, UserLike, UserOrganization, ValidateOptions, ValidationResult, envelope, getOrgId, getOrgRoles, getTeamId, getUserId, hasOrgAccess, isAuthenticated, isElevated, isMember };
1
+ import { _ as isAuthenticated, c as getOrgRoles, g as hasOrgAccess, n as PUBLIC_SCOPE, p as getTeamId, r as RequestScope, s as getOrgId, t as AUTHENTICATED_SCOPE, v as isElevated, y as isMember } from "../types-C72d3NDn.mjs";
2
+ import { $ as PresetFunction, $t as DeleteOptions, A as EventsDecorator, B as InferResourceDoc, Bt as FastifyHandler, C as ConfigError, Ct as TypedResourceConfig, D as CrudRouterOptions, Dt as ValidationResult, E as CrudRouteKey, Et as ValidateOptions, F as GracefulShutdownOptions, G as LookupOption, H as IntrospectionPluginOptions, Ht as IControllerResponse, I as HealthCheck, J as ObjectId, K as MiddlewareConfig, L as HealthOptions, M as FastifyWithAuth, N as FastifyWithDecorators, O as CrudSchemas, Ot as envelope, P as FieldRule, Q as PopulateOption, Qt as DeleteManyResult, R as InferAdapterDoc, Rt as ControllerHandler, S as AuthenticatorContext, St as TypedRepository, T as CrudController, Tt as UserOrganization, U as JWTPayload, Ut as IRequestContext, V as IntrospectionData, Vt as IController, W as JwtContext, Wt as RouteHandler, X as OwnershipCheck, Xt as BulkWriteResult, Y as OpenApiSchemas, Yt as BulkWriteOperation, Z as ParsedQuery, Zt as CrudRepository, _ as ArcInternalMetadata, _t as RouteMcpConfig, an as PaginationParams, at as RegistryStats, b as AuthPluginOptions, bt as TokenPair, cn as RepositorySession, ct as RequestWithExtras, d as ActionHandlerFn, dt as ResourceHookContext, en as DeleteResult, et as PresetHook, f as ActionsMap, ft as ResourceHooks, g as ArcDecorator, gt as RouteHandlerMethod, h as ApiResponse, ht as RouteDefinition, in as PaginatedResult, it as RegistryEntry, j as FastifyRequestExtras, jt as BaseControllerOptions, k as EventDefinition, kt as getUserId, l as ActionDefinition, ln as UpdateManyResult, lt as ResourceCacheConfig, m as AnyRecord, mt as ResourcePermissions, nn as KeysetPaginatedResult, nt as QueryParserInterface, on as PaginationResult, ot as RequestContext, p as AdditionalRoute, pt as ResourceMetadata, q as MiddlewareHandler, rn as OffsetPaginatedResult, rt as RateLimitConfig, sn as QueryOptions, st as RequestIdOptions, tn as InferDoc, tt as PresetResult, u as ActionEntry, un as WriteOptions, ut as ResourceConfig, v as ArcRequest, vt as RouteSchemaOptions, w as ControllerQueryOptions, wt as UserLike, x as Authenticator, xt as TypedController, y as AuthHelpers, yt as ServiceContext, z as InferDocType, zt as ControllerLike } from "../interface-BVuMfeVv.mjs";
3
+ import { i as UserBase, n as PermissionContext, r as PermissionResult, t as PermissionCheck } from "../types-CVC4HOKi.mjs";
4
+ import { n as ElevationOptions, t as ElevationEvent } from "../elevation-s5ykdNHr.mjs";
5
+ export { AUTHENTICATED_SCOPE, ActionDefinition, ActionEntry, ActionHandlerFn, ActionsMap, AdditionalRoute, AnyRecord, ApiResponse, ArcDecorator, ArcInternalMetadata, ArcRequest, AuthHelpers, AuthPluginOptions, Authenticator, AuthenticatorContext, BaseControllerOptions, BulkWriteOperation, BulkWriteResult, ConfigError, ControllerHandler, ControllerLike, ControllerQueryOptions, CrudController, CrudRepository, CrudRouteKey, CrudRouterOptions, CrudSchemas, DeleteManyResult, DeleteOptions, DeleteResult, ElevationEvent, ElevationOptions, EventDefinition, EventsDecorator, FastifyHandler, FastifyRequestExtras, FastifyWithAuth, FastifyWithDecorators, FieldRule, GracefulShutdownOptions, HealthCheck, HealthOptions, IController, IControllerResponse, IRequestContext, InferAdapterDoc, InferDoc, InferDocType, InferResourceDoc, IntrospectionData, IntrospectionPluginOptions, JWTPayload, JwtContext, KeysetPaginatedResult, LookupOption, MiddlewareConfig, MiddlewareHandler, ObjectId, OffsetPaginatedResult, OpenApiSchemas, OwnershipCheck, PUBLIC_SCOPE, PaginatedResult, PaginationParams, PaginationResult, ParsedQuery, PermissionCheck, PermissionContext, PermissionResult, PopulateOption, PresetFunction, PresetHook, PresetResult, QueryOptions, QueryParserInterface, RateLimitConfig, RegistryEntry, RegistryStats, RepositorySession, RequestContext, RequestIdOptions, RequestScope, RequestWithExtras, ResourceCacheConfig, ResourceConfig, ResourceHookContext, ResourceHooks, ResourceMetadata, ResourcePermissions, RouteDefinition, RouteHandler, RouteHandlerMethod, RouteMcpConfig, RouteSchemaOptions, ServiceContext, TokenPair, TypedController, TypedRepository, TypedResourceConfig, UpdateManyResult, UserBase, UserLike, UserOrganization, ValidateOptions, ValidationResult, WriteOptions, envelope, getOrgId, getOrgRoles, getTeamId, getUserId, hasOrgAccess, isAuthenticated, isElevated, isMember };
@@ -1,12 +1,12 @@
1
- import { x as Authenticator } from "./interface-IJqN3pXK.mjs";
2
- import { n as ElevationOptions } from "./elevation-UJO3-NvX.mjs";
3
- import { t as ExternalOpenApiPaths } from "./externalPaths-BQ8QijNH.mjs";
4
- import { i as CacheStore } from "./interface-bpoLKKqx.mjs";
5
- import { r as QueryCachePluginOptions } from "./queryCachePlugin-BCFVXnxK.mjs";
6
- import { i as EventTransport } from "./EventTransport-n1KBxC_N.mjs";
7
- import { t as EventPluginOptions } from "./eventPlugin-CAOWMQS8.mjs";
8
- import { c as MetricsOptions, d as SSEOptions, m as CachingOptions, r as VersioningOptions, t as ErrorHandlerOptions } from "./errorHandler-BeN-ERN7.mjs";
9
- import { r as IdempotencyStore } from "./interface-CkkWm5uR.mjs";
1
+ import { x as Authenticator } from "./interface-BVuMfeVv.mjs";
2
+ import { n as ElevationOptions } from "./elevation-s5ykdNHr.mjs";
3
+ import { t as ExternalOpenApiPaths } from "./externalPaths-Bapitwvd.mjs";
4
+ import { i as CacheStore } from "./interface-DplgQO2e.mjs";
5
+ import { r as QueryCachePluginOptions } from "./queryCachePlugin-CnTZZTC5.mjs";
6
+ import { i as EventTransport } from "./EventTransport-CinyO7zQ.mjs";
7
+ import { t as EventPluginOptions } from "./eventPlugin-CVxlE6De.mjs";
8
+ import { f as SSEOptions, h as CachingOptions, i as VersioningOptions, l as MetricsOptions, t as ErrorHandlerOptions } from "./errorHandler-CdZDavNH.mjs";
9
+ import { r as IdempotencyStore } from "./interface-B-pe8fhj.mjs";
10
10
  import { FastifyInstance, FastifyPluginAsync, FastifyReply, FastifyRequest, FastifyServerOptions } from "fastify";
11
11
 
12
12
  //#region src/factory/loadResources.d.ts
@@ -664,6 +664,27 @@ interface CreateAppOptions {
664
664
  * ```
665
665
  */
666
666
  resourcePrefix?: string;
667
+ /**
668
+ * Auto-discover resources from a directory instead of passing an explicit
669
+ * `resources` array. Resolves relative to `process.cwd()`.
670
+ *
671
+ * This replaces the common pattern:
672
+ * ```ts
673
+ * resources: await loadResources(import.meta.url)
674
+ * ```
675
+ *
676
+ * When both `resourceDir` and `resources` are provided, `resources` wins
677
+ * (explicit always beats convention).
678
+ *
679
+ * @example
680
+ * ```ts
681
+ * const app = await createApp({
682
+ * resourceDir: 'src/resources',
683
+ * resourcePrefix: '/api/v1',
684
+ * });
685
+ * ```
686
+ */
687
+ resourceDir?: string;
667
688
  /**
668
689
  * Custom plugin registration — runs after Arc core (security, auth, events)
669
690
  * but before `bootstrap` and `resources`.
@@ -1,4 +1,4 @@
1
- import { r as RequestScope } from "./types-CN6JvmYz.mjs";
1
+ import { r as RequestScope } from "./types-C72d3NDn.mjs";
2
2
  import { FastifyRequest } from "fastify";
3
3
 
4
4
  //#region src/permissions/types.d.ts
@@ -1,4 +1,4 @@
1
- import { qt as ResourceDefinition } from "./interface-IJqN3pXK.mjs";
1
+ import { qt as ResourceDefinition } from "./interface-BVuMfeVv.mjs";
2
2
  import { z } from "zod";
3
3
 
4
4
  //#region src/integrations/mcp/types.d.ts
@@ -1,7 +1,7 @@
1
- import { Y as OpenApiSchemas, Z as ParsedQuery, m as AnyRecord, nt as QueryParserInterface } from "../interface-IJqN3pXK.mjs";
2
- import { a as NotFoundError, c as RateLimitError, d as ValidationError, i as ForbiddenError, l as ServiceUnavailableError, m as isArcError, n as ConflictError, o as OrgAccessDeniedError, p as createError, r as ErrorDetails, s as OrgRequiredError, t as ArcError, u as UnauthorizedError } from "../errors-BI8kEKsO.mjs";
3
- import { a as CircuitBreakerStats, c as createCircuitBreakerRegistry, i as CircuitBreakerRegistry, n as CircuitBreakerError, o as CircuitState, r as CircuitBreakerOptions, s as createCircuitBreaker, t as CircuitBreaker } from "../circuitBreaker-BGVoB1hD.mjs";
4
- import { FastifyInstance } from "fastify";
1
+ import { Y as OpenApiSchemas, Z as ParsedQuery, m as AnyRecord, nt as QueryParserInterface } from "../interface-BVuMfeVv.mjs";
2
+ import { a as NotFoundError, c as RateLimitError, d as ValidationError, f as createDomainError, i as ForbiddenError, l as ServiceUnavailableError, m as isArcError, n as ConflictError, o as OrgAccessDeniedError, p as createError, r as ErrorDetails, s as OrgRequiredError, t as ArcError, u as UnauthorizedError } from "../errors-Bmn3eZT6.mjs";
3
+ import { a as CircuitBreakerStats, c as createCircuitBreakerRegistry, i as CircuitBreakerRegistry, n as CircuitBreakerError, o as CircuitState, r as CircuitBreakerOptions, s as createCircuitBreaker, t as CircuitBreaker } from "../circuitBreaker-CvXkjfrW.mjs";
4
+ import { FastifyInstance, FastifyReply, FastifyRequest, RouteHandlerMethod } from "fastify";
5
5
 
6
6
  //#region src/utils/compensation.d.ts
7
7
  /**
@@ -92,6 +92,44 @@ interface CompensationDefinition<TCtx extends Record<string, unknown> = Record<s
92
92
  }
93
93
  declare function defineCompensation<TCtx extends Record<string, unknown> = Record<string, unknown>>(name: string, steps: readonly CompensationStep<TCtx>[]): CompensationDefinition<TCtx>;
94
94
  //#endregion
95
+ //#region src/utils/defineGuard.d.ts
96
+ interface GuardConfig<T> {
97
+ /** Unique name — used as the storage key on the request. */
98
+ readonly name: string;
99
+ /**
100
+ * Resolve the guard context from the request. Throw to abort the request
101
+ * (Fastify's error handler will produce the appropriate HTTP response).
102
+ * Return a value to stash it for `from()` extraction.
103
+ */
104
+ readonly resolve: (req: FastifyRequest, reply: FastifyReply) => T | Promise<T>;
105
+ }
106
+ interface Guard<T> {
107
+ /** Use in `routeGuards` or per-route `preHandler` arrays. */
108
+ readonly preHandler: RouteHandlerMethod;
109
+ /**
110
+ * Extract the resolved context from a request. Throws if the guard
111
+ * hasn't run yet (i.e. not in the preHandler chain).
112
+ */
113
+ from(req: FastifyRequest): T;
114
+ /** The guard name (for debugging). */
115
+ readonly name: string;
116
+ }
117
+ /**
118
+ * Create a typed guard. See module JSDoc for usage.
119
+ */
120
+ declare function defineGuard<T>(config: GuardConfig<T>): Guard<T>;
121
+ //#endregion
122
+ //#region src/utils/handleRaw.d.ts
123
+ /**
124
+ * Wrap a raw Fastify handler with Arc's response envelope and error handling.
125
+ *
126
+ * @param handler - Async function that receives `(request, reply)` and returns data.
127
+ * The return value is sent as `{ success: true, data }`. If it returns
128
+ * `undefined` or `null`, `{ success: true }` is sent (no `data` field).
129
+ * @param statusCode - HTTP status code for successful responses (default: 200)
130
+ */
131
+ declare function handleRaw<T>(handler: (request: FastifyRequest, reply: FastifyReply) => Promise<T>, statusCode?: number): (request: FastifyRequest, reply: FastifyReply) => Promise<void>;
132
+ //#endregion
95
133
  //#region src/utils/queryParser.d.ts
96
134
  interface ArcQueryParserOptions {
97
135
  /** Maximum allowed limit value (default: 1000) */
@@ -235,20 +273,12 @@ declare function wrapResponse(dataSchema: JsonSchema): JsonSchema;
235
273
  * Note: Uses 'docs' array (not 'data') with flat pagination fields
236
274
  */
237
275
  declare function listResponse(itemSchema: JsonSchema): JsonSchema;
238
- /**
239
- * Alias for listResponse - matches local responseSchemas.js naming
240
- */
241
- declare const paginateWrapper: typeof listResponse;
242
276
  /**
243
277
  * Create a single item response schema
244
278
  *
245
279
  * Runtime format: { success, data: {...} }
246
280
  */
247
281
  declare function itemResponse(itemSchema: JsonSchema): JsonSchema;
248
- /**
249
- * Alias for itemResponse - matches local responseSchemas.js naming
250
- */
251
- declare const itemWrapper: typeof itemResponse;
252
282
  /**
253
283
  * Create a create/update response schema
254
284
  */
@@ -259,10 +289,6 @@ declare function mutationResponse(itemSchema: JsonSchema): JsonSchema;
259
289
  * Runtime format: { success, data: { message, id?, soft? } }
260
290
  */
261
291
  declare function deleteResponse(): JsonSchema;
262
- /**
263
- * Alias for deleteResponse - matches local responseSchemas.js naming
264
- */
265
- declare const messageWrapper: typeof deleteResponse;
266
292
  declare const responses: {
267
293
  200: (schema: JsonSchema) => {
268
294
  description: string;
@@ -647,4 +673,4 @@ declare function hasEvents(instance: FastifyInstance): instance is FastifyInstan
647
673
  events: EventsDecorator;
648
674
  };
649
675
  //#endregion
650
- export { ArcError, ArcQueryParser, type ArcQueryParserOptions, CircuitBreaker, CircuitBreakerError, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitState, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorDetails, type EventsDecorator, ForbiddenError, type JsonSchema, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, type StateMachine, type TransitionConfig, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, itemWrapper, listResponse, messageWrapper, mutationResponse, paginateWrapper, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
676
+ export { ArcError, ArcQueryParser, type ArcQueryParserOptions, CircuitBreaker, CircuitBreakerError, type CircuitBreakerOptions, CircuitBreakerRegistry, type CircuitBreakerStats, CircuitState, type CompensationDefinition, type CompensationError, type CompensationHooks, type CompensationResult, type CompensationStep, ConflictError, type ErrorDetails, type EventsDecorator, ForbiddenError, type Guard, type GuardConfig, type JsonSchema, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, type StateMachine, type TransitionConfig, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createStateMachine, defineCompensation, defineGuard, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, handleRaw, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, listResponse, mutationResponse, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
@@ -1,7 +1,7 @@
1
1
  import { n as createQueryParser, t as ArcQueryParser } from "../queryParser-CgCtsjti.mjs";
2
- import { a as createCircuitBreaker, i as CircuitState, n as CircuitBreakerError, o as createCircuitBreakerRegistry, r as CircuitBreakerRegistry, t as CircuitBreaker } from "../circuitBreaker-l18oRgL5.mjs";
3
- import { _ as defineCompensation, a as getListQueryParams, c as listResponse, d as paginateWrapper, f as paginationSchema, g as wrapResponse, h as successResponseSchema, i as getDefaultCrudSchemas, l as messageWrapper, m as responses, n as deleteResponse, o as itemResponse, p as queryParams, r as errorResponseSchema, s as itemWrapper, t as createStateMachine, u as mutationResponse, v as withCompensation } from "../utils-B-l6410F.mjs";
4
- import { a as OrgAccessDeniedError, c as ServiceUnavailableError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-Cg58SLNi.mjs";
5
- import { a as toJsonSchema, i as isZodSchema, n as convertRouteSchema, r as isJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-Y5EejTnJ.mjs";
2
+ import { a as toJsonSchema, i as isZodSchema, n as convertRouteSchema, r as isJsonSchema, t as convertOpenApiSchemas } from "../schemaConverter-OxfCshus.mjs";
3
+ import { a as createCircuitBreaker, i as CircuitState, n as CircuitBreakerError, o as createCircuitBreakerRegistry, r as CircuitBreakerRegistry, t as CircuitBreaker } from "../circuitBreaker-cmi5XDv5.mjs";
4
+ import { _ as withCompensation, a as getListQueryParams, c as mutationResponse, d as responses, f as successResponseSchema, g as defineCompensation, h as defineGuard, i as getDefaultCrudSchemas, l as paginationSchema, m as handleRaw, n as deleteResponse, o as itemResponse, p as wrapResponse, r as errorResponseSchema, s as listResponse, t as createStateMachine, u as queryParams } from "../utils-yYT3HDXt.mjs";
5
+ import { a as OrgAccessDeniedError, c as ServiceUnavailableError, d as createDomainError, f as createError, i as NotFoundError, l as UnauthorizedError, n as ConflictError, o as OrgRequiredError, p as isArcError, r as ForbiddenError, s as RateLimitError, t as ArcError, u as ValidationError } from "../errors-BF2bIOIS.mjs";
6
6
  import { t as hasEvents } from "../typeGuards-CcFZXgU7.mjs";
7
- export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createError, createQueryParser, createStateMachine, defineCompensation, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, itemWrapper, listResponse, messageWrapper, mutationResponse, paginateWrapper, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };
7
+ export { ArcError, ArcQueryParser, CircuitBreaker, CircuitBreakerError, CircuitBreakerRegistry, CircuitState, ConflictError, ForbiddenError, NotFoundError, OrgAccessDeniedError, OrgRequiredError, RateLimitError, ServiceUnavailableError, UnauthorizedError, ValidationError, convertOpenApiSchemas, convertRouteSchema, createCircuitBreaker, createCircuitBreakerRegistry, createDomainError, createError, createQueryParser, createStateMachine, defineCompensation, defineGuard, deleteResponse, errorResponseSchema, getDefaultCrudSchemas, getListQueryParams, handleRaw, hasEvents, isArcError, isJsonSchema, isZodSchema, itemResponse, listResponse, mutationResponse, paginationSchema, queryParams, responses, successResponseSchema, toJsonSchema, withCompensation, wrapResponse };