refactor(core): rename RoleSignal → RoleStep, align structure with StartSignal #109

Closed
opened 2026-04-25 01:46:36 +00:00 by xiaoju · 0 comments
Owner

Phase 2 — 命名修正 + 结构对齐

1. RoleSignal → RoleStep

RoleSignal 和 Sense 的 Signal 命名冲突,改为 RoleStep 更准确(它代表 workflow 的一步,不是信号)。

同理 StartSignal 考虑改为 StartStep,让 Start 和 Role 命名一致。

2. RoleStep 补齐字段

当前 RoleSignal 只有 { role, meta },缺少 contenttimestamp。应该跟 StartStep 结构对应:

export type RoleStep<M extends RoleMeta> = {
  [K in keyof M & string]: { role: K; meta: M[K]; content: string; timestamp: number };
}[keyof M & string];

3. 同步更新

  • ModeratorContext 里的 signalstep
  • 所有引用 RoleSignal 的地方改为 RoleStep
  • 所有引用 StartSignal 的地方改为 StartStep
  • workflow-utils 的 isDryRun

依赖

Phase 1 先合

## Phase 2 — 命名修正 + 结构对齐 ### 1. RoleSignal → RoleStep `RoleSignal` 和 Sense 的 `Signal` 命名冲突,改为 `RoleStep` 更准确(它代表 workflow 的一步,不是信号)。 同理 `StartSignal` 考虑改为 `StartStep`,让 Start 和 Role 命名一致。 ### 2. RoleStep 补齐字段 当前 RoleSignal 只有 `{ role, meta }`,缺少 `content` 和 `timestamp`。应该跟 StartStep 结构对应: ```typescript export type RoleStep<M extends RoleMeta> = { [K in keyof M & string]: { role: K; meta: M[K]; content: string; timestamp: number }; }[keyof M & string]; ``` ### 3. 同步更新 - `ModeratorContext` 里的 `signal` → `step` - 所有引用 `RoleSignal` 的地方改为 `RoleStep` - 所有引用 `StartSignal` 的地方改为 `StartStep` - workflow-utils 的 `isDryRun` 等 ### 依赖 Phase 1 先合
This repo is archived. You cannot comment on issues.
No Label
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: uncaged/nerve#109