You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit dbc2356
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/channels/slack.md
+7-2Lines changed: 7 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1906,7 +1906,10 @@ Slack does not send presence changes through the Events API or Socket Mode. Open
1906
1906
{
1907
1907
channels: {
1908
1908
slack: {
1909
-
presenceEvents: { mode:"auto" },
1909
+
presenceEvents: {
1910
+
mode:"auto",
1911
+
prompt:"Do not send a greeting. Stay silent.",
1912
+
},
1910
1913
channels: {
1911
1914
C0123456789: { presenceEvents: { mode:"on" } },
1912
1915
C0987654321: { presenceEvents: { mode:"off" } },
@@ -1924,6 +1927,8 @@ OpenClaw polls at most 45 unique workspace-user pairs per minute per Slack accou
1924
1927
1925
1928
The event includes `observed_away_at_ms`, `observed_active_at_ms`, and `observed_away_duration_ms`. The duration is the elapsed time between the first sampled `away` state in the current monitor run and the later sampled `active` state. It is not exact time away because presence can change between polls, and the observation starts fresh after the monitor restarts or the target expires. The event records what Slack reported, not whether the person was at their keyboard; Slack can mark someone away automatically or manually, and `users.getPresence` does not distinguish those cases for another user.
1926
1929
1930
+
`presenceEvents.prompt` replaces the default greeting guidance after the event facts. The account-level value applies by default, and `channels.<channel-id>.presenceEvents.prompt` can override it for one channel. The custom value is included verbatim and is limited to 20,000 characters, matching the default per-file `AGENTS.md` bootstrap limit. Set it to an empty string to omit event-specific guidance and let workspace instructions such as `AGENTS.md` decide how to handle the event. The presence facts are always included.
1931
+
1927
1932
The bot token needs `users:read`, which is already included in the recommended manifest. Enterprise Grid org-wide installs create a workspace-scoped polling client only after an authorized event identifies that workspace; presence state, cooldowns, and delivery targets remain partitioned by workspace.
- unfurls: `unfurlLinks` (default: `false`), `unfurlMedia` for `chat.postMessage` link/media preview control; set `unfurlLinks: true` to opt back into link previews
help: '"off" disables polling; "auto" covers DMs, MPIMs, and recent threads with up to 8 observed people; "on" also covers larger threads and top-level channels.',
109
109
},
110
+
"presenceEvents.prompt": {
111
+
label: "Slack Presence Event Prompt",
112
+
help: "Replace the default greeting guidance appended after presence facts. Use an empty string to omit event-specific guidance and let workspace instructions such as AGENTS.md govern behavior. Maximum: 20,000 characters.",
113
+
},
110
114
"channels.*.presenceEvents.mode": {
111
115
label: "Slack Channel Presence Event Mode",
112
116
help: 'Override presence events for one Slack channel. Use "on" to include large threads or top-level channel sessions.',
113
117
},
118
+
"channels.*.presenceEvents.prompt": {
119
+
label: "Slack Channel Presence Event Prompt",
120
+
help: "Override the account-level presence-event prompt for one Slack channel. Maximum: 20,000 characters.",
121
+
},
114
122
"execApprovals.enabled": {
115
123
label: "Slack Exec Approvals Enabled",
116
124
help: 'Controls Slack native exec approvals for this account: unset or "auto" enables DM-first native approvals when approvers can be resolved, true forces native approvals on, and false disables them.',
"Before greeting, retrieve relevant memory and wiki context for this immutable user_id, including a known timezone when available. Use their local time; if their timezone is unknown, do not guess.",
20
+
"Send at most one short, natural greeting in this Slack conversation. Do not reveal private memory. If no greeting is appropriate, stay silent.",
`A human participant became active on Slack after being observed away: user_id=${JSON.stringify(userId)}${target.teamId ? ` team_id=${JSON.stringify(target.teamId)}` : ""} channel_id=${JSON.stringify(target.channelId)}${target.threadId ? ` thread_ts=${JSON.stringify(target.threadId)}` : ""}.`,
"Before greeting, retrieve relevant memory and wiki context for this immutable user_id, including a known timezone when available. Use their local time; if their timezone is unknown, do not guess.",
88
-
"Send at most one short, natural greeting in this Slack conversation. Do not reveal private memory. If no greeting is appropriate, stay silent.",
107
+
...promptLines,
89
108
];
90
109
returnlines.join("\n");
91
110
}
@@ -128,6 +147,7 @@ function resolveObservedTarget(params: {
0 commit comments