@classytic/arc 2.45.1 → 2.46.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 +1 -1
- package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
- package/dist/{EventTransport-4b0noGwa.mjs → EventTransport-DNgD9NP4.mjs} +3 -4
- package/dist/{HookSystem-4pABQnGn.mjs → HookSystem-DRbPzEcP.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-BBaN_Ne-.mjs → ResourceRegistry-Douk51fa.mjs} +15 -4
- package/dist/{acquire-kiZzy5bX.mjs → acquire-RbtvDg9s.mjs} +2 -3
- package/dist/{actionPermissions-BLnbDA6g.mjs → actionPermissions-De0AJ7hm.mjs} +37 -42
- package/dist/audit/index.d.mts +2 -10
- package/dist/audit/index.mjs +8 -12
- package/dist/auth/audit.d.mts +0 -2
- package/dist/auth/audit.mjs +2 -3
- package/dist/auth/index.d.mts +9 -17
- package/dist/auth/index.mjs +26 -29
- package/dist/auth/redis-session.d.mts +2 -4
- package/dist/auth/redis-session.mjs +2 -3
- package/dist/{authorizationDecision-CVlaTjAX.mjs → authorizationDecision-DeZMrHcm.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DSy7KkeX.mjs → boundedMap-2WBh3gM9.mjs} +2 -3
- package/dist/{buildHandler-B4IhILv9.mjs → buildHandler-DxVOOBpw.mjs} +5 -6
- package/dist/cache/index.d.mts +4 -10
- package/dist/cache/index.mjs +5 -6
- package/dist/{caching-DqakP2vY.mjs → caching-BYRwYrUo.mjs} +3 -4
- package/dist/{claimed-XoiVrWZ2.mjs → claimed-DYlELdnm.mjs} +2 -3
- package/dist/cleanup/index.d.mts +9 -18
- package/dist/cleanup/index.mjs +12 -20
- package/dist/cli/commands/describe.d.mts +1 -3
- package/dist/cli/commands/describe.mjs +4 -5
- package/dist/cli/commands/docs.d.mts +1 -3
- package/dist/cli/commands/docs.mjs +4 -5
- package/dist/cli/commands/doctor.d.mts +1 -3
- package/dist/cli/commands/doctor.mjs +2 -3
- package/dist/cli/commands/generate.d.mts +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.d.mts +1 -1
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.d.mts +1 -3
- package/dist/cli/commands/introspect.mjs +3 -4
- package/dist/cli/index.d.mts +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-CtWkmWn3.mjs → constants-CHZMUwBW.mjs} +2 -3
- package/dist/context/index.d.mts +0 -8
- package/dist/context/index.mjs +6 -7
- package/dist/core/index.d.mts +3 -3
- package/dist/core/index.mjs +8 -8
- package/dist/{core-Cro2v5a7.mjs → core-D9rS2BxO.mjs} +9 -12
- package/dist/{createActionRouter-k-gwiPv6.mjs → createActionRouter-0qkCRzTL.mjs} +7 -8
- package/dist/{createAggregationRouter-BqWqhAPG.mjs → createAggregationRouter-CUf5Esd9.mjs} +9 -10
- package/dist/{createApp-Dw7L72Hz.mjs → createApp-DZIXfDKD.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DeVpqQF-.d.mts} +1 -3
- package/dist/{defineAggregation-pxbd7BBK.mjs → defineAggregation-bmKQ4NmC.mjs} +2 -3
- package/dist/{defineResource-DwgEjLCO.mjs → defineResource-CGmdmGwh.mjs} +78 -29
- package/dist/discovery/index.d.mts +1 -3
- package/dist/discovery/index.mjs +2 -3
- package/dist/docs/index.d.mts +8 -8
- package/dist/docs/index.mjs +4 -5
- package/dist/{elevation-B9wF2Z1F.mjs → elevation-CzhqAyVN.mjs} +9 -10
- package/dist/{elevation-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
- package/dist/encryption/index.d.mts +1 -7
- package/dist/encryption/index.mjs +8 -13
- package/dist/{errorHandler--4rSMMvq.d.mts → errorHandler-B9r88jZV.d.mts} +8 -3
- package/dist/{errorHandler-Dr2nG0Ui.mjs → errorHandler-dFyGOEoB.mjs} +16 -6
- package/dist/{errors-BtHzrSA6.mjs → errors-BY8vzlP4.mjs} +2 -3
- package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
- package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
- package/dist/{eventPlugin-Dvs7OBw8.mjs → eventPlugin-eMhAPtQA.mjs} +10 -12
- package/dist/{eventTypes-BVoCTG5c.mjs → eventTypes-Do2KYeJx.mjs} +5 -8
- package/dist/events/index.d.mts +4 -16
- package/dist/events/index.mjs +8 -9
- package/dist/events/transports/redis-stream-entry.d.mts +1 -1
- package/dist/events/transports/redis-stream-entry.mjs +5 -6
- package/dist/events/transports/redis.d.mts +2 -4
- package/dist/events/transports/redis.mjs +3 -4
- package/dist/{externalPaths-CmGOxOtD.d.mts → externalPaths-BOqdq5wr.d.mts} +0 -2
- package/dist/factory/index.d.mts +4 -14
- package/dist/factory/index.mjs +12 -18
- package/dist/{fastify-augmentation-DRlCIWE9.d.mts → fastify-augmentation-Dtn0IIRn.d.mts} +4 -10
- package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
- package/dist/{fields-C1e_7Fwi.mjs → fields-LnbCcvsw.mjs} +2 -3
- package/dist/{filter-merge-xaiEKtz8.mjs → filter-merge-BAWi019Q.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-DJiJMaXN.mjs → generate-oXoDnpJf.mjs} +7 -12
- package/dist/{headers-Dr-wt6Tr.mjs → headers-DBd3Qheo.mjs} +3 -4
- package/dist/{health-DkkWbJtQ.mjs → health-BlJu9GXS.mjs} +2 -3
- package/dist/{health-BLYn_Hds.mjs → health-Dp-3EC9o.mjs} +4 -7
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/idempotency/index.d.mts +3 -9
- package/dist/idempotency/index.mjs +10 -13
- package/dist/idempotency/redis.d.mts +1 -1
- package/dist/idempotency/redis.mjs +3 -4
- package/dist/{index-Bxriq3so.d.mts → index-B5i9-vuP.d.mts} +4 -26
- package/dist/{index-Chgz3d0i.d.mts → index-BAXDo5eE.d.mts} +1 -7
- package/dist/{index-Beg3aNnK.d.mts → index-BTxzJ_MN.d.mts} +67 -25
- package/dist/{index-CUJvoyw3.d.mts → index-Bqfo8hLz.d.mts} +2 -24
- package/dist/{index-uhkUA5-U.d.mts → index-CUdaoCYt.d.mts} +13 -23
- package/dist/{index-WH7xgvxS.d.mts → index-DyJFTJLA.d.mts} +31 -92
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +12 -13
- package/dist/{init-CW3kJqNW.mjs → init-BOaNkLYb.mjs} +18 -35
- package/dist/{init-Cscs4lab.d.mts → init-CV2_Fw3H.d.mts} +0 -4
- package/dist/integrations/event-gateway.d.mts +3 -5
- package/dist/integrations/event-gateway.mjs +3 -4
- package/dist/integrations/index.d.mts +3 -3
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.d.mts +1 -1
- package/dist/integrations/jobs/index.mjs +7 -11
- package/dist/integrations/mcp/index.d.mts +7 -39
- package/dist/integrations/mcp/index.mjs +8 -14
- package/dist/integrations/mcp/testing.d.mts +3 -5
- package/dist/integrations/mcp/testing.mjs +3 -4
- package/dist/integrations/streamline.d.mts +1 -3
- package/dist/integrations/streamline.mjs +4 -5
- package/dist/integrations/webhooks.d.mts +2 -4
- package/dist/integrations/webhooks.mjs +4 -5
- package/dist/integrations/websocket-pushref-redis.d.mts +2 -4
- package/dist/integrations/websocket-pushref-redis.mjs +2 -3
- package/dist/integrations/websocket-redis.d.mts +2 -4
- package/dist/integrations/websocket-redis.mjs +2 -3
- package/dist/integrations/websocket.d.mts +2 -2
- package/dist/integrations/websocket.mjs +13 -24
- package/dist/{interface-JJzwH4Ro.d.mts → interface-BmExzQRD.d.mts} +0 -2
- package/dist/{interface-BOk3YnTz.d.mts → interface-WR1U0K7t.d.mts} +0 -2
- package/dist/{jsonBody-DPU8yYwA.mjs → jsonBody-DpRpKR_K.mjs} +3 -4
- package/dist/{keys-Dgn6OYhl.mjs → keys-FBz6Ull-.mjs} +2 -3
- package/dist/{loadResources-BtKj6P1P.mjs → loadResources-Bx1sKPnF.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-Bmq6TnB7.mjs → loadResourcesFromEntry-b_jcqbxh.mjs} +3 -4
- package/dist/logger/index.d.mts +1 -3
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-qQNLlOAU.mjs → logger-CbFcIEBZ.mjs} +3 -5
- package/dist/{mcpPlugin-DDfe8jAP.mjs → mcpPlugin-yix548XX.mjs} +41 -60
- package/dist/{memory-C0Blueoh.mjs → memory-Bgw5dn8N.mjs} +4 -5
- package/dist/{metrics-DYka72iN.mjs → metrics-CZDQWVjS.mjs} +4 -5
- package/dist/middleware/index.d.mts +1 -5
- package/dist/middleware/index.mjs +4 -5
- package/dist/migrations/index.d.mts +0 -2
- package/dist/migrations/index.mjs +3 -4
- package/dist/{module-BszSyWbd.mjs → module-Dsc_nKL5.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-XCxAUlru.d.mts} +1 -5
- package/dist/{multipartBody-RHvIkNmc.mjs → multipartBody-B85ek8Kj.mjs} +2 -3
- package/dist/observeSend-BK-JN1jK.mjs +20 -0
- package/dist/{openapi-BrFPc3Ny.mjs → openapi-Co7hl073.mjs} +18 -28
- package/dist/outbox-admin/index.d.mts +2 -4
- package/dist/outbox-admin/index.mjs +6 -7
- package/dist/{outbox-module-gZCHoE4H.d.mts → outbox-module-XvUThpqn.d.mts} +2 -8
- package/dist/{outbox-module-DF4Bu_Qa.mjs → outbox-module-mg9kDYkd.mjs} +13 -17
- package/dist/permissions/index.d.mts +4 -4
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-DN1CWH56.mjs → permissions-A1oKtpiC.mjs} +19 -29
- package/dist/{pipe-B8uq865o.mjs → pipe-Czpw9U2n.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-DUGfynNg.mjs → plan-KVseuBCL.mjs} +5 -9
- package/dist/{plugin-ByU3h-bR.mjs → plugin-DTWt_8C3.mjs} +130 -62
- package/dist/plugins/index.d.mts +8 -16
- package/dist/plugins/index.mjs +22 -26
- package/dist/plugins/response-cache.d.mts +2 -4
- package/dist/plugins/response-cache.mjs +10 -10
- package/dist/plugins/tracing-entry.d.mts +1 -1
- package/dist/plugins/tracing-entry.mjs +3 -4
- package/dist/{pluralize-Cdya8zYt.mjs → pluralize-msB9X3yw.mjs} +2 -3
- package/dist/presets/filesUpload.d.mts +4 -6
- package/dist/presets/filesUpload.mjs +6 -7
- package/dist/presets/index.d.mts +3 -19
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.d.mts +1 -1
- package/dist/presets/multiTenant.mjs +7 -7
- package/dist/presets/search.d.mts +3 -5
- package/dist/presets/search.mjs +3 -4
- package/dist/{presets-CCOlKTZw.mjs → presets-qKCehiJM.mjs} +11 -18
- package/dist/{projection-BGty6ie4.mjs → projection-ClBqtsIw.mjs} +3 -4
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-B7itTkWu.mjs → queryCachePlugin-3gJj5Rbz.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-DBWO59H9.mjs → rateLimitKey-Kro---xl.mjs} +2 -3
- package/dist/{realtime-_59Rlje8.mjs → realtime-Ber8uJN2.mjs} +17 -19
- package/dist/{redis-BDgv9Glw.d.mts → redis-RpDMemdm.d.mts} +2 -4
- package/dist/{redis-stream-BMk-bpQS.d.mts → redis-stream-CS1N9dwM.d.mts} +1 -3
- package/dist/{redisShapes-CQksY67q.d.mts → redisShapes-CqBXTn_s.d.mts} +0 -2
- package/dist/registry/index.d.mts +2 -12
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-uG4wr541.mjs → registry-BA-_vFYk.mjs} +7 -12
- package/dist/{renewingLease-CiU3ZynH.mjs → renewingLease-CMY8YOcc.mjs} +2 -3
- package/dist/{replyHelpers-Dr2pnXZg.mjs → replyHelpers-DK9P_XSz.mjs} +3 -4
- package/dist/{requestContext-DBKIdmDi.mjs → requestContext-GYO_0gEw.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{requirement-DxOaghWD.mjs → requirement-DeNjZIH3.mjs} +2 -3
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{resourceRateLimit-BBdj5yRq.mjs → resourceRateLimit-tHLbrtWc.mjs} +3 -4
- package/dist/{rolldown-runtime-DpVPUeXF.mjs → rolldown-runtime-Kv1fZdLg.mjs} +2 -3
- package/dist/{routeValidator-BNTqM1Eh.mjs → routeValidator-C_H5NanI.mjs} +2 -3
- package/dist/{runtimeCapabilities-D_3eUO6V.mjs → runtimeCapabilities-DWqbxkyw.mjs} +2 -3
- package/dist/{schedules-CVS7c1nv.mjs → schedules-eO_RzhCU.mjs} +132 -9
- package/dist/{schemaConverter-BQbg7loK.mjs → schemaConverter-DBJrPZN4.mjs} +3 -4
- package/dist/{schemaIR-CUI3hPQR.mjs → schemaIR-CEScKT2v.mjs} +3 -4
- package/dist/schemas/index.d.mts +0 -2
- package/dist/schemas/index.mjs +2 -3
- package/dist/scim/index.d.mts +0 -12
- package/dist/scim/index.mjs +10 -18
- package/dist/scope/index.d.mts +2 -6
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-DFXngazv.mjs → scope-B-Sm9m_E.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-BCXCwghd.mjs → shutdown-DzLFbe27.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-5jOzYQ_L.mjs → simpleEqualityMatcher-DOJhwQ8g.mjs} +2 -3
- package/dist/{sse-BilBz766.mjs → sse-2972pVwV.mjs} +8 -9
- package/dist/{sseStream-BG_uJL6J.mjs → sseStream-AWLEeNV-.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-CzLZdVa1.mjs → store-helpers-VzjgVTkM.mjs} +2 -3
- package/dist/{streaming-DgUvMWlv.mjs → streaming-DvraWW6x.mjs} +2 -3
- package/dist/{subscriberIdentity-EWnIZ-U8.mjs → subscriberIdentity-Bya56jsg.mjs} +2 -3
- package/dist/{tenancy-CVMvO5DH.mjs → tenancy-DSa_0hhw.mjs} +3 -4
- package/dist/{tenantPreparation-DIH-GX4g.mjs → tenantPreparation-BrpkQre3.mjs} +5 -6
- package/dist/testing/cleanupStoreContract.d.mts +2 -4
- package/dist/testing/cleanupStoreContract.mjs +2 -3
- package/dist/testing/index.d.mts +6 -32
- package/dist/testing/index.mjs +24 -37
- package/dist/testing/outboxStoreContract.d.mts +1 -3
- package/dist/testing/outboxStoreContract.mjs +3 -4
- package/dist/testing/requiredPorts.d.mts +2 -4
- package/dist/testing/requiredPorts.mjs +3 -4
- package/dist/testing/storageContract.d.mts +2 -4
- package/dist/testing/storageContract.mjs +2 -3
- package/dist/{timing-q9NITK04.mjs → timing-6rQTuCwg.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-NHmhDIOF.mjs → transactionContext-DaxYUEgH.mjs} +2 -3
- package/dist/{typeGuards-CPYR9RCg.mjs → typeGuards-UKnX8wPX.mjs} +2 -3
- package/dist/types/index.d.mts +4 -4
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.d.mts +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-ByHn9rEO.d.mts → types-0Dqlbgn8.d.mts} +0 -2
- package/dist/{types-D3Ixsh00.d.mts → types-BYEb_dLW.d.mts} +2 -4
- package/dist/{types-BJ-2XqVF.d.mts → types-BeEJm-DV.d.mts} +114 -14
- package/dist/{types-DVLddu2q.d.mts → types-C0YJAiL0.d.mts} +0 -2
- package/dist/{types-BI4sbUJ3.mjs → types-CuGjhn83.mjs} +5 -6
- package/dist/{types-Ddl9OjmE.d.mts → types-DnkIALZ8.d.mts} +0 -4
- package/dist/usage/index.d.mts +2 -10
- package/dist/usage/index.mjs +8 -12
- package/dist/{userHelpers-oBTU3a_k.mjs → userHelpers-oX5_mOVs.mjs} +2 -3
- package/dist/utils/index.d.mts +5 -39
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BmE8zRrh.mjs → utils-CjjGOT4E.mjs} +20 -30
- package/dist/{validate-Dby08LhR.mjs → validate-4RlTKOJb.mjs} +5 -7
- package/dist/{versioning-P6JMNcJr.mjs → versioning-Dk2-19La.mjs} +4 -5
- package/dist/{versioning-Bqm_57Qt.d.mts → versioning-S18y2-0C.d.mts} +1 -15
- package/dist/{websocket-Cs4awVyD.d.mts → websocket-BGuc-WVZ.d.mts} +1 -15
- package/dist/{workScope-BcMLKa3G.mjs → workScope-DoBsoVo4.mjs} +3 -4
- package/llms.txt +37 -30
- package/package.json +9 -8
- package/skills/arc/SKILL.md +65 -844
- package/skills/arc/references/agent-auth.md +82 -193
- package/skills/arc/references/api-reference.md +41 -245
- package/skills/arc/references/auth-api-keys.md +99 -0
- package/skills/arc/references/auth-better-auth-overlay.md +87 -0
- package/skills/arc/references/auth-better-auth.md +78 -0
- package/skills/arc/references/auth-permissions.md +100 -0
- package/skills/arc/references/auth-strategies.md +122 -0
- package/skills/arc/references/boot.md +80 -0
- package/skills/arc/references/enterprise-auth.md +65 -81
- package/skills/arc/references/events-outbox.md +90 -0
- package/skills/arc/references/events.md +75 -440
- package/skills/arc/references/integrations-jobs.md +74 -0
- package/skills/arc/references/integrations-realtime.md +84 -0
- package/skills/arc/references/integrations-webhooks.md +71 -0
- package/skills/arc/references/integrations-workflows.md +47 -0
- package/skills/arc/references/mcp-auth.md +83 -0
- package/skills/arc/references/mcp-custom-tools.md +125 -0
- package/skills/arc/references/mcp-setup.md +115 -0
- package/skills/arc/references/mcp-testing.md +63 -0
- package/skills/arc/references/multi-tenancy.md +56 -230
- package/skills/arc/references/permissions-scope.md +81 -0
- package/skills/arc/references/production-api.md +119 -0
- package/skills/arc/references/production-audit.md +101 -0
- package/skills/arc/references/production-boot.md +91 -0
- package/skills/arc/references/production-caching.md +63 -0
- package/skills/arc/references/production-distributed.md +75 -0
- package/skills/arc/references/production-idempotency.md +83 -0
- package/skills/arc/references/production-observability.md +83 -0
- package/skills/arc/references/production-realtime.md +70 -0
- package/skills/arc/references/production-reliability.md +100 -0
- package/skills/arc/references/production-shutdown.md +43 -0
- package/skills/arc/references/querying.md +76 -0
- package/skills/arc/references/resources.md +97 -0
- package/skills/arc/references/schedules.md +79 -0
- package/skills/arc/references/scim.md +61 -208
- package/skills/arc/references/tenancy-scope-install.md +82 -0
- package/skills/arc/references/testing.md +101 -144
- package/skills/arc/references/usage-cleanup-capabilities.md +45 -0
- package/skills/arc/references/validation.md +91 -0
- package/skills/arc/references/writes-hooks-errors.md +80 -0
- package/skills/arc-code-review/SKILL.md +67 -114
- package/skills/arc-code-review/references/arc-cheatsheet.md +68 -167
- package/skills/arc-code-review/references/mongokit-repositories.md +104 -0
- package/skills/arc-code-review/references/recipe-events-cache-jobs.md +112 -0
- package/skills/arc-code-review/references/recipe-resource.md +100 -0
- package/skills/arc-code-review/references/recipe-schemas-fields.md +93 -0
- package/skills/arc-code-review/references/recipe-scope-permissions.md +82 -0
- package/skills/arc-code-review/references/scaffolding.md +61 -198
- package/skills/arc-code-review/references/severity.md +49 -102
- package/skills/arc-code-review/references/smells-auth-scope.md +80 -0
- package/skills/arc-code-review/references/smells-data-events.md +66 -0
- package/skills/arc-code-review/references/smells-imports-style.md +59 -0
- package/skills/arc-code-review/references/smells-platform.md +89 -0
- package/skills/arc-code-review/references/smells-routes-schemas.md +66 -0
- package/skills/arc-module-publishing/SKILL.md +82 -208
- package/skills/arc-module-publishing/references/action-presets-and-plugins.md +87 -0
- package/skills/arc-module-publishing/references/build-and-types.md +73 -0
- package/skills/arc-module-publishing/references/module-lifecycle.md +101 -0
- package/skills/arc-module-publishing/references/package-manifest.md +34 -122
- package/skills/arc-module-publishing/references/publishing-workflow.md +44 -140
- package/skills/arc-module-publishing/references/resource-assembly.md +102 -0
- package/skills/arc-module-publishing/references/testing-packages.md +82 -0
- package/skills/arc/references/auth.md +0 -729
- package/skills/arc/references/integrations.md +0 -452
- package/skills/arc/references/mcp.md +0 -691
- package/skills/arc/references/production.md +0 -835
- package/skills/arc-code-review/references/anti-patterns.md +0 -1008
- package/skills/arc-code-review/references/migration-recipes.md +0 -649
- package/skills/arc-code-review/references/mongokit-migration.md +0 -360
- package/skills/arc-module-publishing/references/authoring-modules.md +0 -327
package/dist/factory/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as mergeHealthChecks, t as healthPlugin } from "../health-
|
|
3
|
-
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-
|
|
4
|
-
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-
|
|
5
|
-
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-
|
|
6
|
-
import { t as loadResources } from "../loadResources-
|
|
7
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as mergeHealthChecks, t as healthPlugin } from "../health-Dp-3EC9o.mjs";
|
|
3
|
+
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-DZIXfDKD.mjs";
|
|
4
|
+
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-KVseuBCL.mjs";
|
|
5
|
+
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-Dsc_nKL5.mjs";
|
|
6
|
+
import { t as loadResources } from "../loadResources-Bx1sKPnF.mjs";
|
|
7
|
+
// src/factory/module/asyncapi.ts
|
|
8
8
|
/**
|
|
9
9
|
* The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
|
|
10
10
|
* name, payload from the event registry), a `send` operation for its owner and a `receive` for
|
|
@@ -58,8 +58,7 @@ function toAsyncApi(graph, catalog, info, analysis = analyzeModuleGraph(graph))
|
|
|
58
58
|
components: { messages }
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
|
|
62
|
-
//#region src/factory/module/extend.ts
|
|
61
|
+
// src/factory/module/extend.ts
|
|
63
62
|
/** Concatenate two contributions, resolving factories only when arc asks. */
|
|
64
63
|
function mergeContribution(own, extra) {
|
|
65
64
|
if (own === void 0) return extra;
|
|
@@ -200,8 +199,7 @@ function extendModule(mod, extension) {
|
|
|
200
199
|
if (extension.bootstrap) out.bootstrap = extension.bootstrap(mod.bootstrap);
|
|
201
200
|
return out;
|
|
202
201
|
}
|
|
203
|
-
|
|
204
|
-
//#region src/factory/module/relay-nudge.ts
|
|
202
|
+
// src/factory/module/relay-nudge.ts
|
|
205
203
|
function isRelayFromModule(relay) {
|
|
206
204
|
return typeof relay === "object" && relay !== null && "fromModule" in relay;
|
|
207
205
|
}
|
|
@@ -252,8 +250,7 @@ function createRelayNudge(label, relay) {
|
|
|
252
250
|
}
|
|
253
251
|
};
|
|
254
252
|
}
|
|
255
|
-
|
|
256
|
-
//#region src/factory/createWorker.ts
|
|
253
|
+
// src/factory/createWorker.ts
|
|
257
254
|
async function createWorker(options, workerOptions = {}) {
|
|
258
255
|
const { auth: _auth, helmet: _helmet, cors: _cors, rateLimit: _rateLimit, multipart: _multipart, rawBody: _rawBody, sensible: _sensible, underPressure: _underPressure, replyHelpers: _replyHelpers, ...runtimeOptions } = options;
|
|
259
256
|
const sharedHealth = typeof runtimeOptions.arcPlugins?.health === "object" && runtimeOptions.arcPlugins.health !== null ? runtimeOptions.arcPlugins.health : {};
|
|
@@ -313,8 +310,7 @@ async function createWorker(options, workerOptions = {}) {
|
|
|
313
310
|
}
|
|
314
311
|
};
|
|
315
312
|
}
|
|
316
|
-
|
|
317
|
-
//#region src/factory/edge.ts
|
|
313
|
+
// src/factory/edge.ts
|
|
318
314
|
/**
|
|
319
315
|
* Convert a Fastify app into a Web Standards fetch handler.
|
|
320
316
|
*
|
|
@@ -379,8 +375,7 @@ function payloadTooLarge(limit) {
|
|
|
379
375
|
headers: { "content-type": "application/json" }
|
|
380
376
|
});
|
|
381
377
|
}
|
|
382
|
-
|
|
383
|
-
//#region src/factory/preloadResources.ts
|
|
378
|
+
// src/factory/preloadResources.ts
|
|
384
379
|
/**
|
|
385
380
|
* Normalize an eager `import.meta.glob` result into a `ResourceLike[]`.
|
|
386
381
|
*
|
|
@@ -423,5 +418,4 @@ function pickResource(value) {
|
|
|
423
418
|
];
|
|
424
419
|
for (const c of candidates) if (c && typeof c === "object" && typeof c.toPlugin === "function") return c;
|
|
425
420
|
}
|
|
426
|
-
//#endregion
|
|
427
421
|
export { ArcFactory, DEFAULT_LOGGER_REDACT_PATHS, activateBridges, analyzeModuleGraph, assertComposable, buildModuleGraph, collectModuleWorkflows, compositionProblems, createApp, createRelayNudge, createWorker, crudEventsOf, defineModule, dependentsOf, developmentPreset, edgePreset, eventTopology, extendModule, getModuleExports, getModuleResources, getModuleState, getOptionalModuleExports, getPreset, hasModule, hasModuleExports, lazyModuleExports, lazyRequiredModuleExports, loadResources, orderModules, planModules, preloadResources, preloadResourcesAsync, productionPreset, renderModuleGraph, resolveContribution, resolveModule, resolveModuleClosure, subscribeModuleEventHandlers, testingPreset, toAsyncApi, toFetchHandler, verifyEventDurability, verifyModuleGraph, withRelayNudge };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { M as ResourceRegistry, dn as HookSystem } from "./index-
|
|
3
|
-
import { t as ExternalOpenApiPaths } from "./externalPaths-
|
|
4
|
-
import {
|
|
5
|
-
import { L as ModuleGraph, s as ModuleState } from "./index-
|
|
2
|
+
import { M as ResourceRegistry, dn as HookSystem } from "./index-DyJFTJLA.mjs";
|
|
3
|
+
import { t as ExternalOpenApiPaths } from "./externalPaths-BOqdq5wr.mjs";
|
|
4
|
+
import { F as HealthCheck, i as ArcModuleRegistry, n as ArcModule, x as ScheduleDefinition } from "./types-BeEJm-DV.mjs";
|
|
5
|
+
import { L as ModuleGraph, s as ModuleState } from "./index-Bqfo8hLz.mjs";
|
|
6
6
|
import { FastifyPluginAsync } from "fastify";
|
|
7
|
-
//#region src/factory/module/descriptor.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Resolved module introspection — what a module ACTUALLY composed to.
|
|
10
9
|
*
|
|
@@ -65,8 +64,6 @@ interface ResolvedModuleDescriptor {
|
|
|
65
64
|
readonly owns: readonly string[];
|
|
66
65
|
readonly lifecycle: ResolvedModuleLifecycle;
|
|
67
66
|
}
|
|
68
|
-
//#endregion
|
|
69
|
-
//#region src/core/arcCorePlugin.d.ts
|
|
70
67
|
interface ArcCorePluginOptions {
|
|
71
68
|
/** Enable event emission for CRUD operations (requires eventPlugin) */
|
|
72
69
|
emitEvents?: boolean;
|
|
@@ -154,12 +151,9 @@ interface ArcCore {
|
|
|
154
151
|
scheduledJobs?: readonly Readonly<ScheduleDefinition>[];
|
|
155
152
|
}
|
|
156
153
|
declare const _default: FastifyPluginAsync<ArcCorePluginOptions>;
|
|
157
|
-
//#endregion
|
|
158
|
-
//#region src/types/fastify-augmentation.d.ts
|
|
159
154
|
declare module "fastify" {
|
|
160
155
|
interface FastifyInstance {
|
|
161
156
|
arc?: ArcCore;
|
|
162
157
|
}
|
|
163
158
|
}
|
|
164
|
-
//#endregion
|
|
165
159
|
export { ResolvedModuleDescriptor as a, _default as i, ArcCorePluginOptions as n, ResolvedModuleLifecycle as o, PluginMeta as r, ResolvedResourceDescriptor as s, ArcCore as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/permissions/fields.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Field-Level Permissions
|
|
5
4
|
*
|
|
@@ -118,5 +117,4 @@ declare function applyFieldWritePermissions<T extends Record<string, unknown>>(b
|
|
|
118
117
|
* When no org context exists, returns global roles only — backward compatible.
|
|
119
118
|
*/
|
|
120
119
|
declare function resolveEffectiveRoles(userRoles: readonly string[], orgRoles: readonly string[]): string[];
|
|
121
|
-
//#endregion
|
|
122
120
|
export { applyFieldReadPermissions as a, resolveEffectiveRoles as c, FieldWritePermissionResult as i, FieldPermissionMap as n, applyFieldWritePermissions as o, FieldPermissionType as r, fields as s, FieldPermission as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/permissions/fields.ts
|
|
3
3
|
/**
|
|
4
4
|
* Field-Level Permissions
|
|
5
5
|
*
|
|
@@ -195,5 +195,4 @@ function resolveEffectiveRoles(userRoles, orgRoles) {
|
|
|
195
195
|
if (userRoles.length === 0) return [...orgRoles];
|
|
196
196
|
return [.../* @__PURE__ */ new Set([...userRoles, ...orgRoles])];
|
|
197
197
|
}
|
|
198
|
-
//#endregion
|
|
199
198
|
export { resolveEffectiveRoles as a, fields as i, applyFieldWritePermissions as n, deriveHiddenFieldPermissions as r, applyFieldReadPermissions as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/permissions/filter-merge.ts
|
|
3
3
|
/**
|
|
4
4
|
* Policy-filter composition — logical AND, never last-writer-wins.
|
|
5
5
|
*
|
|
@@ -95,5 +95,4 @@ function conjoinPolicyFilters(base, incoming) {
|
|
|
95
95
|
}
|
|
96
96
|
return result;
|
|
97
97
|
}
|
|
98
|
-
//#endregion
|
|
99
98
|
export { conjoinPolicyFilters as t };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/cli/commands/generate/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* `arc generate` orchestrator.
|
|
5
4
|
*
|
|
@@ -19,8 +18,6 @@
|
|
|
19
18
|
* no network, no DB, no global state.
|
|
20
19
|
*/
|
|
21
20
|
declare function generate(type: string | undefined, args: string[]): Promise<void>;
|
|
22
|
-
//#endregion
|
|
23
|
-
//#region src/cli/commands/generate/types.d.ts
|
|
24
21
|
/**
|
|
25
22
|
* Shared types for the `arc generate` scaffolder.
|
|
26
23
|
*
|
|
@@ -35,5 +32,4 @@ interface ArcProjectConfig {
|
|
|
35
32
|
typescript?: boolean;
|
|
36
33
|
mcp?: boolean;
|
|
37
34
|
}
|
|
38
|
-
//#endregion
|
|
39
35
|
export { generate as n, ArcProjectConfig as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as pluralize } from "./pluralize-msB9X3yw.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
|
-
|
|
5
|
+
// src/cli/commands/generate/name-helpers.ts
|
|
6
6
|
/**
|
|
7
7
|
* Case conversion for resource-name normalisation.
|
|
8
8
|
*
|
|
@@ -21,8 +21,7 @@ function toPascalCase(name) {
|
|
|
21
21
|
function toCamelCase(pascalName) {
|
|
22
22
|
return pascalName.charAt(0).toLowerCase() + pascalName.slice(1);
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
//#region src/cli/commands/generate/project-config.ts
|
|
24
|
+
// src/cli/commands/generate/project-config.ts
|
|
26
25
|
/**
|
|
27
26
|
* Read the host project's `.arcrc` (written at scaffold time by `arc init`)
|
|
28
27
|
* and detect whether it's a TypeScript project via the presence of
|
|
@@ -42,8 +41,7 @@ function readProjectConfig() {
|
|
|
42
41
|
function isTypeScriptProject() {
|
|
43
42
|
return existsSync(join(process.cwd(), "tsconfig.json"));
|
|
44
43
|
}
|
|
45
|
-
|
|
46
|
-
//#region src/cli/commands/generate/file-writer.ts
|
|
44
|
+
// src/cli/commands/generate/file-writer.ts
|
|
47
45
|
/**
|
|
48
46
|
* Scaffolding I/O for `arc generate`.
|
|
49
47
|
*
|
|
@@ -134,8 +132,7 @@ async function generateFile(name, lowerName, resourcePath, fileType, template, e
|
|
|
134
132
|
writeFileSync(filepath, template(name, lowerName));
|
|
135
133
|
console.log(` + Created: ${filename}`);
|
|
136
134
|
}
|
|
137
|
-
|
|
138
|
-
//#region src/cli/commands/generate/templates.ts
|
|
135
|
+
// src/cli/commands/generate/templates.ts
|
|
139
136
|
/**
|
|
140
137
|
* Template factory for `arc generate`.
|
|
141
138
|
*
|
|
@@ -579,8 +576,7 @@ describe('${name} Resource', () => {
|
|
|
579
576
|
}
|
|
580
577
|
};
|
|
581
578
|
}
|
|
582
|
-
|
|
583
|
-
//#region src/cli/commands/generate/index.ts
|
|
579
|
+
// src/cli/commands/generate/index.ts
|
|
584
580
|
/**
|
|
585
581
|
* `arc generate` orchestrator.
|
|
586
582
|
*
|
|
@@ -653,5 +649,4 @@ async function generate(type, args) {
|
|
|
653
649
|
default: throw new Error(`Unknown type: ${type}\nAvailable types: resource, controller, model, repository, schemas, mcp`);
|
|
654
650
|
}
|
|
655
651
|
}
|
|
656
|
-
//#endregion
|
|
657
652
|
export { generate as t };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { u as ValidationError } from "./errors-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { u as ValidationError } from "./errors-BY8vzlP4.mjs";
|
|
3
|
+
// src/utils/headers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Canonical header typing + accessor.
|
|
6
6
|
*
|
|
@@ -42,5 +42,4 @@ function requireSingleHeaderValue(headers, name) {
|
|
|
42
42
|
if (Array.isArray(value)) throw new ValidationError(`Duplicate '${name}' header`);
|
|
43
43
|
return value;
|
|
44
44
|
}
|
|
45
|
-
//#endregion
|
|
46
45
|
export { requireSingleHeaderValue as n, getHeader as t };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/events/outbox/health.ts
|
|
3
3
|
/** Pending age past which the relay counts as stalled. */
|
|
4
4
|
const DEFAULT_RELAY_LAG_UNHEALTHY_MS = 3e5;
|
|
5
5
|
function canReportHealth(store) {
|
|
@@ -18,5 +18,4 @@ async function readOutboxHealth(store, relayLagUnhealthyMs = DEFAULT_RELAY_LAG_U
|
|
|
18
18
|
healthy: deadLetter === 0 && (relayLagMs === null || relayLagMs < relayLagUnhealthyMs)
|
|
19
19
|
};
|
|
20
20
|
}
|
|
21
|
-
//#endregion
|
|
22
21
|
export { canReportHealth as n, readOutboxHealth as r, DEFAULT_RELAY_LAG_UNHEALTHY_MS as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
|
-
|
|
4
|
+
// src/plugins/requestId.ts
|
|
5
5
|
/**
|
|
6
6
|
* Request ID Plugin
|
|
7
7
|
*
|
|
@@ -110,8 +110,7 @@ var requestId_default = fp(requestIdPlugin, {
|
|
|
110
110
|
name: "arc-request-id",
|
|
111
111
|
fastify: "5.x"
|
|
112
112
|
});
|
|
113
|
-
|
|
114
|
-
//#region src/utils/metricSeries.ts
|
|
113
|
+
// src/utils/metricSeries.ts
|
|
115
114
|
/** Retains a fixed number of label sets; excess observations share one overflow series. */
|
|
116
115
|
var MetricSeries = class {
|
|
117
116
|
data = /* @__PURE__ */ new Map();
|
|
@@ -219,8 +218,7 @@ function renderMetricSample(name, sample) {
|
|
|
219
218
|
const labels = Object.entries(sample.labels).map(([key, value]) => `${key}="${value.replaceAll("\\", "\\\\").replaceAll("\n", "\\n").replaceAll("\"", "\\\"")}"`).join(",");
|
|
220
219
|
return `${name}${sample.suffix ?? ""}${labels ? `{${labels}}` : ""} ${sample.value}`;
|
|
221
220
|
}
|
|
222
|
-
|
|
223
|
-
//#region src/plugins/health.ts
|
|
221
|
+
// src/plugins/health.ts
|
|
224
222
|
/**
|
|
225
223
|
* Merge health checks without losing ownership information.
|
|
226
224
|
*
|
|
@@ -442,5 +440,4 @@ var health_default = fp(healthPlugin, {
|
|
|
442
440
|
name: "arc-health",
|
|
443
441
|
fastify: "5.x"
|
|
444
442
|
});
|
|
445
|
-
//#endregion
|
|
446
443
|
export { MetricHistogram as a, createRequestIdGenerator as c, DURATION_BUCKETS_SECONDS as i, requestId_default as l, health_default as n, MetricSeries as o, mergeHealthChecks as r, renderMetricSample as s, healthPlugin as t, sanitizeRequestId as u };
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { _n as beforeDelete, an as DefineHookOptions, bn as defineHook, cn as HookOperation, dn as HookSystem, fn as HookSystemOptions, gn as beforeCreate, hn as afterUpdate, in as AroundHookHandler, ln as HookPhase, mn as afterDelete, on as HookContext, pn as afterCreate, sn as HookHandler, un as HookRegistration, vn as beforeUpdate, yn as createHookSystem } from "../index-
|
|
2
|
+
import { _n as beforeDelete, an as DefineHookOptions, bn as defineHook, cn as HookOperation, dn as HookSystem, fn as HookSystemOptions, gn as beforeCreate, hn as afterUpdate, in as AroundHookHandler, ln as HookPhase, mn as afterDelete, on as HookContext, pn as afterCreate, sn as HookHandler, un as HookRegistration, vn as beforeUpdate, yn as createHookSystem } from "../index-DyJFTJLA.mjs";
|
|
3
3
|
export { type AroundHookHandler, type DefineHookOptions, type HookContext, type HookHandler, type HookOperation, type HookPhase, type HookRegistration, HookSystem, type HookSystemOptions, afterCreate, afterDelete, afterUpdate, beforeCreate, beforeDelete, beforeUpdate, createHookSystem, defineHook };
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DRbPzEcP.mjs";
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { t as RouteIdempotencyConfig } from "../requirement-
|
|
3
|
-
import { a as createIdempotencyResult, i as IdempotencyStore, n as IdempotencyLock, r as IdempotencyResult, t as IdempotencyAcquisition } from "../interface-
|
|
4
|
-
import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-
|
|
2
|
+
import { t as RouteIdempotencyConfig } from "../requirement-CTRQjjQx.mjs";
|
|
3
|
+
import { a as createIdempotencyResult, i as IdempotencyStore, n as IdempotencyLock, r as IdempotencyResult, t as IdempotencyAcquisition } from "../interface-BmExzQRD.mjs";
|
|
4
|
+
import { i as RedisIdempotencyStoreOptions, n as RedisClient } from "../redis-RpDMemdm.mjs";
|
|
5
5
|
import { FastifyPluginAsync } from "fastify";
|
|
6
6
|
import { RepositoryLike } from "@classytic/repo-core/adapter";
|
|
7
|
-
//#region src/idempotency/idempotencyPlugin.d.ts
|
|
8
7
|
interface IdempotencyPluginOptions {
|
|
9
8
|
/** Enable idempotency (default: false) */
|
|
10
9
|
enabled?: boolean;
|
|
@@ -128,8 +127,6 @@ declare module "fastify" {
|
|
|
128
127
|
}
|
|
129
128
|
}
|
|
130
129
|
declare const _default: FastifyPluginAsync<IdempotencyPluginOptions>;
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/idempotency/repository-idempotency-adapter.d.ts
|
|
133
130
|
/**
|
|
134
131
|
* The backing repository returned a document whose key does not match the
|
|
135
132
|
* key that was asked for — which means the repository is NOT applying the
|
|
@@ -159,8 +156,6 @@ export declare class IdempotencyStoreMisconfiguredError extends Error {
|
|
|
159
156
|
constructor(operation: string, expectedKey: string, actualKey: unknown);
|
|
160
157
|
}
|
|
161
158
|
export declare function repositoryAsIdempotencyStore(repository: RepositoryLike, defaultTtlMs: number): IdempotencyStore;
|
|
162
|
-
//#endregion
|
|
163
|
-
//#region src/idempotency/stores/memory.d.ts
|
|
164
159
|
interface MemoryIdempotencyStoreOptions {
|
|
165
160
|
/** Default TTL in milliseconds (default: 86400000 = 24h) */
|
|
166
161
|
ttlMs?: number;
|
|
@@ -198,5 +193,4 @@ export declare class MemoryIdempotencyStore implements IdempotencyStore {
|
|
|
198
193
|
private cleanup;
|
|
199
194
|
private evictOldest;
|
|
200
195
|
}
|
|
201
|
-
//#endregion
|
|
202
196
|
export { type IdempotencyAcquisition, type IdempotencyLock, type IdempotencyPluginOptions, type IdempotencyResult, type IdempotencyStore, type MemoryIdempotencyStoreOptions, type RedisClient, type RedisIdempotencyStoreOptions, createIdempotencyResult, _default as idempotencyPlugin };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as createDomainError } from "../errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
4
|
-
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-
|
|
5
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-
|
|
6
|
-
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-
|
|
7
|
-
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError } from "../errors-BY8vzlP4.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-DBd3Qheo.mjs";
|
|
4
|
+
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-DeNjZIH3.mjs";
|
|
5
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-VzjgVTkM.mjs";
|
|
6
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-6rQTuCwg.mjs";
|
|
7
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-RbtvDg9s.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
11
|
import fp from "fastify-plugin";
|
|
12
12
|
import { IdempotencyError, fingerprintRequest } from "@classytic/repo-core/idempotency";
|
|
13
13
|
import { update } from "@classytic/repo-core/update";
|
|
14
|
-
|
|
14
|
+
// src/idempotency/repository-idempotency-adapter.ts
|
|
15
15
|
/**
|
|
16
16
|
* The backing repository returned a document whose key does not match the
|
|
17
17
|
* key that was asked for — which means the repository is NOT applying the
|
|
@@ -233,8 +233,7 @@ function completedResult(doc, key) {
|
|
|
233
233
|
function isCompleted(doc) {
|
|
234
234
|
return typeof doc.result?.statusCode === "number";
|
|
235
235
|
}
|
|
236
|
-
|
|
237
|
-
//#region src/idempotency/stores/memory.ts
|
|
236
|
+
// src/idempotency/stores/memory.ts
|
|
238
237
|
var MemoryIdempotencyStore = class {
|
|
239
238
|
name = "memory";
|
|
240
239
|
completionReleasesLock = true;
|
|
@@ -376,8 +375,7 @@ var MemoryIdempotencyStore = class {
|
|
|
376
375
|
}
|
|
377
376
|
}
|
|
378
377
|
};
|
|
379
|
-
|
|
380
|
-
//#region src/idempotency/idempotencyPlugin.ts
|
|
378
|
+
// src/idempotency/idempotencyPlugin.ts
|
|
381
379
|
/**
|
|
382
380
|
* Completion replay for mutations. Authentication, permission and tenant preparation must
|
|
383
381
|
* precede the middleware: principal/scope identity isolates keys; fingerprints reject reuse
|
|
@@ -609,5 +607,4 @@ var idempotencyPlugin_default = fp(idempotencyPlugin, {
|
|
|
609
607
|
name: "arc-idempotency",
|
|
610
608
|
fastify: "5.x"
|
|
611
609
|
});
|
|
612
|
-
//#endregion
|
|
613
610
|
export { IdempotencyStoreMisconfiguredError, MemoryIdempotencyStore, createIdempotencyResult, idempotencyPlugin_default as idempotencyPlugin, repositoryAsIdempotencyStore };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as UpstashRedisLike, i as RedisIdempotencyStoreOptions, n as RedisClient, o as ioredisAsIdempotencyClient, r as RedisIdempotencyStore, s as upstashAsIdempotencyClient, t as IoredisLike } from "../redis-
|
|
2
|
+
import { a as UpstashRedisLike, i as RedisIdempotencyStoreOptions, n as RedisClient, o as ioredisAsIdempotencyClient, r as RedisIdempotencyStore, s as upstashAsIdempotencyClient, t as IoredisLike } from "../redis-RpDMemdm.mjs";
|
|
3
3
|
export { type IoredisLike, type RedisClient, RedisIdempotencyStore, type RedisIdempotencyStoreOptions, type UpstashRedisLike, ioredisAsIdempotencyClient, upstashAsIdempotencyClient };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as acquireBySteps } from "../acquire-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as acquireBySteps } from "../acquire-RbtvDg9s.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
|
|
4
|
+
// src/idempotency/stores/redis.ts
|
|
5
5
|
/**
|
|
6
6
|
* Redis Idempotency Store
|
|
7
7
|
*
|
|
@@ -292,5 +292,4 @@ function upstashAsIdempotencyClient(client) {
|
|
|
292
292
|
async disconnect() {}
|
|
293
293
|
};
|
|
294
294
|
}
|
|
295
|
-
//#endregion
|
|
296
295
|
export { RedisIdempotencyStore, ioredisAsIdempotencyClient, upstashAsIdempotencyClient };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as RequestScope, n as Mandate } from "./types-
|
|
3
|
-
import { c as DataPolicy, l as PermissionCheck, s as AuthorizationDecision, u as PermissionContext } from "./base-
|
|
4
|
-
import { r as CacheStore, t as CacheLogger } from "./interface-
|
|
5
|
-
import "./resourceRateLimit-
|
|
2
|
+
import { i as RequestScope, n as Mandate } from "./types-DnkIALZ8.mjs";
|
|
3
|
+
import { c as DataPolicy, l as PermissionCheck, s as AuthorizationDecision, u as PermissionContext } from "./base-HXNgPQww.mjs";
|
|
4
|
+
import { r as CacheStore, t as CacheLogger } from "./interface-WR1U0K7t.mjs";
|
|
5
|
+
import "./resourceRateLimit-DCWglD7V.mjs";
|
|
6
6
|
import { FastifyInstance, FastifyReply, FastifyRequest } from "fastify";
|
|
7
|
-
//#region src/permissions/agent.d.ts
|
|
8
7
|
/**
|
|
9
8
|
* Require a sender-constrained credential — the inbound token MUST carry a
|
|
10
9
|
* DPoP proof (RFC 9449) bound to a known key. Arc reads `scope.dpopJkt` (the
|
|
@@ -163,8 +162,6 @@ interface RequireAgentScopeOptions<TDoc = Record<string, unknown>> extends Requi
|
|
|
163
162
|
* ```
|
|
164
163
|
*/
|
|
165
164
|
declare function requireAgentScope<TDoc = Record<string, unknown>>(opts: RequireAgentScopeOptions<TDoc>): PermissionCheck<TDoc>;
|
|
166
|
-
//#endregion
|
|
167
|
-
//#region src/permissions/authorizationDecision.d.ts
|
|
168
165
|
/**
|
|
169
166
|
* A permission check returns either a bare boolean (terse allow/deny sugar) or
|
|
170
167
|
* a full {@link AuthorizationDecision}. There is no legacy `PermissionResult` —
|
|
@@ -214,8 +211,6 @@ declare function evaluatePermissionDecision(check: PermissionCheck, context: Per
|
|
|
214
211
|
* installed (and the obligation seam lives).
|
|
215
212
|
*/
|
|
216
213
|
declare function applyAuthorizationDecision(decision: AuthorizationDecision, req: FastifyRequest): void;
|
|
217
|
-
//#endregion
|
|
218
|
-
//#region src/permissions/context.d.ts
|
|
219
214
|
/**
|
|
220
215
|
* Resolve the request scope for a permission check. Prefers the context's
|
|
221
216
|
* first-class `scope`; falls back to the raw HTTP `request.scope` when present,
|
|
@@ -224,8 +219,6 @@ declare function applyAuthorizationDecision(decision: AuthorizationDecision, req
|
|
|
224
219
|
* (MCP, jobs) — which have no request — resolve identity correctly.
|
|
225
220
|
*/
|
|
226
221
|
declare function scopeOf(ctx: PermissionContext): RequestScope;
|
|
227
|
-
//#endregion
|
|
228
|
-
//#region src/permissions/core.d.ts
|
|
229
222
|
/**
|
|
230
223
|
* Build an `allow` {@link AuthorizationDecision}, optionally attaching a row-level
|
|
231
224
|
* `policy` and/or a `scope` to install. The idiomatic "grant" return for arc
|
|
@@ -460,8 +453,6 @@ declare function denyAll(reason?: string): PermissionCheck;
|
|
|
460
453
|
* ```
|
|
461
454
|
*/
|
|
462
455
|
declare function when<TDoc = Record<string, unknown>>(condition: (ctx: PermissionContext<TDoc>) => boolean | Promise<boolean>): PermissionCheck<TDoc>;
|
|
463
|
-
//#endregion
|
|
464
|
-
//#region src/permissions/dynamic.d.ts
|
|
465
456
|
interface DynamicPermissionMatrixConfig {
|
|
466
457
|
/**
|
|
467
458
|
* Resolve role → resource → actions map dynamically (DB / API / config service).
|
|
@@ -581,8 +572,6 @@ declare function createOrgPermissions(config: {
|
|
|
581
572
|
* - Cross-node invalidation via the event bus
|
|
582
573
|
*/
|
|
583
574
|
declare function createDynamicPermissionMatrix(config: DynamicPermissionMatrixConfig): DynamicPermissionMatrix;
|
|
584
|
-
//#endregion
|
|
585
|
-
//#region src/permissions/explain.d.ts
|
|
586
575
|
/**
|
|
587
576
|
* The statically-known requirement of a permission check.
|
|
588
577
|
*
|
|
@@ -700,8 +689,6 @@ declare function describePermissionMap(permissions: Readonly<Record<string, Perm
|
|
|
700
689
|
* "what's exposed?" audit report should show.
|
|
701
690
|
*/
|
|
702
691
|
declare function collectPublicSurface(permissions: Readonly<Record<string, PermissionCheck | undefined>>): string[];
|
|
703
|
-
//#endregion
|
|
704
|
-
//#region src/permissions/filter-merge.d.ts
|
|
705
692
|
/**
|
|
706
693
|
* Policy-filter composition — logical AND, never last-writer-wins.
|
|
707
694
|
*
|
|
@@ -745,8 +732,6 @@ declare function collectPublicSurface(permissions: Readonly<Record<string, Permi
|
|
|
745
732
|
* under `$and`. See the module doc for the full contract.
|
|
746
733
|
*/
|
|
747
734
|
declare function conjoinPolicyFilters(base: Record<string, unknown> | undefined, incoming: Record<string, unknown> | undefined): Record<string, unknown>;
|
|
748
|
-
//#endregion
|
|
749
|
-
//#region src/permissions/grants.d.ts
|
|
750
735
|
/**
|
|
751
736
|
* The grant-mode lattice, weakest → strongest. Holding a mode satisfies
|
|
752
737
|
* every mode at or below it (`write` ⊇ `read` ⊇ `list` ⊇ `see`); `manage`
|
|
@@ -811,8 +796,6 @@ interface RequireGrantOptions {
|
|
|
811
796
|
* denied; unknown/corrupted mode strings → denied.
|
|
812
797
|
*/
|
|
813
798
|
declare function requireGrant(options: RequireGrantOptions): PermissionCheck;
|
|
814
|
-
//#endregion
|
|
815
|
-
//#region src/permissions/roleHierarchy.d.ts
|
|
816
799
|
/**
|
|
817
800
|
* Role Hierarchy — Composable RBAC Inheritance
|
|
818
801
|
*
|
|
@@ -852,8 +835,6 @@ interface RoleHierarchy {
|
|
|
852
835
|
* Circular references are handled safely (visited set).
|
|
853
836
|
*/
|
|
854
837
|
declare function createRoleHierarchy(map: Record<string, readonly string[]>): RoleHierarchy;
|
|
855
|
-
//#endregion
|
|
856
|
-
//#region src/permissions/scope.d.ts
|
|
857
838
|
/**
|
|
858
839
|
* Require an org-bound caller. Grants for `member`, `service`, and
|
|
859
840
|
* `elevated` scopes (anything with org context). Denies `public` and
|
|
@@ -1068,8 +1049,6 @@ declare function fullPublic<TDoc = Record<string, unknown>>(overrides?: Permissi
|
|
|
1068
1049
|
* Hosts that disable write routes entirely (`disabledRoutes`) are unaffected.
|
|
1069
1050
|
*/
|
|
1070
1051
|
declare function readOnly<TDoc = Record<string, unknown>>(overrides?: PermissionOverrides<TDoc>): ResourcePermissions<TDoc>;
|
|
1071
|
-
//#endregion
|
|
1072
|
-
//#region src/permissions/matrix.d.ts
|
|
1073
1052
|
/**
|
|
1074
1053
|
* `denied` is a CLOSED door — an explicit `denyAll()`. It is not the same as
|
|
1075
1054
|
* "no rule found", which surfaces as `public` (public-by-omission). Before it
|
|
@@ -1157,5 +1136,4 @@ declare function introspectModule(mod: Record<string, unknown>): Record<string,
|
|
|
1157
1136
|
/** Every live resource's ACTUAL gates, keyed by arc resource name. */
|
|
1158
1137
|
declare function introspectRegistry(registry: PermissionMatrixRegistry): Record<string, Record<string, PermissionEntry>>;
|
|
1159
1138
|
declare function buildPermissionMatrix(options?: PermissionMatrixOptions): PermissionMatrix;
|
|
1160
|
-
//#endregion
|
|
1161
1139
|
export { deny as $, GrantResolution as A, explainAccess as B, requireScopeContext as C, createRoleHierarchy as D, RoleHierarchy as E, AccessExplanation as F, createDynamicPermissionMatrix as G, DynamicPermissionMatrix as H, PermissionRequirement as I, PublicPolicy as J, createOrgPermissions as K, collectPublicSurface as L, modeSatisfies as M, requireGrant as N, GRANT_MODES as O, conjoinPolicyFilters as P, anyOf as Q, describePermission as R, requireOrgRole as S, requireTeamMembership as T, DynamicPermissionMatrixConfig as U, ConnectEventsOptions as V, PermissionEventBus as W, allow as X, allOf as Y, allowPublic as Z, publicRead as _, requireMandate as _t, PermissionMatrixRegistry as a, requireRoles as at, requireOrgInScope as b, introspectModule as c, scopeOf as ct, adminOnly as d, evaluatePermissionDecision as dt, denyAll as et, authenticated as f, normalizeToDecision as ft, presets_d_exports as g, requireDPoP as gt, permissionMatrix as h, requireAgentScope as ht, PermissionMatrixOptions as i, requirePlatformRole as it, RequireGrantOptions as j, GrantMode as k, introspectRegistry as l, PermissionCheckReturn as lt, ownerWithAdminBypass as m, RequireMandateOptions as mt, PermissionEntryType as n, requireAuth as nt, buildPermissionMatrix as o, roles as ot, fullPublic as p, RequireAgentScopeOptions as pt, AllowPublicOptions as q, PermissionMatrix as r, requireOwnership as rt, introspectCheck as s, when as st, PermissionEntry as t, not as tt, PermissionOverrides as u, applyAuthorizationDecision as ut, publicReadAdminWrite as v, requireServiceScope as w, requireOrgMembership as x, readOnly as y, describePermissionMap as z };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { l as PermissionCheck } from "./base-
|
|
2
|
+
import { l as PermissionCheck } from "./base-HXNgPQww.mjs";
|
|
3
3
|
import { FastifyPluginAsync } from "fastify";
|
|
4
|
-
//#region src/integrations/jobs/execution.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Timed handler execution — the concurrency core of the jobs worker,
|
|
7
6
|
* extracted from the BullMQ registration so the algorithm is testable
|
|
@@ -43,8 +42,6 @@ interface ExecuteTimedHandlerOptions<T> {
|
|
|
43
42
|
logger?: TimedHandlerLogger;
|
|
44
43
|
}
|
|
45
44
|
declare function executeTimedHandler<T>(options: ExecuteTimedHandlerOptions<T>): Promise<T>;
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/integrations/jobs/types.d.ts
|
|
48
45
|
interface JobRepeatOptions {
|
|
49
46
|
/** Cron pattern (e.g. '0 9 * * *' = every day 09:00). Mutually exclusive with `every`. */
|
|
50
47
|
pattern?: string;
|
|
@@ -298,8 +295,6 @@ interface QueueStats {
|
|
|
298
295
|
* });
|
|
299
296
|
*/
|
|
300
297
|
declare function defineJob<TData = unknown, TResult = unknown>(definition: JobDefinition<TData, TResult>): JobDefinition<TData, TResult>;
|
|
301
|
-
//#endregion
|
|
302
|
-
//#region src/integrations/jobs/plugin.d.ts
|
|
303
298
|
/**
|
|
304
299
|
* Pluggable BullMQ job queue integration for Arc.
|
|
305
300
|
*
|
|
@@ -307,5 +302,4 @@ declare function defineJob<TData = unknown, TResult = unknown>(definition: JobDe
|
|
|
307
302
|
* in the outer scope (the documented `fastify.jobs.dispatch(...)` usage).
|
|
308
303
|
*/
|
|
309
304
|
declare const jobsPlugin: FastifyPluginAsync<JobsPluginOptions>;
|
|
310
|
-
//#endregion
|
|
311
305
|
export { JobMeta as a, JobsPluginOptions as c, ExecuteTimedHandlerOptions as d, TimedHandlerLogger as f, JobDispatcher as i, QueueStats as l, JobDefinition as n, JobRepeatOptions as o, executeTimedHandler as p, JobDispatchOptions as r, JobStatus as s, jobsPlugin as t, defineJob as u };
|