vibekit-agent 1.0.0

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 ADDED
@@ -0,0 +1,112 @@
1
+ # vibekit-agent
2
+
3
+ Control your local Claude Code from Telegram. Ship code from your phone.
4
+
5
+ **Free to use** - works with your existing Claude Pro/Max subscription.
6
+
7
+ ## Installation
8
+
9
+ ```bash
10
+ npm install -g vibekit-agent
11
+ ```
12
+
13
+ ## Quick Start
14
+
15
+ 1. **Get a link code from Telegram:**
16
+ - Open [@the_vibe_kit_bot](https://t.me/the_vibe_kit_bot)
17
+ - Send `/remote` to get your link code
18
+
19
+ 2. **Link your computer:**
20
+ ```bash
21
+ npx vibekit-agent link
22
+ ```
23
+ Enter the code when prompted.
24
+
25
+ 3. **Start the agent:**
26
+ ```bash
27
+ npx vibekit-agent start
28
+ ```
29
+
30
+ 4. **Send messages via Telegram** - they'll be executed by Claude Code on your machine.
31
+
32
+ ## Features
33
+
34
+ - **Text messages** - Chat naturally, Claude responds
35
+ - **Voice messages** - Send voice notes, Claude listens and responds
36
+ - **Images & screenshots** - Send photos for analysis or debugging
37
+ - **Document uploads** - Share files for Claude to work with
38
+ - **Conversation memory** - Claude remembers context within a session
39
+
40
+ ## Telegram Commands
41
+
42
+ Once connected, use these commands in the bot:
43
+
44
+ | Command | Description |
45
+ |---------|-------------|
46
+ | `/remote` | View status, new chat, disconnect |
47
+ | `/stop` | Cancel running task |
48
+ | `/status` | View connection status |
49
+
50
+ ## Commands
51
+
52
+ | Command | Description |
53
+ |---------|-------------|
54
+ | `vibekit-agent link` | Link this computer to your Telegram account |
55
+ | `vibekit-agent start` | Start the remote agent |
56
+ | `vibekit-agent start -d /path/to/project` | Start in a specific directory |
57
+ | `vibekit-agent status` | Show connection status |
58
+ | `vibekit-agent logout` | Remove stored credentials |
59
+ | `vibekit-agent config` | View current configuration |
60
+
61
+ ## Tool Permissions
62
+
63
+ By default, the agent runs with a safe set of read-only tools. You can configure which tools Claude Code can use:
64
+
65
+ ```bash
66
+ # View current tools
67
+ vibekit-agent config
68
+
69
+ # Set specific tools
70
+ vibekit-agent config --tools "WebSearch,Bash,Read,Write,Edit"
71
+
72
+ # Reset to safe defaults
73
+ vibekit-agent config --reset-tools
74
+
75
+ # Enable all tools (use with caution)
76
+ vibekit-agent config --all-tools
77
+ ```
78
+
79
+ **Default safe tools:** WebSearch, WebFetch, Read, Glob, Grep
80
+
81
+ **Available tools:** WebSearch, WebFetch, Bash, Read, Write, Edit, Glob, Grep
82
+
83
+ ## How It Works
84
+
85
+ 1. The agent runs on your local machine
86
+ 2. It connects to VibeKit's server via WebSocket
87
+ 3. When you send a message via Telegram, it's relayed to your local agent
88
+ 4. Claude Code executes the request and sends results back to Telegram
89
+
90
+ ## Requirements
91
+
92
+ - Node.js 18+
93
+ - Claude Code CLI installed (`npm install -g @anthropic-ai/claude-code`)
94
+ - A VibeKit account (free to start)
95
+
96
+ ## Troubleshooting
97
+
98
+ **"No token found"** - Run `vibekit-agent link` first
99
+
100
+ **"Connection lost"** - Check your internet connection and restart with `vibekit-agent start`
101
+
102
+ **"Claude Code not found"** - Install Claude Code: `npm install -g @anthropic-ai/claude-code`
103
+
104
+ ## Links
105
+
106
+ - [VibeKit Website](https://vibekit.dev)
107
+ - [Telegram Bot](https://t.me/the_vibe_kit_bot)
108
+ - [GitHub](https://github.com/609NFT/vibekit)
109
+
110
+ ## License
111
+
112
+ MIT
@@ -0,0 +1,105 @@
1
+ import { Config } from './config';
2
+ export declare class AgentClient {
3
+ private config;
4
+ private ws;
5
+ private claudeProcess;
6
+ private reconnectTimeout;
7
+ private reconnectDelay;
8
+ private isConnected;
9
+ private currentChatId;
10
+ private currentTelegramId;
11
+ private currentReplyToMessageId;
12
+ private outputBuffer;
13
+ private streamingInterval;
14
+ private lastFlushedLength;
15
+ private currentMessageId;
16
+ private workingDirectory;
17
+ private hasActiveConversation;
18
+ constructor(config: Config);
19
+ /**
20
+ * Link this computer to a Telegram account
21
+ */
22
+ link(): Promise<void>;
23
+ /**
24
+ * Start the agent and connect to VibeKit
25
+ */
26
+ start(directory: string, autoMode?: boolean): Promise<void>;
27
+ /**
28
+ * Run claude command with the given prompt
29
+ */
30
+ private runClaude;
31
+ /**
32
+ * Start streaming interval to send partial output
33
+ */
34
+ private startStreaming;
35
+ /**
36
+ * Stop streaming interval
37
+ */
38
+ private stopStreaming;
39
+ /**
40
+ * Flush partial output if buffer has grown since last flush
41
+ */
42
+ private flushPartialOutput;
43
+ /**
44
+ * Flush final buffered output to Telegram
45
+ */
46
+ private flushOutput;
47
+ /**
48
+ * Connect to VibeKit WebSocket server
49
+ */
50
+ private connect;
51
+ /**
52
+ * Handle incoming WebSocket messages
53
+ */
54
+ private handleMessage;
55
+ /**
56
+ * Handle user message from Telegram
57
+ */
58
+ private handleUserMessage;
59
+ /**
60
+ * Save attachments to temp directory and return file paths
61
+ */
62
+ private saveAttachments;
63
+ /**
64
+ * Handle new conversation command - reset conversation memory
65
+ */
66
+ private handleNewConversation;
67
+ /**
68
+ * Handle change directory command
69
+ */
70
+ private handleCdCommand;
71
+ /**
72
+ * Send streaming update to Telegram
73
+ */
74
+ private sendStreaming;
75
+ /**
76
+ * Send a response back to Telegram
77
+ */
78
+ private sendResponse;
79
+ /**
80
+ * Send status update
81
+ */
82
+ private sendStatus;
83
+ /**
84
+ * Send a message to the WebSocket
85
+ */
86
+ private send;
87
+ /**
88
+ * Schedule reconnection
89
+ */
90
+ private scheduleReconnect;
91
+ /**
92
+ * Generate a unique message ID
93
+ */
94
+ private generateId;
95
+ /**
96
+ * Shutdown the agent
97
+ */
98
+ private shutdown;
99
+ /**
100
+ * Set up Claude credentials for auto mode
101
+ * In auto mode, credentials come from CLAUDE_OAUTH_JSON env var or credentials file
102
+ */
103
+ private setupAutoModeCredentials;
104
+ }
105
+ //# sourceMappingURL=agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent.d.ts","sourceRoot":"","sources":["../src/agent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