MCPcopy Create free account
hub / github.com/FIND-Lab/AgentWard / send_message

Function send_message

index.ts:30–41  ·  view source on GitHub ↗
(state: SessionState, content: string)

Source from the content-addressed store, hash-verified

28}
29
30function send_message(state: SessionState, content: string) {
31 if (!plugin.config!.notifications.enableProactiveNotifications) return;
32 if (state.channelId && state.targetId)
33 spawnSync('openclaw', [
34 'message', 'send',
35 '--channel', state.channelId,
36 '--target', state.targetId,
37 '--message', content
38 ], { stdio: 'inherit' });
39 else
40 getLogger().error("[Enforcement] No channel to send message.");
41}
42
43function clampText(text: string, maxChars: number): string {
44 if (maxChars <= 0) return "";

Callers 1

registerFunction · 0.85

Calls 1

getLoggerFunction · 0.90

Tested by

no test coverage detected