This repository has been archived on 2026-09-13. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
BPOS-TMP-REPO/apps/api/src/modules/loop-engine/index.ts
T
xcsandClaude Opus 5 fe8de5319c feat(loop-engine): analyze 动词 —— 系统组装入参、声明出参 schema、系统把结果落表
AI 在这里只是一个纯函数:不给工具、不给记忆、不多轮。
行数不由它决定 —— 出参是拿主键去 lookup 的一张查表,它漏一条那一格就是空,
required 立刻把它变成 _missing > 0,提交闸与放行门当场拦住。
出参不成形就地重问一次,再不成抛出去交人。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01LKMZDwMbyKzjw6Hembwvet
2026-08-29 03:54:14 +08:00

76 lines
1.6 KiB
TypeScript

/**
* module: loop-engine —— 唯一出口。只做 re-export,不写逻辑(编码规范 §10.1)。
*/
export type {
AgentAction,
AgentTurn,
Narration,
CaseModel,
CaseRuntime,
CaseState,
DecisionResult,
DecisionTrace,
EnabledEntry,
EnabledSet,
Gap,
ItemRuntime,
ItemState,
LoopEngineService,
LoopModel,
Navigation,
PlanItem,
PlanItemType,
TerminalAuthority,
TurnOutcome,
} from './contract.ts';
export {
AutomaticOnWorldTouchingError,
CmmnParseError,
ForbiddenTerminalError,
IllegalTransitionError,
TURN_ACTION_CAP,
} from './contract.ts';
export type {
AgentPort,
AnalyzeGateway,
CardGateway,
Clock,
ListenerRegistrar,
LoopStateStore,
MemoryRecorder,
Sfeel,
TaskContext,
TaskDataGateway,
ToolGateway,
} from './port.ts';
export type { TurnRunnerDeps } from './internal/usecase/turn-runner.ts';
export { createTurnRunner } from './internal/usecase/turn-runner.ts';
export { parseCmmn, parseXml, PLAN_ITEM_TYPES } from './internal/domain/cmmn-parse.ts';
export {
assertItemTransition,
achieveMilestones,
autoCompleteReady,
canTransitionCase,
canTransitionItem,
criterionKey,
readingsOf,
CASE_STATES,
evaluateCriterion,
initialRuntime,
ITEM_STATES,
mayCompleteCase,
mayTerminateCase,
navigate,
occur,
publishEnabled,
reenter,
transitionItem,
} from './internal/domain/lifecycle.ts';
export { deduceGaps, evaluateTable, evaluationOrder, isBindingConclusion } from './internal/domain/dmn.ts';
export { createLoopStateStore } from './internal/adapter/loop-state-store.ts';
export { loopStateTable } from './internal/adapter/loop-state-schema.ts';