@aurelienbbn/agentlint-plugin-effect

中文文档
0.1.5发布于 2026/10/14MITTypeScriptES Module零依赖构建来源已验证近 30 天下载 2280

效果项目的自定义代理林特规则 .

中文使用文档
文档目录4 节
  1. 快开始
  2. 规则
  3. 登记的合同库存
  4. 贷项

@ aurelienbn/ agentlint- 插件效果

npm downloads CI license node

3 Agentlint Results for Effect:Schema自有合同,有界回盘,层层已建成一次.

[尖叫声] 需要引擎 @aurelienbbn/agentlint >=0.3.0 <0.9.0 作为同伴. 证据。 。 。 .

快开始

agentlint init --preset "@aurelienbbn/agentlint-plugin-effect#starterPreset"
agentlint rules test
agentlint rules scan --review
agentlint next --format json

init 保存已有的配置并打印安装命令;从未安装. 要求前校正绑定 agentlint check --all。 。 。 .

import { defineConfig } from "@aurelienbbn/agentlint";
import { layerIdentity, resiliencePolicy, strictPreset } from "@aurelienbbn/agentlint-plugin-effect";

export default defineConfig({ extends: [strictPreset], rules: [layerIdentity, resiliencePolicy] });

规则

规则严格启动权力标准折返探测器
prefer-schema-contracts✅✅代理人2个2个
resilience-policy🧪代理人1个1个
layer-identity🧪代理人1个1个

在预设中 \ \ 选入, 明确注册 。 预设忽略 **/*.d.ts。 。 。 .

export interface User {
  id: string;
} // ❌ prefer-schema-contracts
export type User = (typeof User)["Type"]; // ✅ Schema-derived

Effect.tryPromise({ try: () => fetch(url), catch: toError }); // ❌ resilience-policy
Effect.tryPromise({ try: () => fetch(url), catch: toError }).pipe(Effect.timeout("2 seconds")); // ✅

const makeDbLayer = (config: DbConfig) => Layer.effect(Db, connect(config)); // ❌ layer-identity: new pool per call
const makeConfigLayer = (config: DbConfig) => Layer.succeed(Config, config); // ✅
prefer-schema-contracts:起火,无声拼写,来源

在导出接口和导出对象类型别名上起火,通过真实的解析器附加导出语句找到 。 内部编译时间界面和通用帮助者可能保持手动.

export type User = (typeof User)["Type"]; // ✅ silent
export type UserEncoded = typeof User.Encoded; // ✅ silent
export type User = Schema.Schema.Type<typeof User>; // ✅ silent
export type UserEncoded = Schema.Codec.Encoded<typeof User>; // ✅ silent
export interface User extends Schema.Schema.Type<typeof UserSchema> {} // ✅ silent
// also silent: typeof X["Encoded"], typeof X.Type

手动化名的修补:运行 @effect/tsgo是因为 typeToEffectSchema, (中文(简体) ), typeToEffectSchemaClass,或 structuralTypeToSchema (取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取取.

拼写来源: 效果 4 Docs (effect/ai-docs/src/01_effect/02_schema/10_schema-basics.ts 内 [email protected])获得类型 typeof Contract["Type"] 编号 : typeof Contract["Encoded"]; 点和 Schema.Schema.Type<typeof Contract> 拼写也得到承认.

resilience-policy: 触发和选项
着火了安静
每个 Effect.retry 编号 : Effect.retryOrElse 调用测试文件
Effect.tryPromise, (中文(简体) ), HttpClient.get|post|put|patch|del|head|options|execute 电话附加语句或函数显示超时或重试
request.pipe(Effect.retry(Schedule.exponential("100 millis"))); // ❌ fires: no bound

defineResiliencePolicy({ outboundCallPattern }) 替换输出的呼叫模式。 双胞胎 core/boundary-resilience。 。 。 .

layer-identity: 触发和沉默情况

层被引用来纪念:一个在两个组成地被召唤的工厂建造了两个池. 函数、箭头和方法起火返回 a Layer.* 表达式。 静曰: Layer.succeed, (中文(简体) ), Layer.empty, (中文(简体) ), Layer.fresh, (中文(简体) ), LayerMap 检查,测试文件。 法官点了整个仓库的呼叫站点.

const tenants = LayerMap.make((tenant: string) => Layer.effect(Db, connect(tenant))); // ✅ silent
Agentlint规则合同
事实细节
规则形状lifecycle, (中文(简体) ), standard (订正), detector (版本), binding (id, 权威, 范围, 实质性选项)
编译defineConfig({ extends: [preset] }) 或者说 defineConfig({ rules: [configuredRule] }); 重复使用需要不同的绑定标识
权力默认允许代理接受;存储器所有者选择范围,并可以向 human
接受结论需要匹配当前证据 财务报告和审定财务报表 权力
固定装置@aurelienbbn/agentlint/testing 使用真实解析器运行嵌入式活性/静态固定装置

登记的合同库存

从软件包导出 pnpm catalog. 规则特定选项和限制在上文和源测试中都有描述.

规则/检查触发或审查范围
layer-identity旗子函数返回新建的图层,所以调用站点会被审查重复的资源构建.
prefer-schema-contracts旗子导出需要 Effect Schema 所有权的手工对象合同 .
resilience-policyFlags Effect. retrieving policy and outmext Effect 调用时没有显示超时,因此只能对约束、紧张、可重复的上游和一能性进行审查.

贷项

starterPreset 登机:由Peter O'Malley拆卸而来的概念灵感;没有复制代码或指南.

版本与发布记录

@aurelienbbn/agentlint-plugin-effect 共发布 6 个版本,首次发布于 2026/09/25;过去 12 个月发布了 6 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.1.5latest2026/10/1424 天前
0.1.42026/10/1325 天前
0.1.32026/09/301 个月前
0.1.22026/09/301 个月前
0.1.12026/09/251 个月前
0.1.02026/09/251 个月前

关于 @aurelienbbn/agentlint-plugin-effect 的常见问题

@aurelienbbn/agentlint-plugin-effect 是什么?

效果项目的自定义代理林特规则 .

如何安装 @aurelienbbn/agentlint-plugin-effect?

在项目目录运行 npm install @aurelienbbn/agentlint-plugin-effect,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@aurelienbbn/agentlint(>=0.3.0 <0.9.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@aurelienbbn/agentlint-plugin-effect 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@aurelienbbn/agentlint-plugin-effect 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@aurelienbbn/agentlint-plugin-effect 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.19.0 || ^24.11.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@aurelienbbn/agentlint-plugin-effect 可以商用吗?

@aurelienbbn/agentlint-plugin-effect 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@aurelienbbn/agentlint-plugin-effect 的下载量有多少?

根据 npm 官方下载统计,@aurelienbbn/agentlint-plugin-effect 在 2026/10/07 – 2026/11/05 这 30 天内被下载 2,280 次,日均约 76 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@aurelienbbn/agentlint-plugin-effect 还在维护吗?

最新版本 0.1.5 发布于 2026/10/14(24 天前);至今共发布 6 个版本,其中过去 12 个月发布了 6 个;首次发布于 2026/09/25。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。