M3(1/5): @sfeel —— S-FEEL 子集的解析与求值,前后端同源

- lexer / parser(递归下降)/ evaluate / static-check,四文件纯函数,零 IO 零外部调用
- 子集封顶(ADR-006):比较 · 逻辑 · 算术 · 区间(开闭四态)· 列表与 in ·
  封闭内建函数集(字符串 / 数字 / 日期);未知函数一律拦下
- 单元格谓词(DMN 一格):`-` 任意 / 比较 / 区间 / 逗号析取
- staticCheck 给「画图即校验」用:语法 + 未知函数 + 引用路径清单
- app 侧以它替下 passthroughEvaluator:监听内容条件真求值,求值异常按不命中处置并留痕

32 个 sfeel 测试;全仓 182 个测试通过,门禁五道全绿

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KeDBx2PHLavbURXB8LJJ7m
This commit is contained in:
JCAI Main Agent
2026-07-27 01:21:45 +08:00
co-authored by Claude Opus 5
parent f0444f1417
commit 146e9bbfad
13 changed files with 1048 additions and 26 deletions
+5 -5
View File
@@ -8,9 +8,9 @@
import { z } from 'zod';
export declare const EVENT_TYPES: readonly ["data", "time", "human", "control"];
export declare const eventTypeSchema: z.ZodEnum<{
time: "time";
human: "human";
data: "data";
time: "time";
control: "control";
}>;
export type EventType = z.infer<typeof eventTypeSchema>;
@@ -71,9 +71,9 @@ export type EventPayload = z.infer<typeof eventPayloadSchema>;
export declare const envelopeSchema: z.ZodObject<{
id: z.core.$ZodBranded<z.ZodString, "EventId", "out">;
type: z.ZodEnum<{
time: "time";
human: "human";
data: "data";
time: "time";
control: "control";
}>;
correlation: z.ZodObject<{
@@ -134,9 +134,9 @@ export type Envelope = z.infer<typeof envelopeSchema>;
*/
export declare const envelopeDraftSchema: z.ZodObject<{
type: z.ZodEnum<{
time: "time";
human: "human";
data: "data";
time: "time";
control: "control";
}>;
payload: z.ZodObject<{
@@ -235,9 +235,9 @@ export declare const listenerSpecSchema: z.ZodObject<{
dynamic: "dynamic";
}>;
eventType: z.ZodEnum<{
time: "time";
human: "human";
data: "data";
time: "time";
control: "control";
}>;
keyFilter: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
@@ -260,9 +260,9 @@ export declare const registeredListenerSchema: z.ZodObject<{
dynamic: "dynamic";
}>;
eventType: z.ZodEnum<{
time: "time";
human: "human";
data: "data";
time: "time";
control: "control";
}>;
keyFilter: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;