MCPcopy Create free account
hub / github.com/chekusu/wanman / normalizeThreadSyncMessageType

Function normalizeThreadSyncMessageType

packages/runtime/src/supervisor.ts:123–133  ·  view source on GitHub ↗
(
  to: string,
  type: string | undefined,
  payload: unknown,
  priority: 'steer' | 'normal',
)

Source from the content-addressed store, hash-verified

121}
122
123function normalizeThreadSyncMessageType(
124 to: string,
125 type: string | undefined,
126 payload: unknown,
127 priority: 'steer' | 'normal',
128): string {
129 const normalizedType = typeof type === 'string' && type.trim() ? type.trim() : 'message';
130 if (normalizedType !== 'message') return normalizedType;
131 if (!isHumanConversationTarget(to)) return normalizedType;
132 return inferHumanMessageType(payload, priority);
133}
134
135function postStorySyncArtifact(artifact: {
136 id?: string;

Callers 1

handleRpcMethod · 0.85

Calls 2

inferHumanMessageTypeFunction · 0.85

Tested by

no test coverage detected