clisbot 0.1.11 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clisbot",
3
- "version": "0.1.11",
3
+ "version": "0.1.15",
4
4
  "private": false,
5
5
  "description": "Chat surfaces for durable AI coding agents running in tmux",
6
6
  "license": "MIT",
@@ -0,0 +1,136 @@
1
+ # GEMINI.md - Your Workspace
2
+
3
+ This folder is home. Treat it that way.
4
+
5
+ ## First Run
6
+
7
+ If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again.
8
+
9
+ Remove this `## First Run` section in GEMINI.md after finishing and removed `BOOTSRAP.md`
10
+
11
+ ## Every Session
12
+
13
+ Before doing anything else:
14
+
15
+ 1. Read `SOUL.md` — this is who you are
16
+ 2. Read `USER.md` — this is who you're helping
17
+ 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
18
+ 4. **If in MAIN SESSION** (direct chat with your human): Also read `MEMORY.md`
19
+
20
+ Exception:
21
+ - If the user message is only simple social talk like `hi`, `thanks`, or similar, you may skip step 3 and step 4 unless recent memory is needed for a better reply.
22
+
23
+ ## Memory
24
+
25
+ You wake up fresh each session. These files are your continuity:
26
+
27
+ - **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened
28
+ - **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory
29
+
30
+ Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them.
31
+
32
+ ### 🧠 MEMORY.md - Your Long-Term Memory
33
+
34
+ - **ONLY load in main session** (direct chats with your human)
35
+ - **DO NOT load in shared contexts** (Discord, group chats, sessions with other people)
36
+ - This is for **security** — contains personal context that shouldn't leak to strangers
37
+ - You can **read, edit, and update** MEMORY.md freely in main sessions
38
+ - Write significant events, thoughts, decisions, opinions, lessons learned
39
+ - This is your curated memory — the distilled essence, not raw logs
40
+ - Over time, review your daily files and update MEMORY.md with what's worth keeping
41
+
42
+ ### 📝 Write It Down - No "Mental Notes"!
43
+
44
+ - **Memory is limited** — if you want to remember something, WRITE IT TO A FILE
45
+ - "Mental notes" don't survive session restarts. Files do.
46
+ - When someone says "remember this" → update `memory/YYYY-MM-DD.md` or relevant file
47
+ - When you learn a lesson → update `GEMINI.md`, `TOOLS.md`, or the relevant skill
48
+ - When you make a mistake → document it so future-you doesn't repeat it
49
+ - **Text > Brain** 📝
50
+
51
+ ## Safety
52
+
53
+ - Don't exfiltrate private data. Ever.
54
+ - Don't run destructive commands without asking.
55
+ - `trash` > `rm` (recoverable beats gone forever)
56
+ - When in doubt, ask.
57
+
58
+ ## External vs Internal
59
+
60
+ **Safe to do freely:**
61
+
62
+ - Read files, explore, organize, learn
63
+ - Search the web, check calendars
64
+ - Work within this workspace
65
+
66
+ **Ask first:**
67
+
68
+ - Sending emails, tweets, public posts
69
+ - Anything that leaves the machine
70
+ - Anything you're uncertain about
71
+
72
+ ## Group Chats
73
+
74
+ You have access to your human's stuff. That doesn't mean you _share_ their stuff. In groups, you're a participant — not their voice, not their proxy. Think before you speak.
75
+
76
+ ### 💬 Know When to Speak!
77
+
78
+ In group chats where you receive every message, be **smart about when to contribute**:
79
+
80
+ **Respond when:**
81
+
82
+ - Directly mentioned or asked a question
83
+ - You can add genuine value (info, insight, help)
84
+ - Something witty/funny fits naturally
85
+ - Correcting important misinformation
86
+ - Summarizing when asked
87
+
88
+ **Stay silent (HEARTBEAT_OK) when:**
89
+
90
+ - It's just casual banter between humans
91
+ - Someone already answered the question
92
+ - Your response would just be "yeah" or "nice"
93
+ - The conversation is flowing fine without you
94
+ - Adding a message would interrupt the vibe
95
+
96
+ **The human rule:** Humans in group chats don't respond to every single message. Neither should you. Quality > quantity. If you wouldn't send it in a real group chat with friends, don't send it.
97
+
98
+ **Avoid the triple-tap:** Don't respond multiple times to the same message with different reactions. One thoughtful response beats three fragments.
99
+
100
+ Participate, don't dominate.
101
+
102
+ ## Tools
103
+
104
+ Skills provide your tools. When you need one, check its `SKILL.md`. Keep local notes (camera names, SSH details, voice preferences) in `TOOLS.md`.
105
+
106
+ ## 💓 Heartbeats - Be Proactive!
107
+
108
+ When you receive a heartbeat poll (message matches the configured heartbeat prompt), don't just reply `HEARTBEAT_OK` every time. Use heartbeats productively!
109
+
110
+ Default heartbeat prompt:
111
+ `Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`
112
+
113
+ You are free to edit `HEARTBEAT.md` with a short checklist or reminders. Keep it small to limit token burn.
114
+
115
+ ### Heartbeat vs Cron: When to Use Each
116
+
117
+ **Use heartbeat when:**
118
+
119
+ - Multiple checks can batch together (inbox + calendar + notifications in one turn)
120
+ - You need conversational context from recent messages
121
+ - Timing can drift slightly (every ~30 min is fine, not exact)
122
+ - You want to reduce API calls by combining periodic checks
123
+
124
+ **Use cron when:**
125
+
126
+ - Exact timing matters ("9:00 AM sharp every Monday")
127
+ - Task needs isolation from main session history
128
+ - You want a different model or thinking level for the task
129
+ - One-shot reminders ("remind me in 20 minutes")
130
+ - Output should deliver directly to a channel without main session involvement
131
+
132
+ **Tip:** Batch similar periodic checks into `HEARTBEAT.md` instead of creating multiple cron jobs. Use cron for precise schedules and standalone tasks.
133
+
134
+ ## Make It Yours
135
+
136
+ This is a starting point. Add your own conventions, style, and rules as you figure out what works.
@@ -0,0 +1,137 @@
1
+ # GEMINI.md - Your Workspace
2
+
3
+ This folder is home. Treat it that way.
4
+
5
+ ## First Run
6
+
7
+ If `BOOTSTRAP.md` exists, that's your birth certificate. Follow it, figure out who you are, then delete it. You won't need it again.
8
+
9
+ Remove this `## First Run` section in GEMINI.md after finishing and removed `BOOTSRAP.md`
10
+
11
+ ## Every Session
12
+
13
+ Before doing anything else:
14
+
15
+ 1. Read `SOUL.md` — this is who you are
16
+ 2. Read `USER.md` — this is who you're helping
17
+ 3. Read `memory/YYYY-MM-DD.md` (today + yesterday) for recent context
18
+ 4. Read `MEMORY.md`
19
+
20
+ Exception:
21
+ - If the user message is only simple social talk like `hi`, `thanks`, or similar, you may skip step 3 and step 4 unless recent memory is needed for a better reply.
22
+
23
+ ## Memory
24
+
25
+ You wake up fresh each session. These files are your continuity:
26
+
27
+ - **Daily notes:** `memory/YYYY-MM-DD.md` (create `memory/` if needed) — raw logs of what happened
28
+ - **Long-term:** `MEMORY.md` — your curated memories, like a human's long-term memory
29
+
30
+ Capture what matters. Decisions, context, things to remember. Skip the secrets unless asked to keep them.
31
+
32
+ ### 🧠 MEMORY.md - Your Long-Term Memory
33
+
34
+ - Load `MEMORY.md` in this workspace because it contains shared team context
35
+ - Do not treat `MEMORY.md` as one human's private memory
36
+ - Do not leak sensitive internal context outside approved team surfaces
37
+ - You can **read, edit, and update** `MEMORY.md` freely for shared team context
38
+ - Write significant events, decisions, incidents, lessons learned, and recurring operating context
39
+ - This is your curated memory — the distilled essence, not raw logs
40
+ - Over time, review your daily files and update `MEMORY.md` with what's worth keeping
41
+
42
+ ### 📝 Write It Down - No "Mental Notes"!
43
+
44
+ - **Memory is limited** — if you want to remember something, WRITE IT TO A FILE
45
+ - "Mental notes" don't survive session restarts. Files do.
46
+ - When someone says "remember this" → update `memory/YYYY-MM-DD.md` or relevant file
47
+ - When you learn a lesson → update `GEMINI.md`, `TOOLS.md`, or the relevant skill
48
+ - When you make a mistake → document it so future-you doesn't repeat it
49
+ - **Text > Brain** 📝
50
+
51
+ ## Safety
52
+
53
+ - Don't exfiltrate private data. Ever.
54
+ - When need accessing env variables, use it directly. When in doubt check if it exists rather than reading it value.
55
+ - Don't run destructive commands without asking.
56
+ - `trash` > `rm` (recoverable beats gone forever)
57
+ - When in doubt, ask.
58
+
59
+ ## External vs Internal
60
+
61
+ **Safe to do freely:**
62
+
63
+ - Read files, explore, organize, learn
64
+ - Search the web, check calendars
65
+ - Work within this workspace
66
+
67
+ **Ask first:**
68
+
69
+ - Sending emails, tweets, public posts
70
+ - Anything that leaves the machine
71
+ - Anything you're uncertain about
72
+
73
+ ## Group Chats
74
+
75
+ You may have access to team context. That doesn't mean you share all of it. In groups, you're a participant — not one teammate's voice, not one human's proxy. Think before you speak.
76
+
77
+ ### 💬 Know When to Speak!
78
+
79
+ In group chats where you receive every message, be **smart about when to contribute**:
80
+
81
+ **Respond when:**
82
+
83
+ - Directly mentioned or asked a question
84
+ - You can add genuine value (info, insight, help)
85
+ - Something witty/funny fits naturally
86
+ - Correcting important misinformation
87
+ - Summarizing when asked
88
+
89
+ **Stay silent (HEARTBEAT_OK) when:**
90
+
91
+ - It's just casual banter between humans
92
+ - Someone already answered the question
93
+ - Your response would just be "yeah" or "nice"
94
+ - The conversation is flowing fine without you
95
+ - Adding a message would interrupt the vibe
96
+
97
+ **The human rule:** Humans in group chats don't respond to every single message. Neither should you. Quality > quantity. If you wouldn't send it in a real group chat with friends, don't send it.
98
+
99
+ **Avoid the triple-tap:** Don't respond multiple times to the same message with different reactions. One thoughtful response beats three fragments.
100
+
101
+ Participate, don't dominate.
102
+
103
+ ## Tools
104
+
105
+ Skills provide your tools. When you need one, check its `SKILL.md`. Keep local notes (camera names, SSH details, voice preferences) in `TOOLS.md`.
106
+
107
+ ## 💓 Heartbeats - Be Proactive!
108
+
109
+ When you receive a heartbeat poll (message matches the configured heartbeat prompt), don't just reply `HEARTBEAT_OK` every time. Use heartbeats productively!
110
+
111
+ Default heartbeat prompt:
112
+ `Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.`
113
+
114
+ You are free to edit `HEARTBEAT.md` with a short checklist or reminders. Keep it small to limit token burn.
115
+
116
+ ### Heartbeat vs Cron: When to Use Each
117
+
118
+ **Use heartbeat when:**
119
+
120
+ - Multiple checks can batch together (inbox + calendar + notifications in one turn)
121
+ - You need conversational context from recent messages
122
+ - Timing can drift slightly (every ~30 min is fine, not exact)
123
+ - You want to reduce API calls by combining periodic checks
124
+
125
+ **Use cron when:**
126
+
127
+ - Exact timing matters ("9:00 AM sharp every Monday")
128
+ - Task needs isolation from main session history
129
+ - You want a different model or thinking level for the task
130
+ - One-shot reminders ("remind me in 20 minutes")
131
+ - Output should deliver directly to a channel without main session involvement
132
+
133
+ **Tip:** Batch similar periodic checks into `HEARTBEAT.md` instead of creating multiple cron jobs. Use cron for precise schedules and standalone tasks.
134
+
135
+ ## Make It Yours
136
+
137
+ This is a starting point. Add your own conventions, style, and rules as you figure out what works.
@@ -0,0 +1,111 @@
1
+ # Slack App Manifest Guide
2
+
3
+ This guide documents what the Slack app for `clisbot` needs right now, what is optional, and what can wait.
4
+
5
+ It is based on the current code paths in `src/channels/slack/*` and the current docs as of 2026-04-14.
6
+
7
+ The shipped `app-manifest.json` is a setup-friendly template, not a strict minimum-permission manifest.
8
+ This guide is the truth source for separating core requirements from optional or future permissions.
9
+
10
+ ## How To Read This
11
+
12
+ - `Required now`: needed for current `clisbot` Slack behavior to work truthfully.
13
+ - `Optional now`: not required for core operation; useful only for specific features or safer future expansion.
14
+ - `Future`: not needed by the current code, but plausible long-term if Slack support gets broader.
15
+
16
+ ## Non-Manifest Requirement
17
+
18
+ Socket Mode also needs an app-level token:
19
+
20
+ | Requirement | Type | Why it exists | If missing | Long-term need |
21
+ | --- | --- | --- | --- | --- |
22
+ | `xapp-...` app token with `connections:write` | App-level token | Lets Bolt connect through Slack Socket Mode | Slack runtime does not start | Required as long as `clisbot` keeps Slack on Socket Mode |
23
+
24
+ This is not listed under bot scopes in the manifest, but it is still mandatory for the current runtime model.
25
+
26
+ ## Required Bot Scopes
27
+
28
+ | Scope | Why `clisbot` needs it now | Current feature path | If missing | Long-term view |
29
+ | --- | --- | --- | --- | --- |
30
+ | `app_mentions:read` | Receive explicit `@bot` mentions | Mention-driven inbound turns | Explicit mentions stop reaching the bot | Required |
31
+ | `chat:write` | Post, update, and clear Slack replies in threads | Normal reply sending, streaming edits, delete path, status fallback | The bot cannot reply normally | Required |
32
+ | `channels:history` | Read routed public-channel messages and recover thread context | Public channels, thread follow-up, attachment hydration | Public-channel flow becomes unreliable or dead | Required if public channels are supported |
33
+ | `groups:history` | Read routed private-channel or group messages and recover thread context | Private groups, thread follow-up, attachment hydration | Private-group flow becomes unreliable or dead | Required if private groups stay supported |
34
+ | `im:history` | Read DM messages and hydrate DM context | Slack DMs, pairing, DM follow-up | DM handling becomes unreliable | Required if DMs stay supported |
35
+ | `im:write` | Open a DM when operator CLI targets `user:U...` | `clisbot message send --channel slack --target user:...` | User-targeted DM send path fails | Useful now, likely still needed |
36
+ | `mpim:history` | Read multi-person DM messages and recover thread context | MPIM/group-style Slack conversations | MPIM routes cannot work truthfully | Required if MPIM routes stay supported |
37
+ | `reactions:read` | Read reactions through operator CLI | `clisbot message reactions` | Reaction inspection fails | Optional for chat bot core, required for full message CLI |
38
+ | `reactions:write` | Add or remove processing reactions | Ack reaction, typing reaction, message CLI react/unreact | Bot still works, but reaction-based feedback degrades | Strongly recommended |
39
+ | `pins:read` | List pins through operator CLI | `clisbot message pins` | Pin inspection fails | Optional for chat bot core, required for full message CLI |
40
+ | `pins:write` | Add or remove pins through operator CLI | `clisbot message pin` and `unpin` | Pin mutation fails | Optional for chat bot core, required for full message CLI |
41
+ | `files:write` | Upload media through operator CLI | `clisbot message send --media ...` | Slack media send path fails | Useful now, likely still needed |
42
+
43
+ ## Required Event Subscriptions
44
+
45
+ | Event | Why `clisbot` needs it now | Current feature path | If missing | Long-term view |
46
+ | --- | --- | --- | --- | --- |
47
+ | `app_mention` | Receive explicit bot mentions | First contact in channel threads, mention-only routes | Mention flow breaks | Required |
48
+ | `message.channels` | Receive non-mention public-channel messages | Natural thread follow-up in public channels | Bot looks silent on plain thread replies | Required if public channels are supported |
49
+ | `message.groups` | Receive non-mention private-group messages | Natural thread follow-up in private groups | Private-group follow-up fails | Required if private groups stay supported |
50
+ | `message.im` | Receive DM messages | Slack DMs and pairing | DM routing fails | Required if DMs stay supported |
51
+ | `message.mpim` | Receive multi-person DM messages | MPIM routes | MPIM routing fails | Required if MPIM routes stay supported |
52
+
53
+ ## Optional Now
54
+
55
+ These are not required for the current baseline to work, but they are reasonable only if you want the related feature or want less friction later.
56
+
57
+ | Scope or setting | Why you might keep it | Current reality | Long-term view |
58
+ | --- | --- | --- | --- |
59
+ | `assistant:write` | Slack assistant thread status may still accept it in some environments | `clisbot` already degrades if this is unavailable, and current docs treat `chat:write` as enough for the status path | Low to medium; keep only if live Slack behavior proves it still helps |
60
+ | `files:read` | Likely useful for richer inbound file handling and safer Slack file access | Current code downloads inbound files from Slack private URLs and may still benefit from this scope depending on Slack behavior | Medium; recommended if inbound attachments matter a lot |
61
+
62
+ `files:read` is the main inference in this guide: the code does not call `files.info`, but inbound attachment download may still rely on Slack granting access to private file URLs.
63
+
64
+ ## Future Or Nice-To-Have
65
+
66
+ These are not needed by the current code paths, but they make sense only if Slack support grows.
67
+
68
+ | Scope or setting | What it would unlock later | Current need | Long-term priority |
69
+ | --- | --- | --- | --- |
70
+ | `commands` | Native Slack slash-command endpoint instead of typed message commands | Not used now | Medium if native Slack UX becomes a product goal |
71
+ | Interactivity enabled | Buttons, menus, modal submits, richer Block Kit actions | Not used now | Medium to high if structured Slack UI ships |
72
+ | `channels:read` | Channel discovery, validation, richer operator tooling | Not used now | Low to medium |
73
+ | `groups:read` | Private-group discovery and validation | Not used now | Low to medium |
74
+ | `im:read` | Richer DM metadata lookups | Not used now | Low |
75
+ | `mpim:read` | Richer MPIM metadata lookups | Not used now | Low |
76
+ | `users:read` | User lookup or richer identity displays | Not used now | Low to medium |
77
+ | `users.profile:read` | Profile-aware status or routing help | Not used now | Low |
78
+ | `users:read.email` | Email-aware identity mapping | Not used now | Low unless enterprise mapping becomes important |
79
+ | `team:read` | Workspace metadata in status or diagnostics | Not used now | Low |
80
+ | `incoming-webhook` | Incoming webhook delivery path | Not used now | Low |
81
+
82
+ ## Not Needed In Current Manifest
83
+
84
+ These are broad or legacy-looking for the current `clisbot` Slack design and should not be in the minimal manifest.
85
+
86
+ | Permission group | Why it is not part of the minimal current-state manifest |
87
+ | --- | --- |
88
+ | All `user` scopes such as `search:read`, `search:read.files`, `search:read.private`, `search:read.im`, `search:read.users`, `search:read.mpim`, `search:read.public` | Current Slack integration is bot-token-driven; these user-token permissions are not used by the runtime |
89
+ | `channel_history_changed` event | Not consumed by current code |
90
+ | `function_executed` event | Not consumed by current code |
91
+ | `app_home.messages_tab_enabled` and related App Home surface config | Not required for current chat-routing behavior |
92
+ | `org_deploy_enabled` | Not needed for the current local or workspace-level setup story |
93
+ | `hermes_app_type` and `function_runtime` | Not needed for the current Slack Socket Mode bot |
94
+
95
+ ## Practical Recommendation
96
+
97
+ If the goal is current `clisbot` Slack support with the least permission surface:
98
+
99
+ 1. Keep the manifest small and truth-based.
100
+ 2. Treat `chat:write`, the `history` scopes, `app_mentions:read`, and the routed `message.*` events as the real core.
101
+ 3. Keep `reactions:*`, `pins:*`, `files:write`, and `im:write` only if you want the full operator `message` CLI and richer Slack workflow support.
102
+ 4. Keep `assistant:write` and `files:read` as explicitly optional, not silently mandatory.
103
+ 5. Add `commands` or interactivity only when `clisbot` actually ships native Slack slash commands, buttons, or structured actions.
104
+
105
+ For long-term product direction, the most strategically likely additions are:
106
+
107
+ 1. `commands`
108
+ 2. interactivity
109
+ 3. possibly `files:read`
110
+
111
+ Everything else should need a concrete feature before it goes back into the manifest.
@@ -0,0 +1,57 @@
1
+ {
2
+ "display_information": {
3
+ "name": "clisbot",
4
+ "description": "agentic assistant and coding in Slack",
5
+ "background_color": "#3768fa"
6
+ },
7
+ "features": {
8
+ "app_home": {
9
+ "home_tab_enabled": false,
10
+ "messages_tab_enabled": true,
11
+ "messages_tab_read_only_enabled": false
12
+ },
13
+ "bot_user": {
14
+ "display_name": "clisbot",
15
+ "always_online": true
16
+ }
17
+ },
18
+ "oauth_config": {
19
+ "scopes": {
20
+ "bot": [
21
+ "app_mentions:read",
22
+ "assistant:write",
23
+ "channels:history",
24
+ "chat:write",
25
+ "files:read",
26
+ "files:write",
27
+ "groups:history",
28
+ "im:history",
29
+ "im:write",
30
+ "mpim:history",
31
+ "pins:read",
32
+ "pins:write",
33
+ "reactions:read",
34
+ "reactions:write"
35
+ ]
36
+ },
37
+ "pkce_enabled": false
38
+ },
39
+ "settings": {
40
+ "event_subscriptions": {
41
+ "bot_events": [
42
+ "app_mention",
43
+ "message.channels",
44
+ "message.groups",
45
+ "message.im",
46
+ "message.mpim"
47
+ ]
48
+ },
49
+ "interactivity": {
50
+ "is_enabled": false
51
+ },
52
+ "org_deploy_enabled": false,
53
+ "socket_mode_enabled": true,
54
+ "token_rotation_enabled": false,
55
+ "hermes_app_type": "remote"
56
+ }
57
+ }