tabclaw 0.1.1 → 0.1.3

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 CHANGED
@@ -1,13 +1,30 @@
1
1
  # Tabclaw
2
2
 
3
- Tabclaw is a local gateway for AI assistant event hooks and notification channels. It helps connect hook-enabled agents to channels like Telegram while keeping runtime state under `~/.tabclaw`.
3
+ Tabclaw is a local gateway that bridges AI programming assistants (like Claude Code) with chat platforms (like Telegram). It listens for agent events and forwards them to your channels in real time.
4
4
 
5
5
  ## What it does
6
6
 
7
- - Runs a local gateway daemon for hook-based agent integrations
8
- - Attaches supported agents such as `claude` to the gateway
9
- - Routes session events, permission requests, and status updates to configured channels
10
- - Provides CLI commands for daemon control, status, logs, and agent attachment
7
+ ### Overview
8
+
9
+ - Runs a local HTTP gateway daemon to capture agent hook events
10
+ - Attaches hook-enabled agents to the gateway for event streaming
11
+ - Routes session events, permission requests, and task notifications to configured channels
12
+ - Manages agent-initiated tool execution permissions via chat platform interactions
13
+
14
+ ### Claude Code + Telegram integration
15
+
16
+ The core workflow bridges Claude Code with Telegram:
17
+
18
+ 1. **Session Monitoring** — Tabclaw listens for Claude Code session start/end events and notifies you on Telegram
19
+ 2. **Permission Control** — When Claude requests to execute a tool, you receive a permission prompt on Telegram with **Allow/Deny** buttons
20
+ 3. **Real-time Decisions** — Click the button in Telegram to grant or deny the tool execution
21
+ 4. **Task Completion** — Receive final notifications when tasks complete, including execution duration, token usage, and results
22
+
23
+ <p align="center">
24
+ <img src="assets/image_01.jpg" width="45%" alt="Claude + Telegram workflow" />
25
+ &nbsp;&nbsp;
26
+ <img src="assets/image_02.jpg" width="45%" alt="Permission request and task completion on Telegram" />
27
+ </p>
11
28
 
12
29
  ## Installation
13
30
 
@@ -61,9 +78,30 @@ tabclaw gateway status
61
78
 
62
79
  ## Configuration
63
80
 
64
- Copy `config.example.toml` to `~/.tabclaw/config.toml` and fill in your values.
81
+ Most configuration is handled by `tabclaw init` interactive wizard, which guides you through:
82
+
83
+ 1. Setting up your Claude Code hook server port
84
+ 2. Configuring Telegram bot credentials
85
+ 3. Testing channel connectivity
86
+
87
+ For manual setup or advanced options, edit `~/.tabclaw/config.toml`. Key sections:
88
+
89
+ **General settings:**
90
+ - `default_agent` — default agent to use (currently `claude`)
91
+ - `hook_server_port` — local port for receiving agent hooks (default `9876`)
92
+ - `log_level` — logging verbosity (`debug`, `info`, `warn`, `error`)
93
+
94
+ **Telegram channel:**
95
+ - `bot_token` — your Telegram bot token from BotFather
96
+ - `allowed_users` — list of Telegram user IDs allowed to interact with the bot (e.g., `[123456789, 987654321]`)
97
+ - `notify_types` — which event types to forward (`permission_request`, `finished`, `session_start`, `error`, etc.)
98
+
99
+ **Claude agent:**
100
+ - `adapter` — integration method (always `hooks`)
101
+ - `binary` — Claude Code binary name
102
+ - `permission_mode` — how to handle tool permissions
65
103
 
66
- Example:
104
+ Example `~/.tabclaw/config.toml`:
67
105
 
68
106
  ```toml
69
107
  [general]
@@ -74,7 +112,8 @@ hook_server_port = 9876
74
112
  [channel.telegram]
75
113
  enabled = true
76
114
  bot_token = "YOUR_BOT_TOKEN"
77
- allowed_users = [123456789]
115
+ allowed_users = ["123456789"]
116
+ notify_types = ["permission_request", "finished", "session_start", "error"]
78
117
 
79
118
  [agent.claude]
80
119
  adapter = "hooks"
@@ -4231,6 +4231,7 @@ var helpCommand = {
4231
4231
  };
4232
4232
  function generateStaticHelpText() {
4233
4233
  let output = "**TabClaw Bot Commands**\n\n";
4234
+ output += "**/start** - Show welcome message\n\n";
4234
4235
  output += "**/session** - Session management\n";
4235
4236
  output += " `list` [--all] - List all sessions\n";
4236
4237
  output += " `status` <session-id> - Get session details\n";
@@ -4247,8 +4248,33 @@ function generateStaticHelpText() {
4247
4248
  return output;
4248
4249
  }
4249
4250
 
4251
+ // src/core/command/builtin/start.ts
4252
+ init_esm_shims();
4253
+ var startCommand = {
4254
+ description: "Start the bot and show welcome message",
4255
+ usage: "/start",
4256
+ handler: async () => {
4257
+ return `\u{1F44B} **Welcome to TabClaw!**
4258
+
4259
+ I'm your Claude Code monitoring assistant. I'll notify you about:
4260
+ - \u{1F510} Permission requests that need your approval
4261
+ - \u2705 Task completions
4262
+ - \u{1F7E2} Session starts
4263
+ - \u274C Errors
4264
+
4265
+ **Available Commands:**
4266
+ /help - Show all available commands
4267
+ /session list - List active sessions
4268
+ /system status - Check system status
4269
+ /system ping - Test connectivity
4270
+
4271
+ Use the buttons on notifications to approve or deny permission requests.`;
4272
+ }
4273
+ };
4274
+
4250
4275
  // src/core/command/builtin/index.ts
4251
4276
  function registerBuiltinCommands(registry) {
4277
+ registry.register("start", "start", startCommand);
4252
4278
  registry.registerGroup("session", sessionCommands);
4253
4279
  registry.registerGroup("system", systemCommands);
4254
4280
  registry.register("help", "help", helpCommand);