@classytic/arc 2.45.2 → 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-DHb1tpu-.mjs → EventTransport-DNgD9NP4.mjs} +3 -4
- package/dist/{HookSystem-C1u0EUnt.mjs → HookSystem-DRbPzEcP.mjs} +3 -4
- package/dist/{QueryCache--5uAuYPW.d.mts → QueryCache-DdvrGG8Q.d.mts} +1 -3
- package/dist/{ResourceRegistry-D2jXWVN_.mjs → ResourceRegistry-Douk51fa.mjs} +15 -4
- package/dist/{acquire-DTkA8Lme.mjs → acquire-RbtvDg9s.mjs} +2 -3
- package/dist/{actionPermissions-DRVk6m7x.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-D48fUJv1.mjs → authorizationDecision-DeZMrHcm.mjs} +5 -6
- package/dist/{base-CZyixEQR.d.mts → base-HXNgPQww.d.mts} +1 -7
- package/dist/{boundedMap-DkKiPifd.mjs → boundedMap-2WBh3gM9.mjs} +2 -3
- package/dist/{buildHandler-BiZ4VATS.mjs → buildHandler-DxVOOBpw.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-BYRwYrUo.mjs} +3 -4
- package/dist/{claimed-ChI13rUR.mjs → claimed-DYlELdnm.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-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-QIZ2560Y.mjs → core-D9rS2BxO.mjs} +9 -12
- package/dist/{createActionRouter-CvH84dyx.mjs → createActionRouter-0qkCRzTL.mjs} +7 -8
- package/dist/{createAggregationRouter-DGyK2Hp6.mjs → createAggregationRouter-CUf5Esd9.mjs} +9 -10
- package/dist/{createApp-CKjZpmq9.mjs → createApp-DZIXfDKD.mjs} +49 -62
- package/dist/{createMcpServer-DSztofa9.d.mts → createMcpServer-DeVpqQF-.d.mts} +1 -3
- package/dist/{defineAggregation-BLza7Ca4.mjs → defineAggregation-bmKQ4NmC.mjs} +2 -3
- package/dist/{defineResource-CEo0gDCb.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-BJTsSnke.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-2p4SL5zm.mjs → errorHandler-dFyGOEoB.mjs} +16 -6
- package/dist/{errors-grZkIA8N.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-ItcYBGUs.mjs → eventPlugin-eMhAPtQA.mjs} +10 -12
- package/dist/{eventTypes-Ck6fD3ne.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-BRX0Krcj.mjs → fields-LnbCcvsw.mjs} +2 -3
- package/dist/{filter-merge-CDc7YMwX.mjs → filter-merge-BAWi019Q.mjs} +2 -3
- package/dist/{generate-DCGuEbqI.d.mts → generate-C-g_KOkV.d.mts} +0 -4
- package/dist/{generate-hvg7V2g1.mjs → generate-oXoDnpJf.mjs} +7 -12
- package/dist/{headers-Cqkg4LzI.mjs → headers-DBd3Qheo.mjs} +3 -4
- package/dist/{health-PVt0VjOx.mjs → health-BlJu9GXS.mjs} +2 -3
- package/dist/{health-DyeP3mTW.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-jC3rMPzb.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-ptwyzZQ-.mjs → jsonBody-DpRpKR_K.mjs} +3 -4
- package/dist/{keys-C1vFuSbv.mjs → keys-FBz6Ull-.mjs} +2 -3
- package/dist/{loadResources-CHPDyIPn.mjs → loadResources-Bx1sKPnF.mjs} +4 -5
- package/dist/{loadResourcesFromEntry-BkHHTu_B.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-C5bvCiAK.mjs → logger-CbFcIEBZ.mjs} +3 -5
- package/dist/{mcpPlugin-C9qohJCF.mjs → mcpPlugin-yix548XX.mjs} +41 -60
- package/dist/{memory-CxiTwT0j.mjs → memory-Bgw5dn8N.mjs} +4 -5
- package/dist/{metrics-Ckp2zRy-.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-CfnKuIuH.mjs → module-Dsc_nKL5.mjs} +2 -3
- package/dist/{multiTenant-CAtYlW6H.d.mts → multiTenant-XCxAUlru.d.mts} +1 -5
- package/dist/{multipartBody-BFasGtP9.mjs → multipartBody-B85ek8Kj.mjs} +2 -3
- package/dist/observeSend-BK-JN1jK.mjs +20 -0
- package/dist/{openapi-DAPxjYHX.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-B4FAkx3A.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-B14c3OMp.mjs → permissions-A1oKtpiC.mjs} +19 -29
- package/dist/{pipe-CQv7PsAK.mjs → pipe-Czpw9U2n.mjs} +3 -4
- package/dist/pipeline/index.d.mts +1 -9
- package/dist/pipeline/index.mjs +5 -8
- package/dist/{plan-CpnTykjb.mjs → plan-KVseuBCL.mjs} +5 -9
- package/dist/{plugin-DXTjVg_Q.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-C3VJKRGp.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-CquqYJPy.mjs → presets-qKCehiJM.mjs} +11 -18
- package/dist/{projection-CgfSLOSM.mjs → projection-ClBqtsIw.mjs} +3 -4
- package/dist/{pushref-registry-UxCkoA4C.d.mts → pushref-registry-d86QUaSq.d.mts} +0 -6
- package/dist/{queryCachePlugin-D0HUISHJ.mjs → queryCachePlugin-3gJj5Rbz.mjs} +8 -10
- package/dist/{queryCachePlugin-C2lZjTxk.d.mts → queryCachePlugin-DYQUyeJ9.d.mts} +2 -4
- package/dist/{rateLimitKey-AvkBOMkl.mjs → rateLimitKey-Kro---xl.mjs} +2 -3
- package/dist/{realtime-CbWtVbqK.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-BVwpAuFI.mjs → registry-BA-_vFYk.mjs} +7 -12
- package/dist/{renewingLease-CykpeNcQ.mjs → renewingLease-CMY8YOcc.mjs} +2 -3
- package/dist/{replyHelpers-DA51IZio.mjs → replyHelpers-DK9P_XSz.mjs} +3 -4
- package/dist/{requestContext-DIWHKDtQ.mjs → requestContext-GYO_0gEw.mjs} +2 -3
- package/dist/{requirement-CbiLdQ1n.d.mts → requirement-CTRQjjQx.d.mts} +0 -2
- package/dist/{requirement-Cp_fsMDL.mjs → requirement-DeNjZIH3.mjs} +2 -3
- package/dist/{resourceRateLimit-Wf6d6FL9.d.mts → resourceRateLimit-DCWglD7V.d.mts} +1 -3
- package/dist/{resourceRateLimit-BFuluodF.mjs → resourceRateLimit-tHLbrtWc.mjs} +3 -4
- package/dist/{rolldown-runtime-D_lMdYOd.mjs → rolldown-runtime-Kv1fZdLg.mjs} +2 -3
- package/dist/{routeValidator-DuLonYwr.mjs → routeValidator-C_H5NanI.mjs} +2 -3
- package/dist/{runtimeCapabilities-CydRfm0i.mjs → runtimeCapabilities-DWqbxkyw.mjs} +2 -3
- package/dist/{schedules-B693KXxa.mjs → schedules-eO_RzhCU.mjs} +132 -9
- package/dist/{schemaConverter-DNvZWTV6.mjs → schemaConverter-DBJrPZN4.mjs} +3 -4
- package/dist/{schemaIR-REV2y7Wd.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-Bevxy_ST.mjs → scope-B-Sm9m_E.mjs} +5 -6
- package/dist/{sessionManager-qimlKV0P.d.mts → sessionManager-CdvDF04x.d.mts} +2 -4
- package/dist/{shutdown-CfrqPR7A.mjs → shutdown-DzLFbe27.mjs} +2 -3
- package/dist/{simpleEqualityMatcher-BJwfuRKP.mjs → simpleEqualityMatcher-DOJhwQ8g.mjs} +2 -3
- package/dist/{sse-CuNNWr2z.mjs → sse-2972pVwV.mjs} +8 -9
- package/dist/{sseStream-C_2ujAVY.mjs → sseStream-AWLEeNV-.mjs} +3 -4
- package/dist/{storage-Cx9Sz3Ou.d.mts → storage-odC5MNKN.d.mts} +0 -2
- package/dist/{store-helpers-C8uBGCbb.mjs → store-helpers-VzjgVTkM.mjs} +2 -3
- package/dist/{streaming-Bdq_M4d5.mjs → streaming-DvraWW6x.mjs} +2 -3
- package/dist/{subscriberIdentity-B-KpZkdl.mjs → subscriberIdentity-Bya56jsg.mjs} +2 -3
- package/dist/{tenancy-C5PCvm1h.mjs → tenancy-DSa_0hhw.mjs} +3 -4
- package/dist/{tenantPreparation-dYvWrgNa.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-DCqsezX8.mjs → timing-6rQTuCwg.mjs} +3 -5
- package/dist/{tracing-Dro5eH6j.d.mts → tracing-JSFiBl5r.d.mts} +0 -2
- package/dist/{transactionContext-DrcNyjpv.mjs → transactionContext-DaxYUEgH.mjs} +2 -3
- package/dist/{typeGuards-CEl10KPy.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-D9NWjpYc.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-BHig1kHq.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-BG5P7_Vb.mjs → utils-CjjGOT4E.mjs} +20 -30
- package/dist/{validate-D_mdOCir.mjs → validate-4RlTKOJb.mjs} +5 -7
- package/dist/{versioning-DBGHjPh7.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-DPPfM4m6.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
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { h as RESERVED_QUERY_PARAMS } from "./constants-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { t as ArcError, u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { h as RESERVED_QUERY_PARAMS } from "./constants-CHZMUwBW.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-CbFcIEBZ.mjs";
|
|
4
|
+
import { t as ArcError, u as ValidationError } from "./errors-BY8vzlP4.mjs";
|
|
5
|
+
import { t as runObservingSend } from "./observeSend-BK-JN1jK.mjs";
|
|
5
6
|
import { errorContractSchema as errorContractSchema$1 } from "@classytic/repo-core/errors";
|
|
6
7
|
import { readEnv } from "@classytic/primitives/environment";
|
|
7
8
|
import { OPERATOR_DESCRIPTIONS, URL_OPERATORS, escapeRegex, isQueryGrammarError, readFilterClauses, readPageRequest, readSearch, readSelect, readSort } from "@classytic/repo-core/query-parser";
|
|
8
|
-
|
|
9
|
+
// src/utils/filter-dialect.ts
|
|
9
10
|
/**
|
|
10
11
|
* Filter dialects — what `ArcQueryParser` EMITS. Reading a URL (keys, operators, coercion,
|
|
11
12
|
* refusals) is repo-core's shared grammar; a dialect turns its canonical clauses into one store's
|
|
@@ -130,8 +131,7 @@ const NEUTRAL_DIALECT = {
|
|
|
130
131
|
"$and"
|
|
131
132
|
]
|
|
132
133
|
};
|
|
133
|
-
|
|
134
|
-
//#region src/utils/queryParser.ts
|
|
134
|
+
// src/utils/queryParser.ts
|
|
135
135
|
/**
|
|
136
136
|
* Arc's default URL-to-query parser. Reading the URL is repo-core's shared grammar (the same
|
|
137
137
|
* contract as mongokit's `QueryParser` and `parseUrl`); this adds arc's populate handling and
|
|
@@ -340,8 +340,7 @@ function toValidationError(error) {
|
|
|
340
340
|
message: error.meta.reason
|
|
341
341
|
}]);
|
|
342
342
|
}
|
|
343
|
-
|
|
344
|
-
//#region src/utils/responseSchemas.ts
|
|
343
|
+
// src/utils/responseSchemas.ts
|
|
345
344
|
/**
|
|
346
345
|
* JSON Schema definitions for arc API responses.
|
|
347
346
|
*
|
|
@@ -790,8 +789,7 @@ function getDefaultCrudSchemas() {
|
|
|
790
789
|
delete: { response: { 200: deleteResponse() } }
|
|
791
790
|
});
|
|
792
791
|
}
|
|
793
|
-
|
|
794
|
-
//#region src/utils/circuitBreaker.ts
|
|
792
|
+
// src/utils/circuitBreaker.ts
|
|
795
793
|
/**
|
|
796
794
|
* Circuit Breaker Pattern
|
|
797
795
|
*
|
|
@@ -1140,8 +1138,7 @@ var CircuitBreakerRegistry = class {
|
|
|
1140
1138
|
function createCircuitBreakerRegistry() {
|
|
1141
1139
|
return new CircuitBreakerRegistry();
|
|
1142
1140
|
}
|
|
1143
|
-
|
|
1144
|
-
//#region src/utils/circuitBreakerRedis.ts
|
|
1141
|
+
// src/utils/circuitBreakerRedis.ts
|
|
1145
1142
|
/** Fixed-window cluster failure counter. See the module header. */
|
|
1146
1143
|
var RedisCircuitBreakerState = class {
|
|
1147
1144
|
name = "redis";
|
|
@@ -1165,8 +1162,7 @@ var RedisCircuitBreakerState = class {
|
|
|
1165
1162
|
await this.#redis.del(this.#prefix + circuit);
|
|
1166
1163
|
}
|
|
1167
1164
|
};
|
|
1168
|
-
|
|
1169
|
-
//#region src/utils/compensation.ts
|
|
1165
|
+
// src/utils/compensation.ts
|
|
1170
1166
|
/**
|
|
1171
1167
|
* Observability hooks must never alter the transaction: a throwing metrics
|
|
1172
1168
|
* sink must not fail a step that succeeded, trigger compensation, or become
|
|
@@ -1250,8 +1246,7 @@ function defineCompensation(name, steps) {
|
|
|
1250
1246
|
execute: (initialContext, hooks) => withCompensation(name, steps, initialContext, hooks)
|
|
1251
1247
|
};
|
|
1252
1248
|
}
|
|
1253
|
-
|
|
1254
|
-
//#region src/utils/defineErrorMapper.ts
|
|
1249
|
+
// src/utils/defineErrorMapper.ts
|
|
1255
1250
|
/**
|
|
1256
1251
|
* Register an `ErrorMapper` with its domain-specific generic argument and
|
|
1257
1252
|
* have it assign cleanly into `ErrorMapper[]` (no `as unknown as ErrorMapper`).
|
|
@@ -1268,8 +1263,7 @@ function defineCompensation(name, steps) {
|
|
|
1268
1263
|
function defineErrorMapper(mapper) {
|
|
1269
1264
|
return mapper;
|
|
1270
1265
|
}
|
|
1271
|
-
|
|
1272
|
-
//#region src/utils/defineGuard.ts
|
|
1266
|
+
// src/utils/defineGuard.ts
|
|
1273
1267
|
/** Hidden property key for guard context storage on the request object. */
|
|
1274
1268
|
const GUARD_STORE_KEY = "__arcGuardContext";
|
|
1275
1269
|
/**
|
|
@@ -1278,12 +1272,11 @@ const GUARD_STORE_KEY = "__arcGuardContext";
|
|
|
1278
1272
|
function defineGuard(config) {
|
|
1279
1273
|
const { name, resolve } = config;
|
|
1280
1274
|
const preHandler = async (req, reply) => {
|
|
1281
|
-
const ctx = await resolve(req, reply);
|
|
1282
|
-
if (
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1275
|
+
const { result: ctx, answered } = await runObservingSend(reply, () => resolve(req, reply));
|
|
1276
|
+
if (answered) return reply;
|
|
1277
|
+
const store = req[GUARD_STORE_KEY] ?? {};
|
|
1278
|
+
store[name] = ctx;
|
|
1279
|
+
req[GUARD_STORE_KEY] = store;
|
|
1287
1280
|
};
|
|
1288
1281
|
return {
|
|
1289
1282
|
preHandler,
|
|
@@ -1295,8 +1288,7 @@ function defineGuard(config) {
|
|
|
1295
1288
|
}
|
|
1296
1289
|
};
|
|
1297
1290
|
}
|
|
1298
|
-
|
|
1299
|
-
//#region src/utils/handleRaw.ts
|
|
1291
|
+
// src/utils/handleRaw.ts
|
|
1300
1292
|
/**
|
|
1301
1293
|
* Wrap a raw Fastify handler with Arc's response shape and error handling.
|
|
1302
1294
|
*
|
|
@@ -1330,8 +1322,7 @@ function handleRaw(handler, statusCode = 200) {
|
|
|
1330
1322
|
}
|
|
1331
1323
|
};
|
|
1332
1324
|
}
|
|
1333
|
-
|
|
1334
|
-
//#region src/utils/stateMachine.ts
|
|
1325
|
+
// src/utils/stateMachine.ts
|
|
1335
1326
|
/**
|
|
1336
1327
|
* Create a state machine for validating transitions
|
|
1337
1328
|
*
|
|
@@ -1431,5 +1422,4 @@ function createStateMachine(name, transitions = {}, options = {}) {
|
|
|
1431
1422
|
getAvailableActions
|
|
1432
1423
|
};
|
|
1433
1424
|
}
|
|
1434
|
-
//#endregion
|
|
1435
1425
|
export { paginationSchema as C, createQueryParser as D, ArcQueryParser as E, MONGO_DIALECT as O, offsetListResponse as S, responses as T, errorContractSchema$1 as _, defineCompensation as a, keysetListResponse as b, CircuitBreaker as c, CircuitState as d, createCircuitBreaker as f, deleteResponse as g, bareListResponse as h, defineErrorMapper as i, NEUTRAL_DIALECT as k, CircuitBreakerError as l, aggregateListResponse as m, handleRaw as n, withCompensation as o, createCircuitBreakerRegistry as p, defineGuard as r, RedisCircuitBreakerState as s, createStateMachine as t, CircuitBreakerRegistry as u, getDefaultCrudSchemas as v, queryParams as w, listResponse as x, getListQueryParams as y };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
|
|
3
|
+
import { x as pathTouchesBlocked } from "./plugin-DTWt_8C3.mjs";
|
|
4
|
+
// src/core/aggregation/normalize.ts
|
|
5
5
|
/**
|
|
6
6
|
* Framework cap on URL-driven aggregation limits when the host opts
|
|
7
7
|
* in to `defaultLimit` without explicit `maxLimit`. Set to the same
|
|
@@ -184,8 +184,7 @@ function buildExecutionHints(config) {
|
|
|
184
184
|
if (config.indexHint && config.indexHint.leadingKeys.length > 0) hints.indexHint = { leadingKeys: [...config.indexHint.leadingKeys] };
|
|
185
185
|
return Object.keys(hints).length > 0 ? hints : void 0;
|
|
186
186
|
}
|
|
187
|
-
|
|
188
|
-
//#region src/core/aggregation/validate.ts
|
|
187
|
+
// src/core/aggregation/validate.ts
|
|
189
188
|
var validate_exports = /* @__PURE__ */ __exportAll({
|
|
190
189
|
ArcAggregationConfigError: () => ArcAggregationConfigError,
|
|
191
190
|
adapterSupportsAggregate: () => adapterSupportsAggregate,
|
|
@@ -445,5 +444,4 @@ function assertFieldAllowed(context, ref, input) {
|
|
|
445
444
|
if (dot > 0 && lookupAliases.has(ref.slice(0, dot))) return;
|
|
446
445
|
if (pathTouchesBlocked(ref, blockedFields, { descendants: true })) throw new ArcAggregationConfigError(`Resource "${resourceName}" aggregation "${aggregationName}" references field "${ref}" in ${context}, but the field is blocked from aggregation (\`hidden: true\` or \`aggregable: false\` in schemaOptions.fieldRules). Aggregating hidden fields would leak cardinality information.`);
|
|
447
446
|
}
|
|
448
|
-
//#endregion
|
|
449
447
|
export { compileAggRequest as i, validateAggregations as n, validate_exports as r, adapterSupportsAggregate as t };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { d as createDomainError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-Kv1fZdLg.mjs";
|
|
3
|
+
import { d as createDomainError } from "./errors-BY8vzlP4.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
|
-
|
|
5
|
+
// src/plugins/versioning.ts
|
|
6
6
|
var versioning_exports = /* @__PURE__ */ __exportAll({
|
|
7
7
|
default: () => versioning_default,
|
|
8
8
|
versioningPlugin: () => versioningPlugin
|
|
@@ -39,5 +39,4 @@ var versioning_default = fp(versioningPlugin, {
|
|
|
39
39
|
name: "arc-versioning",
|
|
40
40
|
fastify: "5.x"
|
|
41
41
|
});
|
|
42
|
-
//#endregion
|
|
43
42
|
export { versioning_exports as n, versioning_default as t };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { n as DomainEvent } from "./EventTransport-
|
|
2
|
+
import { n as DomainEvent } from "./EventTransport-CYEoCJGe.mjs";
|
|
3
3
|
import { FastifyPluginAsync, FastifyRequest } from "fastify";
|
|
4
|
-
//#region src/plugins/gracefulShutdown.d.ts
|
|
5
4
|
interface GracefulShutdownOptions {
|
|
6
5
|
/** Maximum time to wait for graceful shutdown in ms (default: 30000) */
|
|
7
6
|
timeout?: number;
|
|
@@ -55,8 +54,6 @@ declare module "fastify" {
|
|
|
55
54
|
}
|
|
56
55
|
}
|
|
57
56
|
declare const _default$5: FastifyPluginAsync<GracefulShutdownOptions>;
|
|
58
|
-
//#endregion
|
|
59
|
-
//#region src/plugins/caching.d.ts
|
|
60
57
|
interface CachingRule {
|
|
61
58
|
/** Path prefix to match (e.g., '/api/products') */
|
|
62
59
|
match: string;
|
|
@@ -82,8 +79,6 @@ interface CachingOptions {
|
|
|
82
79
|
rules?: CachingRule[];
|
|
83
80
|
}
|
|
84
81
|
declare const _default$4: FastifyPluginAsync<CachingOptions>;
|
|
85
|
-
//#endregion
|
|
86
|
-
//#region src/plugins/sse.d.ts
|
|
87
82
|
interface SSEOptions {
|
|
88
83
|
/** SSE endpoint path (default: '/events/stream') */
|
|
89
84
|
path?: string;
|
|
@@ -143,8 +138,6 @@ declare module "fastify" {
|
|
|
143
138
|
}
|
|
144
139
|
}
|
|
145
140
|
declare const _default$3: FastifyPluginAsync<SSEOptions>;
|
|
146
|
-
//#endregion
|
|
147
|
-
//#region src/plugins/realtime.d.ts
|
|
148
141
|
declare const CHANGE_OPERATIONS: readonly ["created", "updated", "deleted"];
|
|
149
142
|
type ChangeOperation = (typeof CHANGE_OPERATIONS)[number];
|
|
150
143
|
interface RealtimeOptions {
|
|
@@ -183,15 +176,11 @@ interface RealtimeOptions {
|
|
|
183
176
|
maxConnectionMs?: number;
|
|
184
177
|
}
|
|
185
178
|
declare const _default$2: FastifyPluginAsync<RealtimeOptions>;
|
|
186
|
-
//#endregion
|
|
187
|
-
//#region src/utils/metricSeries.d.ts
|
|
188
179
|
interface MetricSample {
|
|
189
180
|
labels: Record<string, string>;
|
|
190
181
|
value: number;
|
|
191
182
|
suffix?: "_bucket" | "_sum" | "_count";
|
|
192
183
|
}
|
|
193
|
-
//#endregion
|
|
194
|
-
//#region src/plugins/metrics.d.ts
|
|
195
184
|
interface MetricsOptions {
|
|
196
185
|
/** Endpoint path (default: '/_metrics') */
|
|
197
186
|
path?: string;
|
|
@@ -232,8 +221,6 @@ declare module "fastify" {
|
|
|
232
221
|
}
|
|
233
222
|
}
|
|
234
223
|
declare const _default$1: FastifyPluginAsync<MetricsOptions>;
|
|
235
|
-
//#endregion
|
|
236
|
-
//#region src/plugins/versioning.d.ts
|
|
237
224
|
interface VersioningOptions {
|
|
238
225
|
/** Versioning strategy */
|
|
239
226
|
type: "header" | "prefix";
|
|
@@ -264,5 +251,4 @@ declare module "fastify" {
|
|
|
264
251
|
}
|
|
265
252
|
}
|
|
266
253
|
declare const _default: FastifyPluginAsync<VersioningOptions>;
|
|
267
|
-
//#endregion
|
|
268
254
|
export { ShutdownState as _, MetricsOptions as a, RealtimeOptions as c, SSEStats as d, _default$3 as f, GracefulShutdownOptions as g, _default$4 as h, MetricsCollector as i, _default$2 as l, CachingRule as m, _default as n, _default$1 as o, CachingOptions as p, MetricEntry as r, ChangeOperation as s, VersioningOptions as t, SSEOptions as u, _default$5 as v };
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
|
|
2
|
-
import { a as PushRefRegistry, l as EnvelopeWriter, s as PushRefStore } from "./pushref-registry-
|
|
2
|
+
import { a as PushRefRegistry, l as EnvelopeWriter, s as PushRefStore } from "./pushref-registry-d86QUaSq.mjs";
|
|
3
3
|
import { FastifyBaseLogger, FastifyPluginAsync } from "fastify";
|
|
4
|
-
//#region src/integrations/websocket/adapter.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* WebSocket cross-instance adapter contract.
|
|
7
6
|
*
|
|
@@ -43,11 +42,7 @@ declare class LocalWebSocketAdapter implements WebSocketAdapter {
|
|
|
43
42
|
subscribe(): Promise<void>;
|
|
44
43
|
close(): Promise<void>;
|
|
45
44
|
}
|
|
46
|
-
//#endregion
|
|
47
|
-
//#region src/integrations/websocket/safe-async.d.ts
|
|
48
45
|
type SafeAsyncLogger = Pick<FastifyBaseLogger, "warn">;
|
|
49
|
-
//#endregion
|
|
50
|
-
//#region src/integrations/websocket/send-queue.d.ts
|
|
51
46
|
interface SendQueueSocket {
|
|
52
47
|
send(data: string): void;
|
|
53
48
|
readyState: number;
|
|
@@ -120,8 +115,6 @@ declare class SendQueue {
|
|
|
120
115
|
/** Rebuild the coalesce index from `start` onward after a splice/shift. */
|
|
121
116
|
private reindexCoalesceFrom;
|
|
122
117
|
}
|
|
123
|
-
//#endregion
|
|
124
|
-
//#region src/integrations/websocket/types.d.ts
|
|
125
118
|
/**
|
|
126
119
|
* A connected WebSocket client — one entry per TCP socket.
|
|
127
120
|
*
|
|
@@ -315,8 +308,6 @@ interface WebSocketPluginOptions {
|
|
|
315
308
|
*/
|
|
316
309
|
pushRefStore?: PushRefStore;
|
|
317
310
|
}
|
|
318
|
-
//#endregion
|
|
319
|
-
//#region src/integrations/websocket/room-manager.d.ts
|
|
320
311
|
declare class RoomManager {
|
|
321
312
|
private rooms;
|
|
322
313
|
private clients;
|
|
@@ -402,8 +393,6 @@ declare class RoomManager {
|
|
|
402
393
|
subscriptions: Record<string, number>;
|
|
403
394
|
};
|
|
404
395
|
}
|
|
405
|
-
//#endregion
|
|
406
|
-
//#region src/integrations/websocket/geo-room.d.ts
|
|
407
396
|
interface GeoRoomOptions {
|
|
408
397
|
/** H3 resolution. 9 ≈ 100 m edge (ride-hailing default); 10 ≈ 40 m. */
|
|
409
398
|
resolution?: number;
|
|
@@ -464,9 +453,6 @@ declare class GeoRoom {
|
|
|
464
453
|
cellFor(point: GeoPoint): Promise<string>;
|
|
465
454
|
private h3lib;
|
|
466
455
|
}
|
|
467
|
-
//#endregion
|
|
468
|
-
//#region src/integrations/websocket/plugin.d.ts
|
|
469
456
|
/** Pluggable WebSocket integration for Arc */
|
|
470
457
|
declare const websocketPlugin: FastifyPluginAsync<WebSocketPluginOptions>;
|
|
471
|
-
//#endregion
|
|
472
458
|
export { GeoRoomOptions as a, WebSocketClient as c, LocalWebSocketAdapter as d, WebSocketAdapter as f, GeoRoom as i, WebSocketMessage as l, GeoPoint as n, RoomManager as o, GeoPublishOpts as r, AuthResult as s, websocketPlugin as t, WebSocketPluginOptions as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as requestContext } from "./requestContext-
|
|
3
|
-
|
|
1
|
+
/*! @classytic/arc v2.46.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext } from "./requestContext-GYO_0gEw.mjs";
|
|
3
|
+
// src/context/workScope.ts
|
|
4
4
|
/** Enter a scope for `fn`, or run it inside the active one. */
|
|
5
5
|
function runWorkScope(seed, fn) {
|
|
6
6
|
if (requestContext.get()) return fn();
|
|
@@ -37,5 +37,4 @@ function workSeedFromEvent(event) {
|
|
|
37
37
|
...event.meta.organizationId !== void 0 ? { organizationId: event.meta.organizationId } : {}
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
//#endregion
|
|
41
40
|
export { scopedValue as n, workSeedFromEvent as r, runWorkScope as t };
|
package/llms.txt
CHANGED
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
# @classytic/arc
|
|
2
2
|
|
|
3
|
-
> Resource-oriented backend framework for Fastify. One
|
|
4
|
-
> REST + validation + auth + permissions + events + caching + OpenAPI + MCP tools.
|
|
5
|
-
> DB-agnostic via @classytic/repo-core adapter kits (mongokit, sqlitekit, prismakit).
|
|
3
|
+
> Resource-oriented backend framework for Fastify. One defineResource() = REST + validation + auth + permissions + events + cache + OpenAPI + MCP. DB-agnostic through @classytic/repo-core adapter kits (mongokit, sqlitekit, prismakit).
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
route, validation, pagination, auth check, cron, queue worker, counter, or audit
|
|
9
|
-
code, check whether arc provides it — it almost certainly does:
|
|
5
|
+
Hand-rolling is a bug in arc apps. Check this table before writing any route, validation, auth check, job, counter or audit code.
|
|
10
6
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
7
|
+
| Need | Use |
|
|
8
|
+
|---|---|
|
|
9
|
+
| CRUD + OpenAPI + MCP | defineResource({ name, adapter, permissions }) |
|
|
10
|
+
| Role / ownership / row policy | @classytic/arc/permissions: requireRoles, requireOwnership, allowPublic({ policy }), anyOf |
|
|
11
|
+
| Tenant / user id in a handler | @classytic/arc/scope: requireOrgId, getUserId |
|
|
12
|
+
| Body schema on a route | routeInput({ body }) from @classytic/arc/core (zod v4, parsed once) |
|
|
13
|
+
| Body schema on CRUD writes | crudInput({ create, update }) |
|
|
14
|
+
| Action body schema | actions.x.schema = the schema itself (never { body }); defineAction({ schema, parse: true }) |
|
|
15
|
+
| Empty action body | noPayloadSchema |
|
|
16
|
+
| Filter / sort / page | resource queryParser (allow-listed), keyset cursors |
|
|
17
|
+
| Soft delete, slug, tree, bulk, files, search | presets: [...] |
|
|
18
|
+
| Recurring job | schedulesPlugin / module scheduledJobs (lock or singleReplica) |
|
|
19
|
+
| Once per local day at hh:mm in a zone | scheduledJobs daily: { hour, minute, zone, ledger } |
|
|
20
|
+
| Durable queue | @classytic/arc/integrations/jobs (BullMQ) |
|
|
21
|
+
| Headless worker | createWorker(sameOptions) from @classytic/arc/factory |
|
|
22
|
+
| Usage counters, quotas, plan limits | @classytic/arc/usage: usagePlugin, requireQuota; rateLimit.plan |
|
|
23
|
+
| Audit, record history | audit: true, history: true |
|
|
24
|
+
| Idempotency | @classytic/arc/idempotency |
|
|
25
|
+
| Events, outbox, webhooks | @classytic/arc/events, createOutboxModule, integrations/webhooks |
|
|
26
|
+
| AI / MCP tools | generated per resource; mcpPlugin from @classytic/arc/mcp |
|
|
27
|
+
| Unknown route 404 | built in: ErrorContract arc.not_found (errorHandler.notFound to replace) |
|
|
28
|
+
| Tests | createTestApp, expectArc from @classytic/arc/testing |
|
|
29
|
+
| App boot | createApp({ beforeBoot: connectDb, resources, auth }) from @classytic/arc/factory |
|
|
26
30
|
|
|
27
|
-
##
|
|
31
|
+
## Read next
|
|
28
32
|
|
|
29
|
-
- skills/arc/SKILL.md
|
|
30
|
-
- skills/arc/references
|
|
31
|
-
- skills/arc-code-review/
|
|
32
|
-
- skills/arc-
|
|
33
|
+
- skills/arc/SKILL.md: golden paths, gotchas, reference index
|
|
34
|
+
- skills/arc/references/: one topic per file (validation, schedules, resources, permissions, auth, events, mcp, production, testing)
|
|
35
|
+
- skills/arc-code-review/SKILL.md: audit a codebase for hand-rolled code
|
|
36
|
+
- skills/arc-module-publishing/SKILL.md: ship a reusable arc module
|
|
33
37
|
|
|
34
38
|
## Conventions that bite
|
|
35
39
|
|
|
36
|
-
- request.user is undefined on public routes
|
|
37
|
-
- Custom endpoints go in
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
+
- request.user is undefined on public routes: guard it.
|
|
41
|
+
- Custom endpoints go in routes: / actions: (they inherit auth, OpenAPI, MCP); a bare fastify.get() bypasses all of it.
|
|
42
|
+
- { body: X } as an action schema validates nothing; strictSchemas: true makes it fatal.
|
|
43
|
+
- Zod v4 in every schema slot; .default() stays optional on the wire.
|
|
44
|
+
- Errors are the repo-core ErrorContract: { code, message, status }.
|
|
45
|
+
- schemaGenerator: false on a kit adapter removes OpenAPI and MCP bodies.
|
|
46
|
+
- Own hook that refuses: return reply.send(...) or throw (see writes-hooks-errors.md).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/arc",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.46.0",
|
|
4
4
|
"description": "Resource-oriented backend framework for Fastify - clean, minimal, powerful, tree-shakable",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -311,7 +311,8 @@
|
|
|
311
311
|
"typecheck": "npm run typecheck:src && npm run typecheck:types && npm run typecheck:types-strict && npm run check:type-lane",
|
|
312
312
|
"typecheck:src": "tsc --noEmit",
|
|
313
313
|
"check:type-lane": "node scripts/check-type-lane.mjs",
|
|
314
|
-
"lint": "biome check src/",
|
|
314
|
+
"lint": "biome check src/ && npm run check:skills",
|
|
315
|
+
"check:skills": "node scripts/check-skills.mjs",
|
|
315
316
|
"lint:fix": "biome check --fix src/",
|
|
316
317
|
"lint:all": "biome check src/ tests/",
|
|
317
318
|
"test": "vitest run",
|
|
@@ -357,9 +358,9 @@
|
|
|
357
358
|
"node": ">=22"
|
|
358
359
|
},
|
|
359
360
|
"peerDependencies": {
|
|
360
|
-
"@classytic/primitives": ">=0.
|
|
361
|
-
"@classytic/repo-core": ">=0.
|
|
362
|
-
"@classytic/streamline": ">=2.
|
|
361
|
+
"@classytic/primitives": ">=0.34.0",
|
|
362
|
+
"@classytic/repo-core": ">=0.32.0",
|
|
363
|
+
"@classytic/streamline": ">=2.11.0",
|
|
363
364
|
"@fastify/cors": ">=11.0.0",
|
|
364
365
|
"@fastify/helmet": ">=13.0.0",
|
|
365
366
|
"@fastify/jwt": ">=10.0.0",
|
|
@@ -381,7 +382,7 @@
|
|
|
381
382
|
"@opentelemetry/sdk-node": ">=0.50.0",
|
|
382
383
|
"better-auth": ">=1.7.0",
|
|
383
384
|
"bullmq": ">=6.0.0",
|
|
384
|
-
"fastify": ">=5.12.
|
|
385
|
+
"fastify": ">=5.12.7",
|
|
385
386
|
"fastify-raw-body": ">=5.0.0",
|
|
386
387
|
"h3-js": ">=4.0.0",
|
|
387
388
|
"ioredis": ">=6.0.0",
|
|
@@ -495,7 +496,7 @@
|
|
|
495
496
|
"@classytic/mongokit": "^3.43.0",
|
|
496
497
|
"@classytic/pgkit": "^0.1.0",
|
|
497
498
|
"@classytic/primitives": "^0.34.0",
|
|
498
|
-
"@classytic/repo-core": "^0.
|
|
499
|
+
"@classytic/repo-core": "^0.32.0",
|
|
499
500
|
"@classytic/sqlitekit": "^0.10.0",
|
|
500
501
|
"@classytic/streamline": "^2.11.0",
|
|
501
502
|
"@electric-sql/pglite": "^0.5.10",
|
|
@@ -536,7 +537,7 @@
|
|
|
536
537
|
"publint": "^0.3.25",
|
|
537
538
|
"tsdown": "^0.23.1",
|
|
538
539
|
"typebox": "^1.4.2",
|
|
539
|
-
"typescript": "^7.0
|
|
540
|
+
"typescript": "^7.1.0-beta",
|
|
540
541
|
"vitest": "^5.0.5",
|
|
541
542
|
"ws": "^8.22.0",
|
|
542
543
|
"zod": "^4.6.7"
|