@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/auth/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
4
|
-
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-
|
|
5
|
-
import { o as toJsonSchema } from "../schemaConverter-
|
|
6
|
-
import { n as declareRuntimeCapability } from "../runtimeCapabilities-
|
|
7
|
-
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-BY8vzlP4.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-DBd3Qheo.mjs";
|
|
4
|
+
import { n as getUserRoles, r as normalizeRoles } from "../userHelpers-oX5_mOVs.mjs";
|
|
5
|
+
import { o as toJsonSchema } from "../schemaConverter-DBJrPZN4.mjs";
|
|
6
|
+
import { n as declareRuntimeCapability } from "../runtimeCapabilities-DWqbxkyw.mjs";
|
|
7
|
+
import { E as requireOrgRole, T as requireOrgMembership, k as requireTeamMembership } from "../permissions-A1oKtpiC.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
10
|
import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
|
|
11
11
|
import fp from "fastify-plugin";
|
|
12
|
-
|
|
12
|
+
// src/auth/authPlugin.ts
|
|
13
13
|
/**
|
|
14
14
|
* Parse expiration string to seconds
|
|
15
15
|
*/
|
|
@@ -132,7 +132,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
132
132
|
const error = err instanceof Error ? err : new Error(String(err));
|
|
133
133
|
if (onFailure) {
|
|
134
134
|
await onFailure(request, reply, error);
|
|
135
|
-
return;
|
|
135
|
+
return reply;
|
|
136
136
|
}
|
|
137
137
|
if (isArcError(error)) {
|
|
138
138
|
const message = exposeAuthErrors ? error.message : "Authentication required";
|
|
@@ -141,7 +141,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
141
141
|
message,
|
|
142
142
|
status: error.statusCode
|
|
143
143
|
});
|
|
144
|
-
return;
|
|
144
|
+
return reply;
|
|
145
145
|
}
|
|
146
146
|
const message = exposeAuthErrors ? error.message : "Authentication required";
|
|
147
147
|
reply.code(401).send({
|
|
@@ -149,6 +149,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
149
149
|
message,
|
|
150
150
|
status: 401
|
|
151
151
|
});
|
|
152
|
+
return reply;
|
|
152
153
|
}
|
|
153
154
|
};
|
|
154
155
|
/**
|
|
@@ -267,7 +268,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
267
268
|
message: "No user context",
|
|
268
269
|
status: 401
|
|
269
270
|
});
|
|
270
|
-
return;
|
|
271
|
+
return reply;
|
|
271
272
|
}
|
|
272
273
|
const userRoles = getUserRoles(user);
|
|
273
274
|
if (allowedRoles.length === 1 && allowedRoles[0] === "*") return;
|
|
@@ -277,7 +278,7 @@ const authPlugin = async (fastify, opts = {}) => {
|
|
|
277
278
|
message: `Requires one of: ${allowedRoles.join(", ")}`,
|
|
278
279
|
status: 403
|
|
279
280
|
});
|
|
280
|
-
return;
|
|
281
|
+
return reply;
|
|
281
282
|
}
|
|
282
283
|
};
|
|
283
284
|
};
|
|
@@ -296,8 +297,7 @@ var authPlugin_default = fp(authPlugin, {
|
|
|
296
297
|
name: "arc-auth",
|
|
297
298
|
fastify: "5.x"
|
|
298
299
|
});
|
|
299
|
-
|
|
300
|
-
//#region src/auth/betterAuthOpenApi.ts
|
|
300
|
+
// src/auth/betterAuthOpenApi.ts
|
|
301
301
|
/**
|
|
302
302
|
* Check if a value looks like a Better Auth endpoint (has .path and .options)
|
|
303
303
|
*/
|
|
@@ -544,8 +544,7 @@ function mergeUserFieldsIntoRequestBody(requestBody, userFields, endpointPath) {
|
|
|
544
544
|
if (isRequired && !required.includes(name)) required.push(name);
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
|
|
548
|
-
//#region src/auth/betterAuth.ts
|
|
547
|
+
// src/auth/betterAuth.ts
|
|
549
548
|
/**
|
|
550
549
|
* Better Auth Adapter for Arc/Fastify
|
|
551
550
|
*
|
|
@@ -821,7 +820,7 @@ function createBetterAuthAdapter(options) {
|
|
|
821
820
|
message: "Invalid credentials",
|
|
822
821
|
status: 401
|
|
823
822
|
});
|
|
824
|
-
return;
|
|
823
|
+
return reply;
|
|
825
824
|
}
|
|
826
825
|
request.scope = scope;
|
|
827
826
|
return;
|
|
@@ -835,7 +834,7 @@ function createBetterAuthAdapter(options) {
|
|
|
835
834
|
message: "Invalid or expired session",
|
|
836
835
|
status: 401
|
|
837
836
|
});
|
|
838
|
-
return;
|
|
837
|
+
return reply;
|
|
839
838
|
}
|
|
840
839
|
const req = request;
|
|
841
840
|
req.user = sessionData.user;
|
|
@@ -860,6 +859,7 @@ function createBetterAuthAdapter(options) {
|
|
|
860
859
|
message,
|
|
861
860
|
status: 401
|
|
862
861
|
});
|
|
862
|
+
return reply;
|
|
863
863
|
}
|
|
864
864
|
};
|
|
865
865
|
/**
|
|
@@ -952,8 +952,7 @@ function createBetterAuthAdapter(options) {
|
|
|
952
952
|
openapi: extractedOpenApi
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
|
|
956
|
-
//#region src/auth/sessionManager.ts
|
|
955
|
+
// src/auth/sessionManager.ts
|
|
957
956
|
/**
|
|
958
957
|
* Session Management for Arc
|
|
959
958
|
*
|
|
@@ -1264,7 +1263,7 @@ function createSessionManager(options) {
|
|
|
1264
1263
|
message: "Authentication required",
|
|
1265
1264
|
status: 401
|
|
1266
1265
|
});
|
|
1267
|
-
return;
|
|
1266
|
+
return reply;
|
|
1268
1267
|
}
|
|
1269
1268
|
if (Date.now() - session.updatedAt > freshAgeMs) {
|
|
1270
1269
|
reply.code(403).send({
|
|
@@ -1272,7 +1271,7 @@ function createSessionManager(options) {
|
|
|
1272
1271
|
message: "Session is not fresh. Please re-authenticate to perform this action.",
|
|
1273
1272
|
status: 403
|
|
1274
1273
|
});
|
|
1275
|
-
return;
|
|
1274
|
+
return reply;
|
|
1276
1275
|
}
|
|
1277
1276
|
};
|
|
1278
1277
|
const sessionPlugin = async (fastify) => {
|
|
@@ -1290,7 +1289,7 @@ function createSessionManager(options) {
|
|
|
1290
1289
|
message: "No session cookie",
|
|
1291
1290
|
status: 401
|
|
1292
1291
|
});
|
|
1293
|
-
return;
|
|
1292
|
+
return reply;
|
|
1294
1293
|
}
|
|
1295
1294
|
const sessionId = verifySessionId(signedValue, secret);
|
|
1296
1295
|
if (!sessionId) {
|
|
@@ -1300,7 +1299,7 @@ function createSessionManager(options) {
|
|
|
1300
1299
|
message: "Invalid session",
|
|
1301
1300
|
status: 401
|
|
1302
1301
|
});
|
|
1303
|
-
return;
|
|
1302
|
+
return reply;
|
|
1304
1303
|
}
|
|
1305
1304
|
const session = await store.get(sessionId);
|
|
1306
1305
|
if (!session) {
|
|
@@ -1310,7 +1309,7 @@ function createSessionManager(options) {
|
|
|
1310
1309
|
message: "Session expired or revoked",
|
|
1311
1310
|
status: 401
|
|
1312
1311
|
});
|
|
1313
|
-
return;
|
|
1312
|
+
return reply;
|
|
1314
1313
|
}
|
|
1315
1314
|
if (Date.now() > session.expiresAt) {
|
|
1316
1315
|
await store.delete(sessionId);
|
|
@@ -1320,7 +1319,7 @@ function createSessionManager(options) {
|
|
|
1320
1319
|
message: "Session expired",
|
|
1321
1320
|
status: 401
|
|
1322
1321
|
});
|
|
1323
|
-
return;
|
|
1322
|
+
return reply;
|
|
1324
1323
|
}
|
|
1325
1324
|
request.user = {
|
|
1326
1325
|
id: session.userId,
|
|
@@ -1361,8 +1360,7 @@ function createSessionManager(options) {
|
|
|
1361
1360
|
requireFresh
|
|
1362
1361
|
};
|
|
1363
1362
|
}
|
|
1364
|
-
|
|
1365
|
-
//#region src/auth/trustedOrigins.ts
|
|
1363
|
+
// src/auth/trustedOrigins.ts
|
|
1366
1364
|
/**
|
|
1367
1365
|
* Compute BA's `trustedOrigins` as the union of `canonicalUrl` and the
|
|
1368
1366
|
* CORS allowlist.
|
|
@@ -1379,5 +1377,4 @@ function mirrorTrustedOriginsFromCors(options) {
|
|
|
1379
1377
|
if (!corsOrigins) return [canonicalUrl];
|
|
1380
1378
|
return Array.from(/* @__PURE__ */ new Set([canonicalUrl, ...corsOrigins]));
|
|
1381
1379
|
}
|
|
1382
|
-
//#endregion
|
|
1383
1380
|
export { MemorySessionStore, authPlugin_default as authPlugin, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi, mirrorTrustedOriginsFromCors };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as SessionData, s as SessionStore } from "../sessionManager-
|
|
3
|
-
//#region src/auth/redis-session.d.ts
|
|
2
|
+
import { i as SessionData, s as SessionStore } from "../sessionManager-CdvDF04x.mjs";
|
|
4
3
|
/** Minimal Redis client interface — compatible with ioredis */
|
|
5
4
|
export interface RedisLike {
|
|
6
5
|
get(key: string): Promise<string | null>;
|
|
@@ -38,5 +37,4 @@ export declare class RedisSessionStore implements SessionStore {
|
|
|
38
37
|
delete(sessionId: string): Promise<void>;
|
|
39
38
|
deleteAll(userId: string): Promise<void>;
|
|
40
39
|
deleteAllExcept(userId: string, currentSessionId: string): Promise<void>;
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
40
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
2
|
import sjson from "secure-json-parse";
|
|
3
|
-
|
|
3
|
+
// src/auth/redis-session.ts
|
|
4
4
|
/**
|
|
5
5
|
* Redis Session Store for Arc
|
|
6
6
|
*
|
|
@@ -97,5 +97,4 @@ var RedisSessionStore = class {
|
|
|
97
97
|
}
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
//#endregion
|
|
101
100
|
export { RedisSessionStore };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
4
|
-
import { t as ArcError } from "./errors-
|
|
5
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
|
|
3
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-BAWi019Q.mjs";
|
|
4
|
+
import { t as ArcError } from "./errors-BY8vzlP4.mjs";
|
|
5
|
+
// src/permissions/authorizationDecision.ts
|
|
6
6
|
const log = arcLog("permissions:enforce");
|
|
7
7
|
/**
|
|
8
8
|
* Normalize a check return into the canonical {@link AuthorizationDecision}.
|
|
@@ -171,5 +171,4 @@ async function evaluateAndApplyPermission(check, context, request, reply, opts)
|
|
|
171
171
|
applyAuthorizationDecision(decision, request);
|
|
172
172
|
return true;
|
|
173
173
|
}
|
|
174
|
-
//#endregion
|
|
175
174
|
export { normalizeToDecision as i, evaluateAndApplyPermission as n, evaluatePermissionDecision as r, applyAuthorizationDecision as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { i as RequestScope } from "./types-
|
|
2
|
+
import { i as RequestScope } from "./types-DnkIALZ8.mjs";
|
|
3
3
|
import { FastifyRequest } from "fastify";
|
|
4
|
-
//#region src/utils/userHelpers.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Extract a user ID from a user object. Accepts `id` or `_id` — returns
|
|
7
6
|
* `undefined` when neither is present. Used by arc's controllers to
|
|
@@ -21,8 +20,6 @@ declare function getUserRoles(user: {
|
|
|
21
20
|
role?: unknown;
|
|
22
21
|
roles?: unknown;
|
|
23
22
|
} | null | undefined): string[];
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/permissions/types.d.ts
|
|
26
23
|
/**
|
|
27
24
|
* Row-level data policy — the constraint every returned/queried row must
|
|
28
25
|
* satisfy. This is arc's **Mongo-style record dialect** (`{ ownerId }`,
|
|
@@ -282,8 +279,6 @@ interface PermissionCheckMeta {
|
|
|
282
279
|
*/
|
|
283
280
|
_conditional?: boolean;
|
|
284
281
|
}
|
|
285
|
-
//#endregion
|
|
286
|
-
//#region src/types/base.d.ts
|
|
287
282
|
declare module "fastify" {
|
|
288
283
|
interface FastifyRequest {
|
|
289
284
|
/** Request scope — set by auth adapter, read by permissions/presets/guards */
|
|
@@ -370,5 +365,4 @@ type ArcRequest = FastifyRequest & {
|
|
|
370
365
|
user: Record<string, unknown> | undefined;
|
|
371
366
|
signal: AbortSignal;
|
|
372
367
|
};
|
|
373
|
-
//#endregion
|
|
374
368
|
export { UserLike as a, DataPolicy as c, UserBase as d, getUserId as f, ObjectId as i, PermissionCheck as l, normalizeRoles as m, ArcRequest as n, UserOrganization as o, getUserRoles as p, JWTPayload as r, AuthorizationDecision as s, AnyRecord as t, PermissionContext as u };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/collections/boundedMap.ts
|
|
3
3
|
/**
|
|
4
4
|
* Insertion-order LRU on a plain `Map` — the two moves, written once.
|
|
5
5
|
*
|
|
@@ -53,5 +53,4 @@ function assertCapacity(name, value) {
|
|
|
53
53
|
if (!Number.isInteger(value) || value < 0) throw new Error(`[arc] ${name} must be a non-negative integer, got ${String(value)}.`);
|
|
54
54
|
return value;
|
|
55
55
|
}
|
|
56
|
-
//#endregion
|
|
57
56
|
export { evictToSize as n, touch as r, assertCapacity as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as conjoinPolicyFilters } from "./filter-merge-
|
|
3
|
-
import {
|
|
4
|
-
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-
|
|
5
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as conjoinPolicyFilters } from "./filter-merge-BAWi019Q.mjs";
|
|
3
|
+
import { D as toRepositoryFilter } from "./plugin-DTWt_8C3.mjs";
|
|
4
|
+
import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-4RlTKOJb.mjs";
|
|
5
|
+
// src/core/aggregation/buildHandler.ts
|
|
6
6
|
/**
|
|
7
7
|
* Framework-agnostic aggregation execution. Runs safety guards,
|
|
8
8
|
* compiles the AggRequest, dispatches to the materialized hook or
|
|
@@ -326,5 +326,4 @@ function mapAggregateError(err, aggregationName) {
|
|
|
326
326
|
}
|
|
327
327
|
};
|
|
328
328
|
}
|
|
329
|
-
//#endregion
|
|
330
329
|
export { executeAggregation as n, buildAggregationHandler as t };
|
package/dist/cache/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-
|
|
3
|
-
import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache
|
|
4
|
-
import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-
|
|
5
|
-
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "../redisShapes-
|
|
6
|
-
//#region src/cache/keys.d.ts
|
|
2
|
+
import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-WR1U0K7t.mjs";
|
|
3
|
+
import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-DdvrGG8Q.mjs";
|
|
4
|
+
import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-DYQUyeJ9.mjs";
|
|
5
|
+
import { n as UpstashKeyValueCommands, t as IoredisKeyValueCommands } from "../redisShapes-CqBXTn_s.mjs";
|
|
7
6
|
/**
|
|
8
7
|
* Cache Key Utilities
|
|
9
8
|
*
|
|
@@ -24,8 +23,6 @@ export declare function tagVersionKey(tag: string): string;
|
|
|
24
23
|
* cryptographic digest leaves no crafted collision onto another caller's cached result.
|
|
25
24
|
*/
|
|
26
25
|
export declare function hashParams(params: Record<string, unknown>): string;
|
|
27
|
-
//#endregion
|
|
28
|
-
//#region src/cache/memory.d.ts
|
|
29
26
|
interface MemoryCacheStoreOptions {
|
|
30
27
|
/** Default TTL in seconds (default: 60) */
|
|
31
28
|
defaultTtlSeconds?: number;
|
|
@@ -100,8 +97,6 @@ export declare class MemoryCacheStore<TValue = unknown> implements CacheStore<TV
|
|
|
100
97
|
private cleanupExpired;
|
|
101
98
|
private estimateSize;
|
|
102
99
|
}
|
|
103
|
-
//#endregion
|
|
104
|
-
//#region src/cache/redis.d.ts
|
|
105
100
|
interface RedisCacheClient {
|
|
106
101
|
get(key: string): Promise<string | null>;
|
|
107
102
|
set(key: string, value: string, options?: {
|
|
@@ -242,5 +237,4 @@ interface UpstashRedisLike extends UpstashKeyValueCommands {
|
|
|
242
237
|
* ```
|
|
243
238
|
*/
|
|
244
239
|
export declare function upstashAsCacheClient(client: UpstashRedisLike): RedisCacheClient;
|
|
245
|
-
//#endregion
|
|
246
240
|
export { type CacheEnvelope, type CacheLogger, type CacheResult, type CacheStats, type CacheStatus, type CacheStore, type CrossResourceRule, type IoredisLike, type MemoryCacheStoreOptions, QueryCache, type QueryCacheConfig, type QueryCacheDefaults, type QueryCachePluginOptions, type RedisCacheClient, type RedisCacheStoreOptions, type RedisPipeline, type UpstashRedisLike, queryCachePlugin };
|
package/dist/cache/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-
|
|
3
|
-
import { t as MemoryCacheStore } from "../memory-
|
|
4
|
-
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-
|
|
5
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-FBz6Ull-.mjs";
|
|
3
|
+
import { t as MemoryCacheStore } from "../memory-Bgw5dn8N.mjs";
|
|
4
|
+
import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-3gJj5Rbz.mjs";
|
|
5
|
+
// src/cache/redis.ts
|
|
6
6
|
/**
|
|
7
7
|
* Redis-backed cache store.
|
|
8
8
|
* Suitable for multi-instance and horizontally scaled deployments.
|
|
@@ -209,5 +209,4 @@ function upstashAsCacheClient(client) {
|
|
|
209
209
|
expireIfAbsent: client.eval ? (key, seconds) => client.eval(EXPIRE_IF_ABSENT_LUA, [key], [seconds]) : void 0
|
|
210
210
|
};
|
|
211
211
|
}
|
|
212
|
-
//#endregion
|
|
213
212
|
export { MemoryCacheStore, QueryCache, RedisCacheStore, buildQueryKey, hashParams, ioredisAsCacheClient, queryCachePlugin, tagVersionKey, upstashAsCacheClient, versionKey };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
|
|
3
3
|
import fp from "fastify-plugin";
|
|
4
|
-
|
|
4
|
+
// src/plugins/caching.ts
|
|
5
5
|
var caching_exports = /* @__PURE__ */ __exportAll({
|
|
6
6
|
cachingPlugin: () => cachingPlugin,
|
|
7
7
|
default: () => caching_default
|
|
@@ -73,5 +73,4 @@ var caching_default = fp(cachingPlugin, {
|
|
|
73
73
|
name: "arc-caching",
|
|
74
74
|
fastify: "5.x"
|
|
75
75
|
});
|
|
76
|
-
//#endregion
|
|
77
76
|
export { caching_exports as n, caching_default as t };
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/events/outbox/claimed.ts
|
|
3
3
|
function claimedAttempts(claimed) {
|
|
4
4
|
const value = claimed.attempts;
|
|
5
5
|
return typeof value === "number" && Number.isInteger(value) && value > 0 ? value : void 0;
|
|
6
6
|
}
|
|
7
|
-
//#endregion
|
|
8
7
|
export { claimedAttempts as t };
|
package/dist/cleanup/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
import {
|
|
3
|
-
import { A as
|
|
4
|
-
import { n as
|
|
2
|
+
import { l as PermissionCheck } from "../base-HXNgPQww.mjs";
|
|
3
|
+
import { A as RequestWithExtras } from "../index-DyJFTJLA.mjs";
|
|
4
|
+
import { A as CleanupStepResult, B as VerificationResult, C as CleanupResult, D as CleanupRunStore, E as CleanupRunStatus, F as PurgeEvidence, I as PurgeResourceResult, L as PurgeStrategyKind, M as CleanupWriteFence, N as DEFAULT_CLEANUP_LIMITS, O as CleanupRunTransitionPatch, P as PurgeActor, R as PurgeVerificationSummary, S as CleanupRecipe, T as CleanupRunCreateResult, _ as CleanupPermissions, a as CleanupEvidenceStore, b as CleanupPlanItem, c as CleanupInput, d as CleanupLease, f as CleanupLimits, g as CleanupPermissionCheck, h as CleanupOutcomeStatus, i as CleanupContext, j as CleanupStepRunStatus, k as CleanupStepProgress, l as CleanupJob, m as CleanupManifest, n as CLEANUP_TERMINAL_STATUSES, o as CleanupExecutionContext, p as CleanupLogger, r as CleanupCancelRequest, s as CleanupFinalizationPayload, t as Availability, u as CleanupJobQueue, v as CleanupPlan, w as CleanupRun, x as CleanupProgressSummary, y as CleanupPlanDraft, z as VerificationCheck } from "../types-C0YJAiL0.mjs";
|
|
5
|
+
import { n as ArcModule } from "../types-BeEJm-DV.mjs";
|
|
5
6
|
import { PurgeStrategyKind as PurgeStrategyKind$1 } from "@classytic/primitives/retention";
|
|
6
7
|
import { CleanupStep } from "@classytic/repo-core/cleanup";
|
|
7
|
-
//#region src/cleanup/compose.d.ts
|
|
8
8
|
/** Metadata + steps for {@link recipeFromSteps}. */
|
|
9
9
|
interface RecipeFromStepsInput {
|
|
10
10
|
/** Stable machine id, unique in the registry (e.g. `'cleanup.rebuild-projections'`). */
|
|
@@ -39,8 +39,6 @@ interface RecipeFromStepsInput {
|
|
|
39
39
|
readonly steps: readonly CleanupStep[];
|
|
40
40
|
}
|
|
41
41
|
export declare function recipeFromSteps(input: RecipeFromStepsInput): CleanupRecipe;
|
|
42
|
-
//#endregion
|
|
43
|
-
//#region src/cleanup/errors.d.ts
|
|
44
42
|
/**
|
|
45
43
|
* Data Cleanup Center — stable, typed errors.
|
|
46
44
|
*
|
|
@@ -125,8 +123,6 @@ export declare const CleanupErrors: {
|
|
|
125
123
|
readonly invalidExclusion: (reason: string, steps: readonly string[]) => CleanupError;
|
|
126
124
|
readonly forbidden: (operation: string) => CleanupError;
|
|
127
125
|
};
|
|
128
|
-
//#endregion
|
|
129
|
-
//#region src/cleanup/memory.d.ts
|
|
130
126
|
/**
|
|
131
127
|
* In-memory {@link CleanupRunStore}. Single-process only — see the module
|
|
132
128
|
* docblock for the production caveat.
|
|
@@ -172,8 +168,6 @@ export declare class MemoryCleanupJobQueue implements CleanupJobQueue {
|
|
|
172
168
|
/** Take everything enqueued so far, clearing the buffer. */
|
|
173
169
|
drain(): CleanupJob[];
|
|
174
170
|
}
|
|
175
|
-
//#endregion
|
|
176
|
-
//#region src/cleanup/registry.d.ts
|
|
177
171
|
/** UI/SDK-facing description of one recipe (no methods). */
|
|
178
172
|
interface CleanupRecipeInfo {
|
|
179
173
|
readonly id: string;
|
|
@@ -196,8 +190,6 @@ interface CleanupRegistry {
|
|
|
196
190
|
* silent last-wins overwrite.
|
|
197
191
|
*/
|
|
198
192
|
export declare function createCleanupRegistry(recipes: readonly CleanupRecipe[]): CleanupRegistry;
|
|
199
|
-
//#endregion
|
|
200
|
-
//#region src/cleanup/service.d.ts
|
|
201
193
|
interface CleanupServiceDeps {
|
|
202
194
|
registry: CleanupRegistry;
|
|
203
195
|
runStore: CleanupRunStore;
|
|
@@ -260,8 +252,6 @@ interface CleanupService {
|
|
|
260
252
|
retry(id: string): Promise<CleanupRun>;
|
|
261
253
|
}
|
|
262
254
|
export declare function createCleanupService(deps: CleanupServiceDeps): CleanupService;
|
|
263
|
-
//#endregion
|
|
264
|
-
//#region src/cleanup/module.d.ts
|
|
265
255
|
interface DataCleanupModuleDeps {
|
|
266
256
|
/**
|
|
267
257
|
* The recipes this deployment exposes. Ids must be unique (boot-checked).
|
|
@@ -293,7 +283,11 @@ interface DataCleanupModuleDeps {
|
|
|
293
283
|
/** Durable evidence + manifest store — host-owned, idempotent by operationId. */
|
|
294
284
|
evidenceStore: CleanupEvidenceStore | (() => CleanupEvidenceStore | Promise<CleanupEvidenceStore>);
|
|
295
285
|
/** Permission checks for view / execute / manage. */
|
|
296
|
-
permissions:
|
|
286
|
+
permissions: {
|
|
287
|
+
view: PermissionCheck;
|
|
288
|
+
execute: PermissionCheck;
|
|
289
|
+
manage?: PermissionCheck;
|
|
290
|
+
};
|
|
297
291
|
/** Optional write fence (§8). Thunk-friendly — see {@link runStore}. */
|
|
298
292
|
writeFence?: CleanupWriteFence | (() => CleanupWriteFence | Promise<CleanupWriteFence>) | undefined;
|
|
299
293
|
/**
|
|
@@ -331,8 +325,6 @@ interface DataCleanupModuleDeps {
|
|
|
331
325
|
now?: () => Date;
|
|
332
326
|
}
|
|
333
327
|
export declare function createDataCleanupModule(deps: DataCleanupModuleDeps): ArcModule<CleanupService>;
|
|
334
|
-
//#endregion
|
|
335
|
-
//#region src/cleanup/plan-digest.d.ts
|
|
336
328
|
/** `sha256(canonical(planMaterial))` as a hex digest. */
|
|
337
329
|
export declare function computePlanDigest(plan: Omit<CleanupPlan, "digest">): string;
|
|
338
330
|
/**
|
|
@@ -340,5 +332,4 @@ export declare function computePlanDigest(plan: Omit<CleanupPlan, "digest">): st
|
|
|
340
332
|
* itself. Dates (e.g. `completedAt`) participate via the strict canonicalizer.
|
|
341
333
|
*/
|
|
342
334
|
export declare function computeManifestDigest(manifest: Record<string, unknown>): string;
|
|
343
|
-
//#endregion
|
|
344
335
|
export { type Availability, CLEANUP_TERMINAL_STATUSES, type CancelInput, type CleanupCancelRequest, type CleanupContext, type CleanupErrorCode, type CleanupEvidenceStore, type CleanupExecutionContext, type CleanupFinalizationPayload, type CleanupInput, type CleanupJob, type CleanupJobQueue, type CleanupLease, type CleanupLimits, type CleanupLogger, type CleanupManifest, type CleanupOutcomeStatus, type CleanupPermissionCheck, type CleanupPermissions, type CleanupPlan, type CleanupPlanDraft, type CleanupPlanItem, type CleanupProgressSummary, type CleanupRecipe, type CleanupRecipeInfo, type CleanupRegistry, type CleanupResult, type CleanupRun, type CleanupRunCreateResult, type CleanupRunStatus, type CleanupRunStore, type CleanupRunTransitionPatch, type CleanupService, type CleanupServiceDeps, type CleanupStepProgress, type CleanupStepResult, type CleanupStepRunStatus, type CleanupWriteFence, DEFAULT_CLEANUP_LIMITS, type DataCleanupModuleDeps, type ExecuteInput, type PreviewInput, type PurgeActor, type PurgeEvidence, type PurgeResourceResult, type PurgeStrategyKind, type PurgeVerificationSummary, type RecipeFromStepsInput, type VerificationCheck, type VerificationResult };
|
package/dist/cleanup/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { g as getUserId } from "../types-
|
|
3
|
-
import { t as defineResource } from "../defineResource-
|
|
4
|
-
import { t as defineModule } from "../module-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { g as getUserId } from "../types-CuGjhn83.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-CGmdmGwh.mjs";
|
|
4
|
+
import { t as defineModule } from "../module-Dsc_nKL5.mjs";
|
|
5
5
|
import { createPurgeEvidence } from "@classytic/primitives/retention";
|
|
6
6
|
import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
|
|
7
|
-
|
|
7
|
+
// src/cleanup/errors.ts
|
|
8
8
|
/**
|
|
9
9
|
* A framework error carrying BOTH `status` (read directly in code/tests) and
|
|
10
10
|
* `statusCode` (the Fastify convention arc's global error handler recognizes,
|
|
@@ -101,8 +101,7 @@ const CleanupErrors = {
|
|
|
101
101
|
return new CleanupError("CLEANUP_FORBIDDEN", 403, `Not authorized to ${operation} cleanup.`, { operation });
|
|
102
102
|
}
|
|
103
103
|
};
|
|
104
|
-
|
|
105
|
-
//#region src/cleanup/compose.ts
|
|
104
|
+
// src/cleanup/compose.ts
|
|
106
105
|
const ALWAYS_AVAILABLE = { available: true };
|
|
107
106
|
/** Build a step context from an arc cleanup context + the sealed parameters. */
|
|
108
107
|
function stepContextOf(ctx, parameters) {
|
|
@@ -400,8 +399,7 @@ function recipeFromSteps(input) {
|
|
|
400
399
|
}
|
|
401
400
|
};
|
|
402
401
|
}
|
|
403
|
-
|
|
404
|
-
//#region src/cleanup/types.ts
|
|
402
|
+
// src/cleanup/types.ts
|
|
405
403
|
/** Terminal states — no further transition is valid. */
|
|
406
404
|
const CLEANUP_TERMINAL_STATUSES = [
|
|
407
405
|
"completed",
|
|
@@ -415,8 +413,7 @@ const DEFAULT_CLEANUP_LIMITS = {
|
|
|
415
413
|
maxReasonLength: 2e3,
|
|
416
414
|
maxParamDepth: 8
|
|
417
415
|
};
|
|
418
|
-
|
|
419
|
-
//#region src/cleanup/memory.ts
|
|
416
|
+
// src/cleanup/memory.ts
|
|
420
417
|
/**
|
|
421
418
|
* In-memory {@link CleanupRunStore}. Single-process only — see the module
|
|
422
419
|
* docblock for the production caveat.
|
|
@@ -550,8 +547,7 @@ var MemoryCleanupJobQueue = class {
|
|
|
550
547
|
return this.jobs.splice(0, this.jobs.length);
|
|
551
548
|
}
|
|
552
549
|
};
|
|
553
|
-
|
|
554
|
-
//#region src/cleanup/registry.ts
|
|
550
|
+
// src/cleanup/registry.ts
|
|
555
551
|
/**
|
|
556
552
|
* Cleanup recipe registry — the framework's boot-time integrity gate.
|
|
557
553
|
*
|
|
@@ -591,8 +587,7 @@ function createCleanupRegistry(recipes) {
|
|
|
591
587
|
}
|
|
592
588
|
};
|
|
593
589
|
}
|
|
594
|
-
|
|
595
|
-
//#region src/cleanup/plan-digest.ts
|
|
590
|
+
// src/cleanup/plan-digest.ts
|
|
596
591
|
/**
|
|
597
592
|
* Deterministic integrity checksums for plans + manifests.
|
|
598
593
|
*
|
|
@@ -651,8 +646,7 @@ function computeManifestDigest(manifest) {
|
|
|
651
646
|
const { manifestDigest: _drop, ...rest } = manifest;
|
|
652
647
|
return sha256Hex(canonicalJson(rest));
|
|
653
648
|
}
|
|
654
|
-
|
|
655
|
-
//#region src/cleanup/service.ts
|
|
649
|
+
// src/cleanup/service.ts
|
|
656
650
|
/**
|
|
657
651
|
* Cleanup orchestration service — the framework's use-case core.
|
|
658
652
|
*
|
|
@@ -1242,8 +1236,7 @@ function createCleanupService(deps) {
|
|
|
1242
1236
|
function errMsg(err) {
|
|
1243
1237
|
return err instanceof Error ? err.message : String(err);
|
|
1244
1238
|
}
|
|
1245
|
-
|
|
1246
|
-
//#region src/cleanup/module.ts
|
|
1239
|
+
// src/cleanup/module.ts
|
|
1247
1240
|
function defaultResolveActor(req) {
|
|
1248
1241
|
const id = (req.scope ? getUserId(req.scope) : void 0) ?? req.user?.id;
|
|
1249
1242
|
if (!id) throw CleanupErrors.actorRequired();
|
|
@@ -1478,5 +1471,4 @@ function createDataCleanupModule(deps) {
|
|
|
1478
1471
|
resources: () => [resource]
|
|
1479
1472
|
});
|
|
1480
1473
|
}
|
|
1481
|
-
//#endregion
|
|
1482
1474
|
export { CLEANUP_TERMINAL_STATUSES, CleanupCancelled, CleanupError, CleanupErrors, DEFAULT_CLEANUP_LIMITS, MemoryCleanupEvidenceStore, MemoryCleanupJobQueue, MemoryCleanupRunStore, computeManifestDigest, computePlanDigest, createCleanupRegistry, createCleanupService, createDataCleanupModule, recipeFromSteps };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
import { F as ResourceDefinition, X as RouteSchemaOptions, kt as RateLimitConfig } from "../../index-
|
|
3
|
-
//#region src/cli/commands/describe.d.ts
|
|
2
|
+
import { F as ResourceDefinition, X as RouteSchemaOptions, kt as RateLimitConfig } from "../../index-DyJFTJLA.mjs";
|
|
4
3
|
export interface DescribedResource {
|
|
5
4
|
name: string;
|
|
6
5
|
displayName: string;
|
|
@@ -126,5 +125,4 @@ interface EventDescription {
|
|
|
126
125
|
*/
|
|
127
126
|
export declare function describeResource(resource: ResourceDefinition<unknown>, module?: string): DescribedResource;
|
|
128
127
|
export declare function describe(args: string[]): Promise<void>;
|
|
129
|
-
//#endregion
|
|
130
128
|
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CRUD_OPERATIONS } from "../../constants-
|
|
3
|
-
import { n as stringifyMeasureMap } from "../../ResourceRegistry-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-CHZMUwBW.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-Douk51fa.mjs";
|
|
4
4
|
import { resolve } from "node:path";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
|
-
|
|
6
|
+
// src/cli/commands/describe.ts
|
|
7
7
|
/**
|
|
8
8
|
* Arc CLI - Describe Command
|
|
9
9
|
*
|
|
@@ -347,5 +347,4 @@ async function describe(args) {
|
|
|
347
347
|
throw new Error(String(error));
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
|
-
//#endregion
|
|
351
350
|
export { describe, describeResource };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/cli/commands/docs.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Arc CLI - Docs Command
|
|
5
4
|
*
|
|
6
5
|
* Export OpenAPI specification from registered resources.
|
|
7
6
|
* Requires an entry file that exports defineResource() results.
|
|
8
7
|
*/
|
|
9
|
-
export declare function exportDocs(args: string[]): Promise<void>;
|
|
10
|
-
//#endregion
|
|
8
|
+
export declare function exportDocs(args: string[]): Promise<void>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as buildOpenApiSpec } from "../../openapi-
|
|
3
|
-
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-Co7hl073.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-b_jcqbxh.mjs";
|
|
4
4
|
import { dirname, resolve } from "node:path";
|
|
5
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
6
|
-
|
|
6
|
+
// src/cli/commands/docs.ts
|
|
7
7
|
/**
|
|
8
8
|
* Arc CLI - Docs Command
|
|
9
9
|
*
|
|
@@ -36,5 +36,4 @@ async function exportDocs(args) {
|
|
|
36
36
|
console.log(`\nResources included: ${resources.length}`);
|
|
37
37
|
console.log(`Total endpoints: ${Object.keys(spec.paths).length}`);
|
|
38
38
|
}
|
|
39
|
-
//#endregion
|
|
40
39
|
export { exportDocs };
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
|
|
2
|
-
//#region src/cli/commands/doctor.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Arc CLI - Doctor Command
|
|
5
4
|
*
|
|
6
5
|
* Health check utility that validates the development environment.
|
|
7
6
|
* Checks Node.js version, dependencies, configuration, and env variables.
|
|
8
7
|
*/
|
|
9
|
-
export declare function doctor(_args?: string[]): Promise<void>;
|
|
10
|
-
//#endregion
|
|
8
|
+
export declare function doctor(_args?: string[]): Promise<void>;
|