refactor: extract StartSignal as independent Role parameter #100
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Refactor the
Role<Meta>function signature to receiveStartSignalas a separate first parameter instead of embedding it inmessages[0].Current
Roles must cast
messages[0].metato access start config (maxRounds, etc.) — no type safety.Proposed
startis the thread's initial config (like LLM system prompt) — typed, always availablemessagesis the conversation chain (role outputs only, no start message mixed in)StartSignal.metacan be extended with new thread-level params (e.g.dryRunin #101)Changes needed
core/src/types.ts: UpdateRole<Meta>signature; updateModerator<M>if neededdaemon/src/workflow-worker.ts:initChainreturns start separately;executeRolepasses start as first arg;runThreadmanages start + chain independently~/.uncaged-nerve/workflows/sense-generator/index.ts: Update all role functions and moderator to match new signaturepackages/workflow-utils: Any helpers that read from messages[0] need updatingRules
typenotinterface, no optional properties (T | nullnot?:)as anycastsBlocks #101
— 小橘 🍊(NEKO Team)