clisbot 0.1.43 → 0.1.45-beta.10
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/README.md +71 -21
- package/config/clisbot.json.template +116 -536
- package/config/clisbot.v0.1.43.json.template +306 -0
- package/dist/main.js +7539 -2742
- package/package.json +1 -1
- package/templates/customized/README.md +5 -4
- package/templates/{customized/personal-assistant/CLAUDE.md → default/AGENTS.md} +3 -2
- package/templates/default/BOOTSTRAP.md +57 -0
- package/templates/default/IDENTITY.md +23 -0
- package/templates/default/README.md +14 -0
- package/templates/default/SOUL.md +36 -0
- package/templates/default/TOOLS.md +40 -0
- package/templates/default/USER.md +17 -0
- package/templates/slack/default/app-manifest-guide.md +7 -7
- package/templates/slack/default/app-manifest.json +6 -1
- package/templates/customized/personal-assistant/GEMINI.md +0 -136
- package/templates/customized/team-assistant/CLAUDE.md +0 -216
- package/templates/customized/team-assistant/GEMINI.md +0 -137
package/README.md
CHANGED
|
@@ -40,17 +40,53 @@ The challenge is not whether AI is useful. It is how to make it work at enterpri
|
|
|
40
40
|
- Slack and Telegram are not treated as plain-text sinks: routed conversations can carry thread or topic identity, pairing, and file-aware workflows.
|
|
41
41
|
- Advanced multi-agent setup is available later, but it is not required for day one.
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Surface Access Model
|
|
44
|
+
|
|
45
|
+
The important current config mental model is:
|
|
46
|
+
|
|
47
|
+
- `app`
|
|
48
|
+
- `bots`
|
|
49
|
+
- `agents`
|
|
50
|
+
|
|
51
|
+
Inside each bot:
|
|
52
|
+
|
|
53
|
+
- `directMessages` is the one-person surface map
|
|
54
|
+
- `groups` is the multi-user surface map
|
|
55
|
+
- stored keys use raw provider-local ids plus `*`
|
|
56
|
+
|
|
57
|
+
Examples:
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
- Slack shared surface: `groups["C1234567890"]`
|
|
60
|
+
- Telegram group: `groups["-1001234567890"]`
|
|
61
|
+
- Telegram topic: `groups["-1001234567890"].topics["42"]`
|
|
62
|
+
- DM wildcard default: `directMessages["*"]`
|
|
46
63
|
|
|
47
|
-
|
|
64
|
+
Operator CLI ids stay prefixed:
|
|
65
|
+
|
|
66
|
+
- `dm:<id>`
|
|
67
|
+
- `dm:*`
|
|
68
|
+
- `group:<id>`
|
|
69
|
+
- `group:*`
|
|
70
|
+
- `topic:<chatId>:<topicId>`
|
|
71
|
+
|
|
72
|
+
Current invariants:
|
|
73
|
+
|
|
74
|
+
- Slack `channel:<id>` is compatibility input only, not canonical operator naming
|
|
75
|
+
- stored config under one bot uses only raw ids plus `*` inside `directMessages` and `groups`
|
|
76
|
+
- `group:*` is the default multi-user sender policy node for one bot and should be updated or disabled, not removed
|
|
77
|
+
- `disabled` means silent for everyone on that surface, including owner/admin and pairing guidance
|
|
78
|
+
- owner/admin do not bypass `groupPolicy`/`channelPolicy` admission; after a group is admitted and enabled, they bypass sender allowlists, while `blockUsers` still wins
|
|
79
|
+
- the deny message intentionally uses one common human-facing term, `group`, for every multi-user surface
|
|
80
|
+
|
|
81
|
+
## CLI Compatibility Snapshot
|
|
82
|
+
|
|
83
|
+
`clisbot` currently works well with Codex, Claude, and Gemini.
|
|
48
84
|
|
|
49
85
|
| CLI | Current Stability | Short Take |
|
|
50
86
|
| ----------| ---------------------| -------------------------------------------------------------------------------------------------------------|
|
|
51
87
|
| `codex` | Best today | Strongest default for routed coding work. |
|
|
52
88
|
| `claude` | Usable with caveats | Claude can surface its own plan-approval and auto-mode behavior even when launched with bypass-permissions. |
|
|
53
|
-
| `gemini` |
|
|
89
|
+
| `gemini` | Fully compatible | Gemini is supported as a first-class runner for routed Slack and Telegram workflows. |
|
|
54
90
|
|
|
55
91
|
CLI-specific operator notes:
|
|
56
92
|
|
|
@@ -81,7 +117,13 @@ If you want to try first without persisting the token yet, just remove `--persis
|
|
|
81
117
|
|
|
82
118
|
Next steps:
|
|
83
119
|
|
|
84
|
-
- For security,
|
|
120
|
+
- For security, DMs default to pairing.
|
|
121
|
+
- Existing configs from any version before `0.1.45` update directly to `0.1.45` automatically on first run. clisbot writes a backup first under `~/.clisbot/backups/`, then rewrites the config to the current shape.
|
|
122
|
+
- Shared Slack channels, Slack groups, Telegram groups, and Telegram topics are a separate gate: normal users need an explicit route such as `group:<id>` or `topic:<chatId>:<topicId>` before the bot will talk there. Legacy Slack `channel:<id>` input still works for compatibility.
|
|
123
|
+
- After a shared surface is admitted, per-surface sender control comes from the bot's default shared rule `groups["*"]` plus any route-local `allowUsers` or `blockUsers`.
|
|
124
|
+
- If the effective shared policy is `disabled`, the bot stays silent there for everyone, including owner/admin.
|
|
125
|
+
- If the effective shared policy is `allowlist` and a sender is not allowed, the bot denies before the runner:
|
|
126
|
+
- `You are not allowed to use this bot in this group. Ask a bot owner or admin to add you to \`allowUsers\` for this surface.`
|
|
85
127
|
- However, `clisbot` has smart autopairing feature to help you get started frictionless. Just send direct message to your bot (through telegram or slack) within 30 minutes so you can claim owner role automatically, and use the bot right away without pairing. After this 30 minutes window you need to approve pairing following instructions by the bot in direct message.
|
|
86
128
|
- To chat with the bot in a group:
|
|
87
129
|
- telegram: Add bot to group, then use slash command in that group /start, you will be guided with command to add a group. Run that command directly or copy that command and chat directly with the bot in DM to ask it do for you (since you are the owner, you are authorized to run that command). After completed, come back to the group and start talk with the bot.
|
|
@@ -97,7 +139,7 @@ Need the step-by-step setup docs instead of the shortest path?
|
|
|
97
139
|
|
|
98
140
|
- Telegram: [Telegram Bot Setup](docs/user-guide/telegram-setup.md)
|
|
99
141
|
- Slack: [Slack App Setup](docs/user-guide/slack-setup.md)
|
|
100
|
-
- Release
|
|
142
|
+
- Release history: [CHANGELOG.md](CHANGELOG.md), [release notes](docs/releases/README.md), [update guide](docs/updates/update-guide.md), [release guides](docs/updates/README.md), and [migration index](docs/migrations/index.md)
|
|
101
143
|
- Slack app manifest template: [app-manifest.json](templates/slack/default/app-manifest.json)
|
|
102
144
|
- Slack app manifest guide: [app-manifest-guide.md](templates/slack/default/app-manifest-guide.md)
|
|
103
145
|
|
|
@@ -110,18 +152,20 @@ What happens next:
|
|
|
110
152
|
- fresh bootstrap only enables the channels you name explicitly
|
|
111
153
|
- after the persisted first run, later restarts can use plain `clisbot start`
|
|
112
154
|
|
|
113
|
-
##
|
|
155
|
+
## Recent Release Highlights
|
|
156
|
+
|
|
157
|
+
- `v0.1.45`: safer personal and team bots in real Slack and Telegram groups, automatic direct updates from older installs, more reliable scheduled loops, clearer sender and surface context, Telegram audio support, and stricter streaming/session isolation.
|
|
158
|
+
- `v0.1.43`: more durable runtime recovery, clearer routed follow-up controls, more truthful tmux prompt submission checks, better queued-start notifications, and safer Slack thread attachment behavior.
|
|
159
|
+
- `v0.1.39`: the first large release of the current bot-first shape, with native Slack and Telegram rendering, cleaner first-run setup, stronger pairing/auth defaults, better long-running run visibility, and recurring `/loop` automation.
|
|
114
160
|
|
|
115
|
-
|
|
116
|
-
- A much cleaner first-run path, with a clearer bot-first setup story and better setup docs.
|
|
117
|
-
- Stronger pairing, auth, and safer shared-channel behavior by default.
|
|
118
|
-
- More trustworthy long-running work, with better attach, detach, recovery, and operator visibility.
|
|
119
|
-
- Real recurring automation with `/loop`.
|
|
161
|
+
There are many more useful fixes and operator improvements in the full release notes, including config update safety, CLI help, setup docs, runner debugging, route policy behavior, and channel-specific polish.
|
|
120
162
|
|
|
121
163
|
Read the full notes here:
|
|
122
164
|
|
|
123
165
|
- [CHANGELOG.md](CHANGELOG.md)
|
|
124
166
|
- [Release Notes Index](docs/releases/README.md)
|
|
167
|
+
- [v0.1.45 Release Notes](docs/releases/v0.1.45.md)
|
|
168
|
+
- [v0.1.43 Release Notes](docs/releases/v0.1.43.md)
|
|
125
169
|
- [v0.1.39 Release Notes](docs/releases/v0.1.39.md)
|
|
126
170
|
|
|
127
171
|
If you prefer Slack first:
|
|
@@ -149,11 +193,11 @@ bun run start --cli codex --bot-type personal --telegram-bot-token <your-telegra
|
|
|
149
193
|
|
|
150
194
|
Repo-local `bun run start|stop|restart|status|logs|init|pairing` is pinned by `.env` to `CLISBOT_HOME=~/.clisbot-dev`, so local testing does not accidentally reuse your main `~/.clisbot` runtime.
|
|
151
195
|
|
|
152
|
-
|
|
196
|
+
Update note for existing installs:
|
|
153
197
|
|
|
154
198
|
- `v0.1.39` includes breaking changes in config shape and in the main CLI command surface.
|
|
155
|
-
- If you already run an older install, ask Codex or Claude in this repo to update your current config before
|
|
156
|
-
- The
|
|
199
|
+
- If you already run an older install, ask Codex or Claude in this repo to update your current config before updating the package.
|
|
200
|
+
- The package update itself is still simple:
|
|
157
201
|
|
|
158
202
|
```bash
|
|
159
203
|
clisbot stop
|
|
@@ -224,7 +268,7 @@ The docs in this repo are kept current, including the [User Guide](docs/user-gui
|
|
|
224
268
|
If you prefer to configure everything yourself:
|
|
225
269
|
|
|
226
270
|
1. Read the official config template in [config/clisbot.json.template](config/clisbot.json.template).
|
|
227
|
-
2. If you need the archived
|
|
271
|
+
2. If you need the archived released snapshot for migration review, compare it with [config/clisbot.v0.1.43.json.template](config/clisbot.v0.1.43.json.template).
|
|
228
272
|
3. Copy the official template to `~/.clisbot/clisbot.json` and adjust bots, routes, agents, workspaces, and policies for your environment.
|
|
229
273
|
4. Add agents through the CLI so tool defaults, startup options, and bootstrap templates stay consistent.
|
|
230
274
|
5. Optionally move stable channel secrets into env vars or canonical credential files after your first successful run.
|
|
@@ -276,11 +320,14 @@ If the quick start does not work, check these in order:
|
|
|
276
320
|
trust_level = "trusted"
|
|
277
321
|
```
|
|
278
322
|
|
|
279
|
-
- If that trust screen is still blocking,
|
|
323
|
+
- If that trust screen is still blocking, inspect the live session name with `clisbot runner list`, then attach directly with `tmux -S ~/.clisbot/state/clisbot.sock attach -t <session-name>`.
|
|
280
324
|
- If Gemini startup says it is waiting for manual authorization, authenticate Gemini directly first or provide a headless auth path such as `GEMINI_API_KEY` or Vertex AI credentials; `clisbot` now treats that screen as a startup blocker instead of a healthy ready session.
|
|
281
325
|
- If Codex warns that `bubblewrap` is missing on Linux, install `bubblewrap` in the runtime environment.
|
|
282
|
-
- If the bot does not answer, check
|
|
326
|
+
- If the bot does not answer, check `clisbot status` first. Healthy channels should show `connection=active`; if a channel stays `starting`, inspect `clisbot logs`.
|
|
327
|
+
- If a routed message was accepted but no reply arrives, send one test message and immediately run `clisbot runner watch --latest --lines 100` in a terminal. This shows the live tmux runner pane and usually reveals missing CLI auth, trust prompts, stuck startup, or model/provider errors.
|
|
328
|
+
- If Codex works in your normal terminal but the routed runner shows `Missing environment variable: CODEX_CLIPROXYAPI_KEY`, remember that `clisbot` runs Codex from a detached background process and tmux session. Start or restart `clisbot` from a shell where `echo $CODEX_CLIPROXYAPI_KEY` prints a value, or export the key in the environment used by your service manager. Existing tmux runner sessions keep their old environment, so recycle them after fixing env.
|
|
283
329
|
- If runtime startup still fails, run `clisbot logs` and inspect the recent log tail that `clisbot` now prints automatically on startup failure.
|
|
330
|
+
- If a normal restart is not enough, use `clisbot stop --hard` to stop the runtime and kill all tmux runner sessions on the configured clisbot socket, then start again from a shell with the correct environment.
|
|
284
331
|
- If you need the full command list, run `clisbot --help`.
|
|
285
332
|
- If you need step-by-step operator docs, start with [docs/user-guide/README.md](docs/user-guide/README.md).
|
|
286
333
|
- If Slack thread behavior feels too eager, use `/followup pause` or `/followup mention-only`.
|
|
@@ -292,12 +339,15 @@ Most users only need a small set of commands at first:
|
|
|
292
339
|
|
|
293
340
|
- `clisbot start`: start the bot runtime and create the default first-run setup when needed.
|
|
294
341
|
- `clisbot restart`: restart the runtime cleanly; use this first when the bot stops responding.
|
|
295
|
-
- `clisbot stop`: stop the runtime cleanly before
|
|
342
|
+
- `clisbot stop`: stop the runtime cleanly before updates, config changes, or maintenance.
|
|
343
|
+
- `clisbot stop --hard`: stop the runtime and kill all tmux runner sessions on the configured clisbot socket; use this when stale runner panes, old environment variables, or stuck sessions survive a normal restart.
|
|
296
344
|
- `clisbot status`: check whether the runtime, channels, and active sessions look healthy.
|
|
297
345
|
- `clisbot logs`: inspect recent runtime logs when startup, routing, or replies look wrong.
|
|
298
346
|
- `clisbot runner list`: list the live tmux-backed runner sessions and see what is active.
|
|
299
347
|
- `clisbot runner watch <session-name>`: live-watch one specific session when debugging a real run.
|
|
300
|
-
- `clisbot runner watch --latest`: jump straight into the most recently active session.
|
|
348
|
+
- `clisbot runner watch --latest --lines 100`: jump straight into the most recently active session with enough context to debug a just-submitted message.
|
|
349
|
+
- `clisbot queues list`: inspect pending durable queued prompts across the app.
|
|
350
|
+
- `clisbot queues create --channel telegram --target group:-1001234567890 --topic-id 4335 --sender telegram:1276408333 <prompt>`: create one durable same-session queued prompt, capped by `control.queue.maxPendingItemsPerSession` (default `20`).
|
|
301
351
|
|
|
302
352
|
Full operator command reference:
|
|
303
353
|
|
|
@@ -394,7 +444,7 @@ tmux is still the current stability boundary. One agent maps to one durable runn
|
|
|
394
444
|
|
|
395
445
|
This repo also serves as a small example of an AI-native engineering workflow:
|
|
396
446
|
|
|
397
|
-
- simple `AGENTS.md
|
|
447
|
+
- simple `AGENTS.md`-style operating rules, with Claude and Gemini compatibility files able to symlink back to the same source
|
|
398
448
|
- lessons-learned docs to capture repeated feedback and pitfalls
|
|
399
449
|
- architecture docs used as a stable implementation contract
|
|
400
450
|
- end-to-end validation expectations to close the feedback loop for AI agents
|