@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
|
@@ -1,94 +1,78 @@
|
|
|
1
|
-
# Enterprise
|
|
1
|
+
# Enterprise auth map
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
What arc owns for enterprise auth, what it delegates, and the auth-event audit bridge. Sessions, refresh and OAuth/MFA/SSO stay in Better Auth.
|
|
4
4
|
|
|
5
|
-
## In
|
|
5
|
+
## In the box
|
|
6
6
|
|
|
7
|
-
|
|
|
7
|
+
| Need | Surface | File |
|
|
8
8
|
|---|---|---|
|
|
9
|
-
|
|
|
10
|
-
|
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
|
|
18
|
-
## Out-of-box (deliberate)
|
|
19
|
-
|
|
20
|
-
| Capability | Why arc doesn't ship it | What to use instead |
|
|
21
|
-
|---|---|---|
|
|
22
|
-
| **First-party SAML** | BA SAML plugin is the canonical path; arc can't compete with IdP edge cases | Better Auth SAML plugin (community, maturing) or `@node-saml/passport-saml` wrapped in arc's `authenticate` callback |
|
|
23
|
-
| **Session storage / Redis sessions** | BA's `secondaryStorage` covers this — duplicating fragments truth | Configure BA's `secondaryStorage: { get, set, delete }` with `ioredis` directly |
|
|
24
|
-
| **Refresh-token rotation** | BA owns the session model; arc would have to parallel-implement to add it | BA handles rotation in its session model; for JWT auth, use the existing `isRevoked` hook |
|
|
25
|
-
| **DPoP cryptographic proof verification** | One `jose.dpop.verify()` call in your authenticate function — arc would force peer-dep `jose` | `jose` (already a peer of most apps using OAuth/JWT) |
|
|
26
|
-
| **Mandate JWT/VC parsing** | Format varies per IdP/issuer; arc validates *what's verified*, not how it's verified | `jose` for JWTs, `did-jwt-vc` for Verifiable Credentials |
|
|
27
|
-
| **Device trust / risk scoring** | Out of framework scope; vendor-specific | Castle, Stytch, Auth0 Risk, Persona |
|
|
28
|
-
| **SOC2/HIPAA attestations** | Arc gives you the controls; certification is per-deployment | [`docs/compliance/soc2.md`](../../../docs/compliance/soc2.md) maps controls to arc primitives |
|
|
29
|
-
| **First-party SSO discovery** (`/.well-known/openid-configuration` aggregation) | No real demand; BA exposes its own well-known paths | BA's `openAPI()` + `mcp()` plugins emit RFC 9728 metadata |
|
|
9
|
+
| IdP provisioning (Okta, Azure AD) | `scimPlugin` from `@classytic/arc/scim` | scim.md |
|
|
10
|
+
| Agent mandates, DPoP | `requireAgentScope`, `requireMandate`, `requireDPoP` from `@classytic/arc/permissions` | agent-auth.md |
|
|
11
|
+
| Auth-event audit | `wireBetterAuthAudit` from `@classytic/arc/auth/audit` | below |
|
|
12
|
+
| Sessions, OAuth, MFA, SSO | Better Auth plugins | auth-better-auth.md |
|
|
13
|
+
| Multi-role, multi-tenant, parent-child orgs | `RequestScope`, presets | multi-tenancy.md |
|
|
14
|
+
| Field redaction, dynamic ACL, role hierarchy | `@classytic/arc/permissions` | auth-permissions.md |
|
|
15
|
+
| Resource-op audit and retention | `@classytic/arc/audit` | production-audit.md |
|
|
16
|
+
| API-key admin | BA `apiKey()` plus overlay | auth-api-keys.md |
|
|
30
17
|
|
|
31
|
-
##
|
|
18
|
+
## Auth-event audit bridge
|
|
32
19
|
|
|
33
|
-
|
|
34
|
-
IdP (Okta / Azure AD)
|
|
35
|
-
│
|
|
36
|
-
│ SCIM provisioning ──→ /scim/v2/Users ──→ arc user resource
|
|
37
|
-
│
|
|
38
|
-
│ SAML / OIDC SSO ──→ Better Auth ──→ scope.kind = 'member'
|
|
39
|
-
│ │
|
|
40
|
-
▼ │
|
|
41
|
-
end-user signs in │
|
|
42
|
-
│ │
|
|
43
|
-
│ → BA databaseHooks.session.create.after │
|
|
44
|
-
│ → wireBetterAuthAudit dispatches │
|
|
45
|
-
│ → audit row: { resource:'auth', action:'session.create' }
|
|
46
|
-
▼
|
|
47
|
-
end-user delegates to AI agent
|
|
48
|
-
│
|
|
49
|
-
│ user authorizes mandate (cap, audience, ttl)
|
|
50
|
-
│ IdP / your token endpoint mints mandate JWT
|
|
51
|
-
▼
|
|
52
|
-
AI agent calls protected route
|
|
53
|
-
│
|
|
54
|
-
│ Authorization: Mandate <jwt>
|
|
55
|
-
│ DPoP: <proof>
|
|
56
|
-
│
|
|
57
|
-
▼
|
|
58
|
-
arc authenticate fn:
|
|
59
|
-
- jose.jwtVerify(mandate, JWKS)
|
|
60
|
-
- jose.dpop.verify(proof)
|
|
61
|
-
- sets scope = { kind:'service', mandate, dpopJkt, ... }
|
|
62
|
-
│
|
|
63
|
-
▼
|
|
64
|
-
requireAgentScope({ capability, audience, validateAmount, requireDPoP })
|
|
65
|
-
│
|
|
66
|
-
├─ ✓ auditPlugin.custom('invoice','INV-7','pay', { mandate.id, dpopJkt })
|
|
67
|
-
│ ↳ same store as session.create row above
|
|
68
|
-
│
|
|
69
|
-
└─ executes handler
|
|
70
|
-
```
|
|
20
|
+
Routes BA lifecycle events through arc's `auditPlugin`: `resource: 'auth'`, `action` = event name, `documentId` = subject id. One store for resource and auth events.
|
|
71
21
|
|
|
72
|
-
|
|
22
|
+
```typescript
|
|
23
|
+
import { betterAuth } from 'better-auth';
|
|
24
|
+
import { organization } from 'better-auth/plugins/organization';
|
|
25
|
+
import { twoFactor } from 'better-auth/plugins/two-factor';
|
|
26
|
+
import { createBetterAuthAdapter } from '@classytic/arc/auth';
|
|
27
|
+
import { wireBetterAuthAudit } from '@classytic/arc/auth/audit';
|
|
73
28
|
|
|
74
|
-
|
|
29
|
+
const audit = wireBetterAuthAudit({ events: ['session.*', 'user.create', 'mfa.*', 'org.invite.*'] });
|
|
30
|
+
|
|
31
|
+
const auth = betterAuth({
|
|
32
|
+
plugins: [organization(), twoFactor()],
|
|
33
|
+
hooks: audit.hooks, // endpoint hooks: MFA, OAuth, password reset
|
|
34
|
+
databaseHooks: audit.databaseHooks, // session/user create, update, delete
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
const app = await createApp({
|
|
38
|
+
auth: { type: 'betterAuth', betterAuth: createBetterAuthAdapter({ auth }) },
|
|
39
|
+
arcPlugins: { audit: { repository: auditRepo } },
|
|
40
|
+
});
|
|
41
|
+
audit.attach(app); // flush buffered boot events, connect live logger
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
| Option | Purpose |
|
|
75
45
|
|---|---|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
| Org admin abuses elevated scope | `noElevatedBypass: true` on regulated mandates; `arc.scope.elevated` audit event |
|
|
83
|
-
| Failed sign-in / MFA flooding | `wireBetterAuthAudit` captures `mfa.failed` events; rate-limit on `clientId` |
|
|
46
|
+
| `events` | Glob patterns (`*` one segment, `**` deep). Default `['session.*', 'user.create', 'user.delete']` |
|
|
47
|
+
| `transform(event)` | Redact or rename; return `null` to drop |
|
|
48
|
+
| `resolveEndpointEvent(phase, ctx)` | Name unclassified endpoint hits; `null` drops |
|
|
49
|
+
| `bufferSize` | Pre-`attach` buffer (default 1000, FIFO drop) |
|
|
50
|
+
|
|
51
|
+
Event names: `session.create|delete|update`, `user.create|update|delete`, `mfa.enroll|verify|failed|disable`, `password.reset.request|complete`, `email.verify`, `org.create|delete`, `org.invite.create|accept|reject`, `org.member.add|remove|role.update`, `apikey.create|delete|failed`, plus `endpoint.before|after|error` for unclassified endpoints.
|
|
84
52
|
|
|
85
|
-
|
|
53
|
+
For a plugin author, `audit.asPluginHooks()` returns array-form hooks for `plugins: [{ id, hooks }]`.
|
|
86
54
|
|
|
87
|
-
|
|
55
|
+
## Not in arc
|
|
56
|
+
|
|
57
|
+
| Capability | Use instead |
|
|
58
|
+
|---|---|
|
|
59
|
+
| First-party SAML | BA SAML plugin, or `@node-saml/passport-saml` inside `authenticate` |
|
|
60
|
+
| Redis sessions, refresh rotation | BA `secondaryStorage` and session model; JWT auth uses `isRevoked` |
|
|
61
|
+
| DPoP proof or mandate JWT/VC verification | `jose`, `did-jwt-vc` in `authenticate` |
|
|
62
|
+
| Device trust, risk scoring | Vendor (Castle, Stytch, Auth0 Risk) |
|
|
63
|
+
| Compliance attestations | `docs/compliance/soc2.md`, `docs/compliance/hipaa.md` map controls to arc primitives |
|
|
88
64
|
|
|
89
|
-
##
|
|
65
|
+
## Threats and mitigations
|
|
66
|
+
|
|
67
|
+
| Threat | Mitigation |
|
|
68
|
+
|---|---|
|
|
69
|
+
| Offboarded user keeps access | SCIM `DELETE /Users/:id` |
|
|
70
|
+
| Stolen bearer replay | `requireDPoP()` |
|
|
71
|
+
| Agent overspends | `requireMandate({ validateAmount })` |
|
|
72
|
+
| Mandate used on wrong resource | `requireMandate({ audience })` |
|
|
73
|
+
| Replay after revocation | Short `expiresAt` plus IdP revocation |
|
|
74
|
+
| Untraceable agent action | `audit.custom` with mandate id and `dpopJkt` |
|
|
75
|
+
| Elevated admin abuse | `noElevatedBypass: true` on regulated mandates; elevation `onElevation` hook |
|
|
76
|
+
| MFA or sign-in flooding | `mfa.failed` audit events; rate limit per client |
|
|
90
77
|
|
|
91
|
-
|
|
92
|
-
- [agent-auth.md](agent-auth.md) — DPoP + mandate semantics
|
|
93
|
-
- [auth.md](auth.md) — Better Auth + multi-plugin matrix
|
|
94
|
-
- [`playground/enterprise-auth/`](../../../playground/enterprise-auth/) — full runnable smoke
|
|
78
|
+
Runnable smoke: `playground/enterprise-auth/`.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# Events: transactional outbox
|
|
2
|
+
|
|
3
|
+
Persist the event in the same DB transaction as the business write; a relay publishes it at-least-once. Store contract types (`OutboxStore`, `OutboxFailurePolicy`, `OutboxOwnershipError`) come from `@classytic/primitives/outbox`. Arc ships the runtime.
|
|
4
|
+
|
|
5
|
+
## Outbox as a module (default path)
|
|
6
|
+
|
|
7
|
+
```typescript
|
|
8
|
+
import { createOutboxModule, repositoryAsOutboxStore, exponentialBackoff } from '@classytic/arc/events';
|
|
9
|
+
import type { OutboxModuleExports } from '@classytic/arc/events';
|
|
10
|
+
import { defineModule, getModuleExports } from '@classytic/arc/factory';
|
|
11
|
+
|
|
12
|
+
const app = await createApp({
|
|
13
|
+
modules: [
|
|
14
|
+
createOutboxModule({
|
|
15
|
+
store: repositoryAsOutboxStore(outboxRepo), // or a factory (app) => store
|
|
16
|
+
relayEveryMs: 5000,
|
|
17
|
+
failurePolicy: ({ attempts }) =>
|
|
18
|
+
attempts >= 5 ? { deadLetter: true } : { retryAt: exponentialBackoff({ attempt: attempts }) },
|
|
19
|
+
}),
|
|
20
|
+
defineModule({
|
|
21
|
+
name: 'order',
|
|
22
|
+
dependsOn: ['outbox'], // missing outbox fails boot
|
|
23
|
+
bootstrap: (f) => makeOrders({ outbox: getModuleExports<OutboxModuleExports>(f, 'outbox').store }),
|
|
24
|
+
}),
|
|
25
|
+
],
|
|
26
|
+
});
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
| `createOutboxModule` option | Meaning |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `store` | `OutboxStore` or `(fastify) => OutboxStore` |
|
|
32
|
+
| `transport` | Default: the app's raw event transport (not the `app.events` facade) |
|
|
33
|
+
| `name` | Module name and `dependsOn` key (default `'outbox'`) |
|
|
34
|
+
| `relayEveryMs` | Default 5000 |
|
|
35
|
+
| `batchSize`, `leaseMs`, `consumerId` | Relay tuning; `consumerId` defaults to a per-instance unique id |
|
|
36
|
+
| `failurePolicy` | `({ attempts, error }) => { retryAt } \| { deadLetter: true }`. Set one: without it failed rows retry every poll forever |
|
|
37
|
+
| `onError` | Per-event relay problems (default: structured logger) |
|
|
38
|
+
| `sessionProvider` | Default `() => transactionContext.get()`; `false` opts out |
|
|
39
|
+
| `runOnStart` | Drain backlog at boot (default true) |
|
|
40
|
+
| `health` | Readiness check `<name>.relay` + log alerts; `false` disables. `{ relayLagUnhealthyMs, probeCacheMs, alertEveryMs }` |
|
|
41
|
+
|
|
42
|
+
Exports at `getModuleExports<OutboxModuleExports>(app, 'outbox')`: `store`, `relay` (an `EventOutbox`), `requestDrain()` (coalesced, call after commit), `drain({ maxPasses })` (await in tests), `health()`.
|
|
43
|
+
|
|
44
|
+
## Writing
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
await outbox.store(
|
|
48
|
+
createEvent('order.placed', { orderId }, { idempotencyKey: `order:${orderId}:placed` }),
|
|
49
|
+
{ session }, // omit inside transactionContext
|
|
50
|
+
);
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- `meta.idempotencyKey` maps to `dedupeKey` (duplicates absorbed). Dedupe is scoped per event type.
|
|
54
|
+
- Inside a transactional write the ambient session is used, so the row commits with the domain write.
|
|
55
|
+
- Durable `defineEvent` definitions (money, stock) go through `store`; `app.events.publish` refuses them.
|
|
56
|
+
|
|
57
|
+
## EventOutbox (standalone)
|
|
58
|
+
|
|
59
|
+
```typescript
|
|
60
|
+
const outbox = new EventOutbox({ repository: repo, transport, failurePolicy, batchSize: 100, leaseMs: 30000 });
|
|
61
|
+
const r = await outbox.relayBatch();
|
|
62
|
+
// { relayed, attempted, publishFailed, ackFailed, ownershipMismatches, malformed, failHookErrors, deadLettered, usedPublishMany }
|
|
63
|
+
const dead = await outbox.getDeadLettered(100); // DeadLetteredEvent[]
|
|
64
|
+
await outbox.purge(olderThanMs); // delivered rows
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Options also include `store` (instead of `repository`), `consumerId`, `onError`, `onPublished`, `usePublishMany`, `sessionProvider`. `MemoryOutboxStore` is the in-memory store for tests.
|
|
68
|
+
|
|
69
|
+
## Stores
|
|
70
|
+
|
|
71
|
+
`repositoryAsOutboxStore(repository, { visibleAtField? })` adapts any repo-core repository (create, getOne, getAll, deleteMany, findOneAndUpdate). It owns claim leases with a fence token, retry, dead letter, `requeue`, `countByStatus`, `oldestPendingAgeMs`, `purge`. The table needs columns: id (event id), `event`, `type`, `status` (`pending` | `delivered` | `dead_letter`), `attempts`, `visibleAt`, `leaseOwner`, `leaseExpiresAt`, `fenceToken`, `deliveredAt`, `firstFailedAt`, `lastFailedAt`, `lastError`, `dedupeKey` (unique, nullable), `partitionKey`, `headers`, `createdAt`. Index `{ status, visibleAt }`; add a TTL index on `deliveredAt` for retention. Prove a custom store with `runOutboxStoreContract` (see testing.md).
|
|
72
|
+
|
|
73
|
+
## Operator surface
|
|
74
|
+
|
|
75
|
+
```typescript
|
|
76
|
+
import { createOutboxAdminModule } from '@classytic/arc/outbox-admin';
|
|
77
|
+
import { requirePlatformRole } from '@classytic/arc/permissions';
|
|
78
|
+
|
|
79
|
+
createOutboxAdminModule({
|
|
80
|
+
store, // needs getDeadLettered, requeue, countByStatus, oldestPendingAgeMs
|
|
81
|
+
permissions: { view: requirePlatformRole('platform-ops'), replay: requirePlatformRole('platform-ops') },
|
|
82
|
+
prefix: '/admin/outbox', // default
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Routes: `GET {prefix}/health`, `GET {prefix}/dead-letter?limit=`, `POST {prefix}/dead-letter/:id/replay`. Depends on the outbox module. Gates must be platform-only or boot fails (`allowUnverifiedOperatorPermission` overrides). Payload and stack are hidden unless `exposePayload` / `exposeStack`. Also `readOutboxHealth`, `DEFAULT_RELAY_LAG_UNHEALTHY_MS` from `@classytic/arc/events`.
|
|
87
|
+
|
|
88
|
+
## Durable webhooks
|
|
89
|
+
|
|
90
|
+
See integrations-webhooks.md (`createDurableWebhookModule`, `webhookPlugin({ durable })`).
|