@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,327 +0,0 @@
|
|
|
1
|
-
# Authoring: presets, plugins, and modules
|
|
2
|
-
|
|
3
|
-
The three shapes a package exports, smallest surface first. All import arc through public
|
|
4
|
-
subpaths only (`@classytic/arc/{permissions,scope,types,utils,factory,testing}`).
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Shape 1 — Action preset (add verbs to one resource)
|
|
9
|
-
|
|
10
|
-
The smallest reusable unit: a function returning an `actions:` slice the host spreads into a
|
|
11
|
-
resource. No lifecycle, no engine. Storage-agnostic via a **structural repository port** — an
|
|
12
|
-
interface listing only the methods you call, satisfied by any kit repository without importing
|
|
13
|
-
the kit.
|
|
14
|
-
|
|
15
|
-
```ts
|
|
16
|
-
import type { PermissionCheck } from "@classytic/arc/permissions";
|
|
17
|
-
import { getOrgId, getUserId } from "@classytic/arc/scope";
|
|
18
|
-
import type { ActionDefinition, RequestWithExtras } from "@classytic/arc/types";
|
|
19
|
-
import { createDomainError, NotFoundError } from "@classytic/arc/utils";
|
|
20
|
-
|
|
21
|
-
// Structural port — NOT a kit import. Any kit repo with these methods satisfies it.
|
|
22
|
-
export interface SubjectRepository<TDoc> {
|
|
23
|
-
getById(id: string, o: { organizationId?: string; throwOnNotFound: false; lean: true }): Promise<TDoc | null>;
|
|
24
|
-
update(id: string, patch: Record<string, unknown>, o: { organizationId?: string; lean: true }): Promise<TDoc | null>;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export interface WithXConfig<TDoc> {
|
|
28
|
-
readonly repository: SubjectRepository<TDoc>;
|
|
29
|
-
readonly permissions: { readonly act: PermissionCheck };
|
|
30
|
-
// ...host policy injected here: resolvers, side-effect hooks, tenancy mode
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export function withX<TDoc>(config: WithXConfig<TDoc>): Record<"do_x", ActionDefinition> {
|
|
34
|
-
return {
|
|
35
|
-
do_x: {
|
|
36
|
-
handler: async (id, data, req) => handler(config, id, data, req),
|
|
37
|
-
permissions: config.permissions.act,
|
|
38
|
-
description: "…",
|
|
39
|
-
schema: { type: "object", /* JSON Schema */ additionalProperties: false },
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
Host composes it:
|
|
46
|
-
|
|
47
|
-
```ts
|
|
48
|
-
defineResource({
|
|
49
|
-
actions: {
|
|
50
|
-
...withX({ repository, permissions, /* host policy */ }),
|
|
51
|
-
post: { /* subject-specific verbs stay here */ },
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**Rules that make a preset reusable:**
|
|
57
|
-
- Inject **all policy** through config (permissions, resolvers, side-effect hooks). The preset
|
|
58
|
-
contributes *mechanism*; the host owns *policy*.
|
|
59
|
-
- Take a **structural port**, never a concrete kit type. `SubjectRepository<TDoc>` with the two
|
|
60
|
-
methods you use — not `MongooseRepository`.
|
|
61
|
-
- Read tenant/user via `getOrgId(req.scope)` / `getUserId(req.scope)`, never off `req.user`
|
|
62
|
-
directly. Honor a `tenancy: "required" | "off"` config so single-tenant hosts work too.
|
|
63
|
-
- Ship schemas as **JSON Schema**. Map any domain errors to arc's `createDomainError(code, msg,
|
|
64
|
-
status)` so the wire contract stays consistent.
|
|
65
|
-
- Model a **mode/source as a discriminated field, not a boolean flag**. `source: 'literal' |
|
|
66
|
-
'policy' | 'auto'` beats `useMatrix: boolean`: it's extensible (a third mode is a new enum
|
|
67
|
-
member, not a second conflicting flag), self-documenting, and makes contradictory inputs
|
|
68
|
-
(a literal payload sent with `source: 'policy'`) rejectable instead of silently dropped. If a
|
|
69
|
-
published boolean already exists, keep it as a `@deprecated` alias that bridges to the field
|
|
70
|
-
for one minor, then remove — don't strand consumers on a hard rename.
|
|
71
|
-
|
|
72
|
-
---
|
|
73
|
-
|
|
74
|
-
## Shape 2 — Plugin (cross-cutting decorator/hook)
|
|
75
|
-
|
|
76
|
-
An `fp()`-wrapped Fastify plugin — the one documented exception to arc's no-default-exports
|
|
77
|
-
rule. Ship **both** a default (for `app.register(import(...))`) and a named export.
|
|
78
|
-
|
|
79
|
-
```ts
|
|
80
|
-
import fp from "fastify-plugin";
|
|
81
|
-
import type { FastifyInstance } from "fastify";
|
|
82
|
-
|
|
83
|
-
async function xPlugin(app: FastifyInstance /*, opts */): Promise<void> {
|
|
84
|
-
app.decorate("x", createX(/* ... */));
|
|
85
|
-
// Set response headers at onRequest or preSerialization — NEVER onSend (races Fastify's flush).
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
export const x = fp(xPlugin, { name: "arc-x", fastify: "5.x" });
|
|
89
|
-
export default x; // fp() plugin entries MAY default-export (arc convention exception)
|
|
90
|
-
```
|
|
91
|
-
|
|
92
|
-
Host registers it in the `plugins:` slot or via `app.register`. If the plugin belongs to a
|
|
93
|
-
domain module, register it in the module's `plugins` lifecycle slot instead (below).
|
|
94
|
-
|
|
95
|
-
---
|
|
96
|
-
|
|
97
|
-
## Shape 3 — Module (a whole domain as one value)
|
|
98
|
-
|
|
99
|
-
Use `defineModule` when there's engine state to boot **and** multiple resources to register as
|
|
100
|
-
a unit. The host lists it in `createApp({ modules: [...] })`; arc expands it into the same
|
|
101
|
-
lifecycle phases a hand-wired app uses.
|
|
102
|
-
|
|
103
|
-
```ts
|
|
104
|
-
import { defineModule, getModuleExports } from "@classytic/arc/factory";
|
|
105
|
-
import type { FastifyInstance } from "fastify";
|
|
106
|
-
|
|
107
|
-
export interface AccountingEngine { post(entry: Entry): Promise<void>; }
|
|
108
|
-
export interface AccountingDeps { permissions: PermissionMatrix; }
|
|
109
|
-
|
|
110
|
-
// Factory takes host deps, returns an ArcModule. TExports inferred from bootstrap's return.
|
|
111
|
-
export const accountingModule = (deps: AccountingDeps) =>
|
|
112
|
-
defineModule({
|
|
113
|
-
name: "accounting", // namespaced, unique across the host — the graph key
|
|
114
|
-
dependsOn: ["ledger"], // composition order (see below), NOT lazy loading
|
|
115
|
-
|
|
116
|
-
plugins: (f) => { // register infra — runs after app plugins(), before bootstraps
|
|
117
|
-
f.register(/* db conn, sse, etc. */);
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
bootstrap: async (f) => { // init engine — its return becomes the PUBLIC EXPORT
|
|
121
|
-
const ledger = getModuleExports<LedgerEngine>(f, "ledger"); // guaranteed live (dependsOn)
|
|
122
|
-
return createAccountingEngine(deps, ledger); // → fastify.arc.modules.accounting
|
|
123
|
-
},
|
|
124
|
-
|
|
125
|
-
resources: (f) => { // factory form runs AFTER all bootstraps — engines are live
|
|
126
|
-
const engine = getModuleExports<AccountingEngine>(f, "accounting");
|
|
127
|
-
return [accountsResource(engine, deps.permissions), entriesResource(engine)];
|
|
128
|
-
},
|
|
129
|
-
|
|
130
|
-
afterResources: (f) => { /* cross-resource event subscriptions the module owns */ },
|
|
131
|
-
onClose: (f) => { /* stop timers, flush outbox, destroy engine */ },
|
|
132
|
-
|
|
133
|
-
errorMappers: [{ // 2.21 — domain error → wire envelope, merged into the
|
|
134
|
-
type: AccountingError, // host's error handler at boot (host mappers keep priority)
|
|
135
|
-
toResponse: (err) => ({ status: err.status, code: err.code, message: err.message }),
|
|
136
|
-
}],
|
|
137
|
-
});
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
### Lifecycle phases (module runs before app-level in each)
|
|
141
|
-
|
|
142
|
-
```
|
|
143
|
-
plugins = app plugins() → modules' plugins (infra registration)
|
|
144
|
-
bootstrap[] = modules' bootstrap → options.bootstrap (engine init + export)
|
|
145
|
-
resources[] = modules' resources → options.resources (module routes register first)
|
|
146
|
-
afterResources = modules' afterResources → options.afterResources
|
|
147
|
-
onClose = modules' onClose (REVERSE order) → options.onClose (last composed, first closed)
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
A module's engine is live before app-level bootstrap; app `afterResources` can wire across
|
|
151
|
-
modules; teardown mirrors init in reverse.
|
|
152
|
-
|
|
153
|
-
### `dependsOn` is composition order, not lazy loading
|
|
154
|
-
|
|
155
|
-
`dependsOn: ["ledger"]` guarantees ledger's `plugins`/`bootstrap` (and thus its public export)
|
|
156
|
-
run **before** this module's — so `getModuleExports(f, "ledger")` is live. It does **not** delay
|
|
157
|
-
*importing* the module. Every module input (including dynamic-import thunks) is resolved up
|
|
158
|
-
front via `Promise.all`, then `dependsOn` orders the *composition*. It's a **stable topological
|
|
159
|
-
sort**: modules with no edge between them keep list order, so adding `dependsOn` never silently
|
|
160
|
-
reorders an unrelated module. Fail-fast at boot on unknown dep, self-reference, and cycles.
|
|
161
|
-
|
|
162
|
-
### Cross-module wiring — `getModuleExports`, not a container
|
|
163
|
-
|
|
164
|
-
A module's `bootstrap` return value is its **public export**, recorded at
|
|
165
|
-
`fastify.arc.modules[name]`. Later modules read it with the typed accessor — no DI container,
|
|
166
|
-
no proxy. For inferred types without an inline generic, augment the registry once:
|
|
167
|
-
|
|
168
|
-
```ts
|
|
169
|
-
declare module "@classytic/arc/factory" {
|
|
170
|
-
interface ArcModuleRegistry {
|
|
171
|
-
accounting: AccountingEngine;
|
|
172
|
-
ledger: LedgerEngine;
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
// then: getModuleExports(f, "accounting") infers AccountingEngine
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
`getModuleExports` **throws** (fail-fast) if the name isn't composed, is composed after the
|
|
179
|
-
caller, or returned nothing — all wiring bugs that must surface at boot, not as `undefined`
|
|
180
|
-
downstream.
|
|
181
|
-
|
|
182
|
-
### Lazy / region packs — thunk of a dynamic import
|
|
183
|
-
|
|
184
|
-
To gate *whether* a module is imported at all (region/tier packs), pass a thunk that returns a
|
|
185
|
-
dynamic import. Only the selected pack enters the bundle path:
|
|
186
|
-
|
|
187
|
-
```ts
|
|
188
|
-
const taxPack =
|
|
189
|
-
region === "BD"
|
|
190
|
-
? () => import("@classytic/bd-tax").then((m) => m.createBdTaxModule(deps))
|
|
191
|
-
: () => import("@classytic/us-tax").then((m) => m.createUsTaxModule(deps));
|
|
192
|
-
|
|
193
|
-
await createApp({ modules: [coreModule(deps), taxPack] });
|
|
194
|
-
// only the selected tax package is imported + composed
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
Thunk = *whether to import*; `dependsOn` = *order of already-selected modules*. Different tools.
|
|
198
|
-
|
|
199
|
-
### One module per package
|
|
200
|
-
|
|
201
|
-
A package exports **one** `createXModule` factory. To compose several domains, publish several
|
|
202
|
-
packages (or several subpath exports) and let the host list them — don't return an array of
|
|
203
|
-
modules from one factory. The host owns the flat `modules:` list and its ordering; keep that
|
|
204
|
-
control theirs.
|
|
205
|
-
|
|
206
|
-
### Resource assembly — kernel-typed ports + `mergeResourceConfig` (2.21 standard)
|
|
207
|
-
|
|
208
|
-
Two rules kill the `as never` tax that plagued pre-2.21 module packages:
|
|
209
|
-
|
|
210
|
-
**1. Type the engine port with the KERNEL's own bags.** The kernel is already your peer, so
|
|
211
|
-
indexing its exported engine type adds zero coupling — and its truths (optional sub-module
|
|
212
|
-
members, literal unions) flow into your resource builders:
|
|
213
|
-
|
|
214
|
-
```ts
|
|
215
|
-
import type { CatalogEngine } from "@classytic/catalog";
|
|
216
|
-
|
|
217
|
-
export interface CatalogEngineLike { // structural — any conforming engine composes
|
|
218
|
-
models: CatalogEngine["models"];
|
|
219
|
-
repositories: CatalogEngine["repositories"];
|
|
220
|
-
}
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
Never re-declare the bags as `Record<string, unknown>` — that's what forced every
|
|
224
|
-
`createMongooseAdapter(engine.models.X as never, ...)` cast.
|
|
225
|
-
|
|
226
|
-
**2. Merge base config + host seams with `mergeResourceConfig`, not hand-rolled spreads.**
|
|
227
|
-
Expose your per-resource override surface as projections of arc's `ResourceSeams` and let
|
|
228
|
-
arc's slot-aware merge do assembly — arrays CONCAT (host routes append, never clobber),
|
|
229
|
-
plain objects deep-merge, class instances (queryParser, adapter) last-win, `undefined`
|
|
230
|
-
never overwrites, `as const` readonly host tables are accepted:
|
|
231
|
-
|
|
232
|
-
```ts
|
|
233
|
-
import { defineResource, mergeResourceConfig, type ResourceSeams } from "@classytic/arc";
|
|
234
|
-
import { permissionMatrix } from "@classytic/arc/permissions";
|
|
235
|
-
|
|
236
|
-
export interface ProductSeams { // your public seam names, arc's slot types
|
|
237
|
-
extraRoutes?: ResourceSeams["routes"];
|
|
238
|
-
extraActions?: ResourceSeams["actions"];
|
|
239
|
-
cache?: ResourceSeams["cache"];
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
defineResource(mergeResourceConfig(
|
|
243
|
-
{
|
|
244
|
-
name: "product",
|
|
245
|
-
adapter: createMongooseAdapter({ model: models.Product, repository: repositories.product }),
|
|
246
|
-
permissions: permissionMatrix({ read: deps.permissions.view, write: deps.permissions.manage }),
|
|
247
|
-
},
|
|
248
|
-
{ routes: cfg.extraRoutes, actions: cfg.extraActions, cache: cfg.cache },
|
|
249
|
-
));
|
|
250
|
-
```
|
|
251
|
-
|
|
252
|
-
The only casts left in a well-formed package are documented boundaries: wire-body narrowing
|
|
253
|
-
in action handlers (`data as { role: PartyRole }` — narrow to the KERNEL's union, not
|
|
254
|
-
`string`) and hydrated-vs-lean id widening at a kernel bridge. Anything else is a smell.
|
|
255
|
-
|
|
256
|
-
---
|
|
257
|
-
|
|
258
|
-
## Testing a package
|
|
259
|
-
|
|
260
|
-
Boot a **real arc app** around your export and exercise it over HTTP — that's the only test
|
|
261
|
-
that proves it *composes*. There are two harness layers, and the difference matters:
|
|
262
|
-
|
|
263
|
-
| Harness | Persistence | Fidelity | Home |
|
|
264
|
-
|---|---|---|---|
|
|
265
|
-
| `@classytic/arc/testing` | none — you inject a repo (fake / `Map`-backed) | boot + wiring only | inside arc |
|
|
266
|
-
| a **kit-backed testkit** (e.g. `@classytic/arc-testkit`) | real in-memory store (Mongo memory-server) | **prod-fidelity** | arc-ecosystem |
|
|
267
|
-
|
|
268
|
-
**Why two layers, and why the testkit is kit-specific:** arc's non-negotiable rule is *no DB
|
|
269
|
-
driver imports anywhere in arc*. So `@classytic/arc/testing` can boot the app but cannot give
|
|
270
|
-
you real persistence — it hands you an injected/fake repository. A harness that persists for
|
|
271
|
-
real **must** pick a concrete kit (mongokit + `mongodb-memory-server`, or sqlite in-memory).
|
|
272
|
-
That's not a limitation to design around — it's the point: **a testkit's value is fidelity, so
|
|
273
|
-
it should exercise the module the way it runs in production**, with the same adapter.
|
|
274
|
-
|
|
275
|
-
**Don't "make the testkit DB-agnostic" by defaulting to a fake in-memory repo.** A `Map`-backed
|
|
276
|
-
repo does not reproduce ObjectId-vs-string `_id`, `select`/projection semantics, query-operator
|
|
277
|
-
translation, pagination cursor encoding, unique-index enforcement, or Mongoose strict-mode
|
|
278
|
-
field dropping. A module that ships a real adapter will pass on the fake and break in prod — the
|
|
279
|
-
test gets greener and less truthful. Agnostic *interface*, real *backend*:
|
|
280
|
-
|
|
281
|
-
- **Agnostic seam:** the harness takes a **`TestBackend`** — `setup() → { ctx: { connection,
|
|
282
|
-
uri }, teardown }` — so the store is pluggable, not hard-wired.
|
|
283
|
-
- **Real default, backend lives in the kit:** `@classytic/arc-testkit` is the thin generic core
|
|
284
|
-
(`bootModuleApp(modules, { backend })`); its default backend is `mongoMemoryBackend()` from
|
|
285
|
-
**`@classytic/mongokit/testkit`**, loaded via dynamic `import()` so mongokit +
|
|
286
|
-
`mongodb-memory-server` stay *optional* peers. This is the concrete "adapters/backends live in
|
|
287
|
-
their kits" split — mongokit owns the Mongo lifecycle, arc-testkit owns the arc boot. Add a
|
|
288
|
-
sibling (`@classytic/sqlitekit/testkit` → `sqliteMemoryBackend()`) only when a non-Mongo module
|
|
289
|
-
exists — YAGNI until the second consumer is real.
|
|
290
|
-
|
|
291
|
-
```ts
|
|
292
|
-
import { bootModuleApp } from "@classytic/arc-testkit";
|
|
293
|
-
import { mongoMemoryBackend } from "@classytic/mongokit/testkit"; // only to override the default
|
|
294
|
-
|
|
295
|
-
const t = await bootModuleApp(({ connection }) => [createOrderModule({ connection, permissions })]);
|
|
296
|
-
// or point at a real cluster: { backend: mongoMemoryBackend({ uri: process.env.ATLAS_TEST_URI }) }
|
|
297
|
-
const res = await t.app.inject({ method: "GET", url: "/orders" });
|
|
298
|
-
await t.close();
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
**Install contract (the part that bites on adoption):** because the harness declares its DB deps
|
|
302
|
-
as *optional peers*, the consumer installs all three together —
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
npm i -D @classytic/arc-testkit @classytic/mongokit mongodb-memory-server
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
Miss `mongodb-memory-server` and the default backend throws at boot; pin `@classytic/mongokit`
|
|
309
|
-
below the version that first shipped `/testkit` and the subpath won't resolve (a floating `^`
|
|
310
|
-
range won't upgrade past a lockfile pin on its own — bump the devDep floor). This is the tradeoff
|
|
311
|
-
of *not* bundling: the harness stays out of production, but the consumer owns the dev install.
|
|
312
|
-
|
|
313
|
-
Whichever layer you use, cover these edges:
|
|
314
|
-
|
|
315
|
-
- Boot a minimal app, register your preset/module, hit the routes with `app.inject`.
|
|
316
|
-
- Test **both tenancy modes** (`required` and `off`) if you support them.
|
|
317
|
-
- Avoid field names arc's query parser reserves (`page`, `limit`, `cursor`, `after`, `sort`,
|
|
318
|
-
`search`, `select`, `populate`) — a filter field colliding with one is silently unfilterable.
|
|
319
|
-
Arc emits a `filter-field-reserved-name` boot diagnostic; heed it. **This class of bug only
|
|
320
|
-
surfaces on a real backend** — another reason the fidelity harness earns its keep.
|
|
321
|
-
- Pin devDeps at or above every peer floor so the suite exercises the version you promise.
|
|
322
|
-
|
|
323
|
-
**Shared harness pattern:** the harness is published once — `@classytic/arc-testkit` (generic
|
|
324
|
-
core, in the ecosystem repo, *not* a per-domain monorepo) + `@classytic/mongokit/testkit` (the
|
|
325
|
-
Mongo backend, in the kit) — so every module author and third party reuses it. Depend on it via
|
|
326
|
-
`devDependencies` (a version range from the registry; `workspace:*` only inside its own monorepo).
|
|
327
|
-
"If your module boots green in the testkit, it composes" is the contract.
|