@classytic/arc 2.45.2 → 2.47.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-DHb1tpu-.mjs → EventTransport-BHKy4_Bi.mjs} +5 -6
- package/dist/{EventTransport-CiicKz2Z.d.mts → EventTransport-CYEoCJGe.d.mts} +0 -2
- package/dist/{HookSystem-C1u0EUnt.mjs → HookSystem-CAIDVoKC.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-D2jXWVN_.mjs → ResourceRegistry-23Ml6FNe.mjs} +15 -4
- package/dist/{acquire-DTkA8Lme.mjs → acquire-DoFX06fm.mjs} +2 -3
- package/dist/{actionPermissions-DRVk6m7x.mjs → actionPermissions-DXrlWHHK.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-D48fUJv1.mjs → authorizationDecision-DYiubkYw.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DkKiPifd.mjs → boundedMap-CtdzpJ3X.mjs} +2 -3
- package/dist/{buildHandler-BiZ4VATS.mjs → buildHandler-CARdmPNo.mjs} +5 -6
- package/dist/cache/index.d.mts +4 -10
- package/dist/cache/index.mjs +5 -6
- package/dist/{caching-Cj0as-P1.mjs → caching-QRiryDLs.mjs} +3 -4
- package/dist/{claimed-ChI13rUR.mjs → claimed-BLecr1j3.mjs} +2 -3
- package/dist/cleanup/index.d.mts +4 -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-D_aiew34.mjs → constants-Cx7BcnHT.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-QIZ2560Y.mjs → core-0WyMuo0f.mjs} +9 -12
- package/dist/{createActionRouter-CvH84dyx.mjs → createActionRouter-mLAGbpDV.mjs} +7 -8
- package/dist/{createAggregationRouter-DGyK2Hp6.mjs → createAggregationRouter-BEAjn3dA.mjs} +9 -10
- package/dist/{createApp-CKjZpmq9.mjs → createApp-QDP4vYWH.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DzXHX0SO.d.mts} +1 -3
- package/dist/{defineAggregation-BLza7Ca4.mjs → defineAggregation-CFNfvz-C.mjs} +2 -3
- package/dist/{defineResource-CEo0gDCb.mjs → defineResource-BROJmhzJ.mjs} +80 -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-BW2J3tNj.d.mts → elevation-DPD0hcU-.d.mts} +0 -2
- package/dist/{elevation-BJTsSnke.mjs → elevation-DrXeEWWk.mjs} +9 -10
- 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-2p4SL5zm.mjs → errorHandler-BiBXtxj4.mjs} +16 -6
- package/dist/{errors-JYc9vwqE.d.mts → errors-DTo0me1o.d.mts} +0 -2
- package/dist/{errors-grZkIA8N.mjs → errors-DnrUChAy.mjs} +2 -3
- package/dist/{eventPlugin-BtmA4-3P.d.mts → eventPlugin-BY38F6yK.d.mts} +1 -7
- package/dist/{eventPlugin-ItcYBGUs.mjs → eventPlugin-BhKLUe7H.mjs} +10 -12
- package/dist/{eventTypes-Ck6fD3ne.mjs → eventTypes-CCIRGakw.mjs} +5 -8
- package/dist/events/index.d.mts +5 -17
- package/dist/events/index.mjs +9 -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-bzkWPt1f.d.mts} +4 -10
- package/dist/{fields-BRX0Krcj.mjs → fields-CYdpcV73.mjs} +2 -3
- package/dist/{fields-BBSpf8pS.d.mts → fields-JTkrtO-r.d.mts} +0 -2
- package/dist/{filter-merge-CDc7YMwX.mjs → filter-merge-6kasezRH.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-hvg7V2g1.mjs → generate-DUkcbc4r.mjs} +7 -12
- package/dist/{headers-Cqkg4LzI.mjs → headers-KxhrKevA.mjs} +3 -4
- package/dist/{health-PVt0VjOx.mjs → health-CRJg3IIq.mjs} +2 -3
- package/dist/{health-DyeP3mTW.mjs → health-jkYNdobJ.mjs} +4 -7
- package/dist/hooks/index.d.mts +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.d.mts +211 -0
- package/dist/http-cache/index.mjs +605 -0
- package/dist/http-cache/purgers/cloudflare.d.mts +13 -0
- package/dist/http-cache/purgers/cloudflare.mjs +46 -0
- package/dist/http-cache/purgers/fastly.d.mts +12 -0
- package/dist/http-cache/purgers/fastly.mjs +47 -0
- package/dist/http-cache/testing/index.d.mts +68 -0
- package/dist/http-cache/testing/index.mjs +168 -0
- package/dist/idempotency/index.d.mts +3 -9
- package/dist/idempotency/index.mjs +11 -14
- 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-BxZS-8So.d.mts} +67 -25
- package/dist/{index-WH7xgvxS.d.mts → index-Cy2-QffW.d.mts} +40 -92
- package/dist/{index-uhkUA5-U.d.mts → index-D1X_C_qz.d.mts} +13 -23
- package/dist/{index-CUJvoyw3.d.mts → index-DFCCQ9AE.d.mts} +2 -24
- package/dist/index.d.mts +7 -9
- package/dist/index.mjs +12 -13
- package/dist/{init-jC3rMPzb.mjs → init-CACwpktI.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 +5 -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-ptwyzZQ-.mjs → jsonBody-CzDBkCme.mjs} +3 -4
- package/dist/{keys-C1vFuSbv.mjs → keys-Cbwf6r1B.mjs} +2 -3
- package/dist/{loadResources-CHPDyIPn.mjs → loadResources-Kr6vuljv.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-BkHHTu_B.mjs → loadResourcesFromEntry-D2e0qoDR.mjs} +3 -4
- package/dist/logger/index.d.mts +1 -3
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-C5bvCiAK.mjs → logger-C110X5Yz.mjs} +3 -5
- package/dist/{mcpPlugin-C9qohJCF.mjs → mcpPlugin-4lIPr9OJ.mjs} +41 -60
- package/dist/{memory-CxiTwT0j.mjs → memory-D9qkhXiB.mjs} +4 -5
- package/dist/{metrics-Ckp2zRy-.mjs → metrics-B-qrrWfI.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-CfnKuIuH.mjs → module-BD8xHgrz.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-KZj8j1uJ.d.mts} +1 -5
- package/dist/{multipartBody-BFasGtP9.mjs → multipartBody-qU7KCn1l.mjs} +2 -3
- package/dist/observeSend-BnPtTotW.mjs +20 -0
- package/dist/{openapi-DAPxjYHX.mjs → openapi-DoVa5SVP.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-5Mnwcycy.d.mts} +3 -9
- package/dist/outbox-module-DyITEIop.mjs +297 -0
- package/dist/permissions/index.d.mts +4 -4
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-B14c3OMp.mjs → permissions-BBy4bOGi.mjs} +19 -29
- package/dist/{pipe-CQv7PsAK.mjs → pipe-BOm2o4UA.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-CpnTykjb.mjs → plan-DDIGwuxr.mjs} +5 -9
- package/dist/{plugin-DXTjVg_Q.mjs → plugin-Bn4D_0XK.mjs} +156 -64
- 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-C3VJKRGp.mjs → pluralize-ClEjcKlG.mjs} +2 -3
- package/dist/policy.types-DPqToKG1.d.mts +50 -0
- 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-CquqYJPy.mjs → presets-DK2jh5YR.mjs} +11 -18
- package/dist/{projection-CgfSLOSM.mjs → projection-BHH-sXyS.mjs} +3 -4
- package/dist/purger.types-2wNJK_89.mjs +24 -0
- package/dist/purger.types-DvPp4-yd.d.mts +26 -0
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-D0HUISHJ.mjs → queryCachePlugin-Ckqe98AM.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-AvkBOMkl.mjs → rateLimitKey-CWAjlqcN.mjs} +2 -3
- package/dist/{realtime-CbWtVbqK.mjs → realtime-BIJi9USY.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-BVwpAuFI.mjs → registry-y9ZA-R_J.mjs} +7 -12
- package/dist/{outbox-module-B4FAkx3A.mjs → relay-BNrC1CEP.mjs} +8 -306
- package/dist/{renewingLease-CykpeNcQ.mjs → renewingLease-CS43br5E.mjs} +2 -3
- package/dist/{replyHelpers-DA51IZio.mjs → replyHelpers-oZDzakGb.mjs} +3 -4
- package/dist/{requestContext-DIWHKDtQ.mjs → requestContext-fWb_YaV2.mjs} +2 -3
- package/dist/{requirement-Cp_fsMDL.mjs → requirement--2hWyyHi.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{resourceRateLimit-BFuluodF.mjs → resourceRateLimit-1WbcyMZY.mjs} +3 -4
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{rolldown-runtime-D_lMdYOd.mjs → rolldown-runtime-yH2lHMo_.mjs} +2 -3
- package/dist/{routeValidator-DuLonYwr.mjs → routeValidator-BSlRIA5c.mjs} +2 -3
- package/dist/{runtimeCapabilities-CydRfm0i.mjs → runtimeCapabilities-CYCEtU1W.mjs} +2 -3
- package/dist/{schedules-B693KXxa.mjs → schedules-B5WGlYIT.mjs} +132 -9
- package/dist/{schemaConverter-DNvZWTV6.mjs → schemaConverter-DtNvts-6.mjs} +3 -4
- package/dist/{schemaIR-REV2y7Wd.mjs → schemaIR-uS_RHqa3.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-Bevxy_ST.mjs → scope-BwVLSyNG.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-CfrqPR7A.mjs → shutdown-BJiJN7FT.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-BJwfuRKP.mjs → simpleEqualityMatcher-DGRLq-1k.mjs} +2 -3
- package/dist/{sse-CuNNWr2z.mjs → sse-B_50llZu.mjs} +8 -9
- package/dist/{sseStream-C_2ujAVY.mjs → sseStream-BjSo9Ult.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-C8uBGCbb.mjs → store-helpers-D-n5cwy5.mjs} +2 -3
- package/dist/{streaming-Bdq_M4d5.mjs → streaming-Dcgqa-hH.mjs} +2 -3
- package/dist/{subscriberIdentity-B-KpZkdl.mjs → subscriberIdentity-C9KhIXTF.mjs} +2 -3
- package/dist/{tenancy-C5PCvm1h.mjs → tenancy-COrhjPRZ.mjs} +3 -4
- package/dist/{tenantPreparation-dYvWrgNa.mjs → tenantPreparation-BElWHytd.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-DCqsezX8.mjs → timing-CaxKbRk_.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-DrcNyjpv.mjs → transactionContext-8qKON0Nk.mjs} +2 -3
- package/dist/{typeGuards-CEl10KPy.mjs → typeGuards-DVjVSsXO.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-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-D9NWjpYc.mjs → types-DZHqOuJE.mjs} +5 -6
- package/dist/{types-D3Ixsh00.d.mts → types-DeLiuaNv.d.mts} +2 -4
- 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-BHig1kHq.mjs → userHelpers-_eGj6kf0.mjs} +2 -3
- package/dist/utils/index.d.mts +5 -39
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-BG5P7_Vb.mjs → utils-Dd6MWpye.mjs} +20 -30
- package/dist/{validate-D_mdOCir.mjs → validate-BaF5wd0x.mjs} +5 -7
- package/dist/{versioning-DBGHjPh7.mjs → versioning-DyV7mwtK.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-DPPfM4m6.mjs → workScope-CmCBUmPR.mjs} +3 -4
- package/llms.txt +37 -30
- package/package.json +51 -22
- 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
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CachePurgeError } from "../../purger.types-2wNJK_89.mjs";
|
|
3
|
+
// src/http-cache/purgers/fastly.ts
|
|
4
|
+
/**
|
|
5
|
+
* Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
|
|
6
|
+
* `Surrogate-Key`, space-separated: register the plugin with `tagHeader: { name: 'Surrogate-Key', separator: ' ' }`.
|
|
7
|
+
* Fastly accepts 256 keys per bulk call. Failures throw `CachePurgeError`, never the API key.
|
|
8
|
+
*/
|
|
9
|
+
function createFastlyPurger(options) {
|
|
10
|
+
if (!options.serviceId?.trim()) throw new Error("[arc] createFastlyPurger: serviceId is required");
|
|
11
|
+
if (!options.apiKey?.trim()) throw new Error("[arc] createFastlyPurger: apiKey is required");
|
|
12
|
+
const size = options.maxTagsPerCall ?? 256;
|
|
13
|
+
if (!Number.isInteger(size) || size < 1) throw new Error("[arc] createFastlyPurger: maxTagsPerCall must be a positive integer");
|
|
14
|
+
const doFetch = options.fetch ?? globalThis.fetch;
|
|
15
|
+
if (typeof doFetch !== "function") throw new Error("[arc] createFastlyPurger: no fetch implementation available");
|
|
16
|
+
const url = `${options.apiBase ?? "https://api.fastly.com"}/service/${encodeURIComponent(options.serviceId)}/purge`;
|
|
17
|
+
return {
|
|
18
|
+
name: "fastly",
|
|
19
|
+
capabilities: {
|
|
20
|
+
softPurge: true,
|
|
21
|
+
maxTagsPerCall: size
|
|
22
|
+
},
|
|
23
|
+
async purgeTags(tags, { mode }) {
|
|
24
|
+
let res;
|
|
25
|
+
try {
|
|
26
|
+
res = await doFetch(url, {
|
|
27
|
+
method: "POST",
|
|
28
|
+
headers: {
|
|
29
|
+
"fastly-key": options.apiKey,
|
|
30
|
+
"content-type": "application/json",
|
|
31
|
+
accept: "application/json",
|
|
32
|
+
...mode === "soft" ? { "fastly-soft-purge": "1" } : {}
|
|
33
|
+
},
|
|
34
|
+
body: JSON.stringify({ surrogate_keys: tags })
|
|
35
|
+
});
|
|
36
|
+
} catch {
|
|
37
|
+
throw new CachePurgeError("fastly", "Fastly purge request could not be sent");
|
|
38
|
+
}
|
|
39
|
+
if (!res.ok) {
|
|
40
|
+
const body = await res.json().catch(() => void 0);
|
|
41
|
+
const code = typeof body?.msg === "string" ? [body.msg] : [];
|
|
42
|
+
throw new CachePurgeError("fastly", `Fastly purge refused (HTTP ${res.status})`, res.status, code);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export { createFastlyPurger };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
|
|
2
|
+
import { n as CachePurger } from "../../purger.types-DvPp4-yd.mjs";
|
|
3
|
+
import { FastifyInstance } from "fastify";
|
|
4
|
+
type CacheStatus = "HIT" | "MISS" | "EXPIRED" | "STALE" | "BYPASS" | "DYNAMIC";
|
|
5
|
+
interface CdnResponse {
|
|
6
|
+
status: number;
|
|
7
|
+
headers: Record<string, string>;
|
|
8
|
+
body: string;
|
|
9
|
+
cacheStatus: CacheStatus;
|
|
10
|
+
json<T = unknown>(): T;
|
|
11
|
+
}
|
|
12
|
+
interface CdnRequest {
|
|
13
|
+
method?: "GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
14
|
+
url: string;
|
|
15
|
+
headers?: Record<string, string>;
|
|
16
|
+
payload?: unknown;
|
|
17
|
+
}
|
|
18
|
+
interface FakeCdnOptions {
|
|
19
|
+
/** The Cache Rule's bypass condition. Default: an `Authorization` header. */
|
|
20
|
+
bypass?: (headers: Record<string, string>) => boolean;
|
|
21
|
+
/** The tag header the origin sends. Default `{ name: 'Cache-Tag', separator: ',' }`. */
|
|
22
|
+
tagHeader?: {
|
|
23
|
+
name: string;
|
|
24
|
+
separator: string;
|
|
25
|
+
};
|
|
26
|
+
/** Whether this CDN supports soft purge. Default true. */
|
|
27
|
+
softPurge?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** The edge's reading of a response: TTL and stale windows, or 0 when it must not store. */
|
|
30
|
+
export declare function edgeFreshness(headers: Record<string, string>): {
|
|
31
|
+
ttl: number;
|
|
32
|
+
swr: number;
|
|
33
|
+
sie: number;
|
|
34
|
+
};
|
|
35
|
+
export declare function createFakeCdn(origin: () => FastifyInstance, opts?: FakeCdnOptions): {
|
|
36
|
+
request: (req: CdnRequest) => Promise<CdnResponse>;
|
|
37
|
+
purger: CachePurger;
|
|
38
|
+
stats: {
|
|
39
|
+
originRequests: number;
|
|
40
|
+
purges: Array<{
|
|
41
|
+
tags: string[];
|
|
42
|
+
mode: "hard" | "soft";
|
|
43
|
+
}>;
|
|
44
|
+
};
|
|
45
|
+
/** Move the edge clock forward. */
|
|
46
|
+
advance(ms: number): void;
|
|
47
|
+
/** URLs currently stored. */
|
|
48
|
+
keys: () => string[];
|
|
49
|
+
size: () => number;
|
|
50
|
+
};
|
|
51
|
+
type FakeCdn = ReturnType<typeof createFakeCdn>;
|
|
52
|
+
type HeaderBag = {
|
|
53
|
+
headers: Record<string, string | string[] | number | undefined>;
|
|
54
|
+
};
|
|
55
|
+
/** The response may be stored by a shared cache, optionally carrying these tags. */
|
|
56
|
+
export declare function expectCacheable(res: HeaderBag, opts?: {
|
|
57
|
+
tags?: readonly string[];
|
|
58
|
+
tagHeader?: string;
|
|
59
|
+
}): void;
|
|
60
|
+
/** No shared cache may store the response, and it carries no tags. */
|
|
61
|
+
export declare function expectPrivate(res: HeaderBag, opts?: {
|
|
62
|
+
tagHeader?: string;
|
|
63
|
+
}): void;
|
|
64
|
+
/** The edge served this request without reaching the origin. */
|
|
65
|
+
export declare function expectHit(res: CdnResponse): void;
|
|
66
|
+
/** These tags were purged (in any call, any mode). */
|
|
67
|
+
export declare function expectPurged(cdn: FakeCdn, tags: readonly string[]): void;
|
|
68
|
+
export type { CacheStatus, CdnRequest, CdnResponse, FakeCdn, FakeCdnOptions };
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/*! @classytic/arc v2.47.0 | MIT | https://classytic.com */
|
|
2
|
+
// src/http-cache/testing/assertions.ts
|
|
3
|
+
const header = (res, name) => {
|
|
4
|
+
const v = res.headers[name];
|
|
5
|
+
return v === void 0 ? void 0 : Array.isArray(v) ? v.join(", ") : String(v);
|
|
6
|
+
};
|
|
7
|
+
/** The response may be stored by a shared cache, optionally carrying these tags. */
|
|
8
|
+
function expectCacheable(res, opts = {}) {
|
|
9
|
+
const cc = header(res, "cache-control") ?? "";
|
|
10
|
+
if (!/\bpublic\b/.test(cc)) throw new Error(`expected a public Cache-Control, got "${cc}"`);
|
|
11
|
+
if (opts.tags) {
|
|
12
|
+
const raw = header(res, (opts.tagHeader ?? "cache-tag").toLowerCase()) ?? "";
|
|
13
|
+
const got = new Set(raw.split(/[,\s]+/).filter(Boolean));
|
|
14
|
+
const missing = opts.tags.filter((t) => !got.has(t));
|
|
15
|
+
if (missing.length) throw new Error(`expected tags [${missing.join(", ")}] in "${raw}"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
/** No shared cache may store the response, and it carries no tags. */
|
|
19
|
+
function expectPrivate(res, opts = {}) {
|
|
20
|
+
const cc = header(res, "cache-control") ?? "";
|
|
21
|
+
if (!/\bno-store\b/.test(cc)) throw new Error(`expected no-store, got "${cc}"`);
|
|
22
|
+
if (header(res, (opts.tagHeader ?? "cache-tag").toLowerCase())) throw new Error("a private response carried a tag header");
|
|
23
|
+
}
|
|
24
|
+
/** The edge served this request without reaching the origin. */
|
|
25
|
+
function expectHit(res) {
|
|
26
|
+
if (res.cacheStatus !== "HIT") throw new Error(`expected HIT, got ${res.cacheStatus}`);
|
|
27
|
+
}
|
|
28
|
+
/** These tags were purged (in any call, any mode). */
|
|
29
|
+
function expectPurged(cdn, tags) {
|
|
30
|
+
const sent = new Set(cdn.stats.purges.flatMap((p) => p.tags));
|
|
31
|
+
const missing = tags.filter((t) => !sent.has(t));
|
|
32
|
+
if (missing.length) throw new Error(`expected purge of [${missing.join(", ")}]; purged [${[...sent].join(", ")}]`);
|
|
33
|
+
}
|
|
34
|
+
// src/http-cache/testing/fake-cdn.ts
|
|
35
|
+
const directive = (cc, name) => {
|
|
36
|
+
const m = new RegExp(`(?:^|[,\\s])${name}=(\\d+)`).exec(cc);
|
|
37
|
+
return m ? Number(m[1]) : void 0;
|
|
38
|
+
};
|
|
39
|
+
/** The edge's reading of a response: TTL and stale windows, or 0 when it must not store. */
|
|
40
|
+
function edgeFreshness(headers) {
|
|
41
|
+
const target = headers["cdn-cache-control"];
|
|
42
|
+
const cc = (target ?? headers["cache-control"] ?? "").toLowerCase();
|
|
43
|
+
if (!cc || /\b(private|no-store|no-cache)\b/.test(cc)) return {
|
|
44
|
+
ttl: 0,
|
|
45
|
+
swr: 0,
|
|
46
|
+
sie: 0
|
|
47
|
+
};
|
|
48
|
+
return {
|
|
49
|
+
ttl: target ? directive(cc, "max-age") ?? 0 : directive(cc, "s-maxage") ?? directive(cc, "max-age") ?? 0,
|
|
50
|
+
swr: directive(cc, "stale-while-revalidate") ?? 0,
|
|
51
|
+
sie: directive(cc, "stale-if-error") ?? 0
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
function createFakeCdn(origin, opts = {}) {
|
|
55
|
+
const bypass = opts.bypass ?? ((h) => h.authorization !== void 0);
|
|
56
|
+
const tagName = (opts.tagHeader?.name ?? "Cache-Tag").toLowerCase();
|
|
57
|
+
const separator = opts.tagHeader?.separator ?? ",";
|
|
58
|
+
const store = /* @__PURE__ */ new Map();
|
|
59
|
+
const stats = {
|
|
60
|
+
originRequests: 0,
|
|
61
|
+
purges: []
|
|
62
|
+
};
|
|
63
|
+
let now = 0;
|
|
64
|
+
const visible = (headers) => {
|
|
65
|
+
const out = { ...headers };
|
|
66
|
+
delete out[tagName];
|
|
67
|
+
return out;
|
|
68
|
+
};
|
|
69
|
+
const respond = (status, headers, body, cacheStatus) => ({
|
|
70
|
+
status,
|
|
71
|
+
headers: {
|
|
72
|
+
...visible(headers),
|
|
73
|
+
"cf-cache-status": cacheStatus
|
|
74
|
+
},
|
|
75
|
+
body,
|
|
76
|
+
cacheStatus,
|
|
77
|
+
json: () => JSON.parse(body)
|
|
78
|
+
});
|
|
79
|
+
async function fetchOrigin(req, headers) {
|
|
80
|
+
stats.originRequests++;
|
|
81
|
+
const res = await origin().inject({
|
|
82
|
+
method: req.method ?? "GET",
|
|
83
|
+
url: req.url,
|
|
84
|
+
headers,
|
|
85
|
+
...req.payload !== void 0 ? { payload: req.payload } : {}
|
|
86
|
+
});
|
|
87
|
+
const out = Object.fromEntries(Object.entries(res.headers).map(([k, v]) => [k, Array.isArray(v) ? v.join(", ") : String(v)]));
|
|
88
|
+
return {
|
|
89
|
+
status: res.statusCode,
|
|
90
|
+
headers: out,
|
|
91
|
+
body: res.body
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
function storeEntry(key, res) {
|
|
95
|
+
const fresh = res.status >= 200 && res.status < 300 && res.headers["set-cookie"] === void 0 ? edgeFreshness(res.headers) : void 0;
|
|
96
|
+
if (!fresh || fresh.ttl <= 0) {
|
|
97
|
+
store.delete(key);
|
|
98
|
+
return false;
|
|
99
|
+
}
|
|
100
|
+
const tags = new Set((res.headers[tagName] ?? "").split(separator).map((t) => t.trim()).filter(Boolean));
|
|
101
|
+
store.set(key, {
|
|
102
|
+
...res,
|
|
103
|
+
tags,
|
|
104
|
+
storedAt: now,
|
|
105
|
+
...fresh,
|
|
106
|
+
stale: false
|
|
107
|
+
});
|
|
108
|
+
return true;
|
|
109
|
+
}
|
|
110
|
+
async function request(req) {
|
|
111
|
+
const method = req.method ?? "GET";
|
|
112
|
+
const headers = Object.fromEntries(Object.entries(req.headers ?? {}).map(([k, v]) => [k.toLowerCase(), v]));
|
|
113
|
+
const key = `GET ${req.url}`;
|
|
114
|
+
if (!(method === "GET" || method === "HEAD")) {
|
|
115
|
+
const res = await fetchOrigin(req, headers);
|
|
116
|
+
return respond(res.status, res.headers, res.body, "DYNAMIC");
|
|
117
|
+
}
|
|
118
|
+
if (bypass(headers)) {
|
|
119
|
+
const res = await fetchOrigin(req, headers);
|
|
120
|
+
return respond(res.status, res.headers, res.body, "BYPASS");
|
|
121
|
+
}
|
|
122
|
+
const entry = store.get(key);
|
|
123
|
+
if (entry) {
|
|
124
|
+
const age = (now - entry.storedAt) / 1e3;
|
|
125
|
+
if (!(entry.stale || age >= entry.ttl)) return respond(entry.status, entry.headers, entry.body, "HIT");
|
|
126
|
+
if (age < entry.ttl + entry.swr || entry.stale) {
|
|
127
|
+
const served = respond(entry.status, entry.headers, entry.body, "STALE");
|
|
128
|
+
const res = await fetchOrigin(req, headers);
|
|
129
|
+
if (res.status < 500) storeEntry(key, res);
|
|
130
|
+
return served;
|
|
131
|
+
}
|
|
132
|
+
const res = await fetchOrigin(req, headers);
|
|
133
|
+
if (res.status >= 500 && age < entry.ttl + entry.sie) return respond(entry.status, entry.headers, entry.body, "STALE");
|
|
134
|
+
if (storeEntry(key, res)) return respond(res.status, res.headers, res.body, "EXPIRED");
|
|
135
|
+
return respond(res.status, res.headers, res.body, res.headers["set-cookie"] !== void 0 ? "BYPASS" : "DYNAMIC");
|
|
136
|
+
}
|
|
137
|
+
const res = await fetchOrigin(req, headers);
|
|
138
|
+
if (storeEntry(key, res)) return respond(res.status, res.headers, res.body, "MISS");
|
|
139
|
+
return respond(res.status, res.headers, res.body, res.headers["set-cookie"] !== void 0 ? "BYPASS" : "DYNAMIC");
|
|
140
|
+
}
|
|
141
|
+
return {
|
|
142
|
+
request,
|
|
143
|
+
purger: {
|
|
144
|
+
name: "fake-cdn",
|
|
145
|
+
capabilities: { softPurge: opts.softPurge !== false },
|
|
146
|
+
async purgeTags(tags, { mode }) {
|
|
147
|
+
stats.purges.push({
|
|
148
|
+
tags: [...tags],
|
|
149
|
+
mode
|
|
150
|
+
});
|
|
151
|
+
for (const [key, entry] of store) {
|
|
152
|
+
if (!tags.some((t) => entry.tags.has(t))) continue;
|
|
153
|
+
if (mode === "soft" && opts.softPurge !== false) entry.stale = true;
|
|
154
|
+
else store.delete(key);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
stats,
|
|
159
|
+
/** Move the edge clock forward. */
|
|
160
|
+
advance(ms) {
|
|
161
|
+
now += ms;
|
|
162
|
+
},
|
|
163
|
+
/** URLs currently stored. */
|
|
164
|
+
keys: () => [...store.keys()].map((k) => k.slice(4)),
|
|
165
|
+
size: () => store.size
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
export { createFakeCdn, edgeFreshness, expectCacheable, expectHit, expectPrivate, expectPurged };
|
|
@@ -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.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError } from "../errors-DnrUChAy.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-KxhrKevA.mjs";
|
|
4
|
+
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement--2hWyyHi.mjs";
|
|
5
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-D-n5cwy5.mjs";
|
|
6
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-CaxKbRk_.mjs";
|
|
7
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-DoFX06fm.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
|
-
import { IdempotencyError, fingerprintRequest } from "@classytic/repo-core/idempotency";
|
|
13
12
|
import { update } from "@classytic/repo-core/update";
|
|
14
|
-
|
|
13
|
+
import { IdempotencyError, fingerprintRequest } from "@classytic/repo-core/idempotency";
|
|
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.47.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as acquireBySteps } from "../acquire-DoFX06fm.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 };
|