vibego 0.2.58__py3-none-any.whl → 1.0.10__py3-none-any.whl

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.
@@ -0,0 +1,226 @@
1
+ Metadata-Version: 2.4
2
+ Name: vibego
3
+ Version: 1.0.10
4
+ Summary: vibego CLI: tools for bootstrapping and managing the Telegram Master Bot
5
+ Author: DavidChan
6
+ License-Expression: LicenseRef-Proprietary
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.11
9
+ Classifier: Operating System :: MacOS
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Software Development :: Build Tools
12
+ Classifier: Environment :: Console
13
+ Requires-Python: >=3.11
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: aiogram<4.0.0,>=3.0.0
17
+ Requires-Dist: aiohttp-socks>=0.10.0
18
+ Requires-Dist: aiosqlite>=0.19.0
19
+ Requires-Dist: markdown-it-py<4.0.0,>=3.0.0
20
+ Dynamic: license-file
21
+
22
+ # vibego - vibe coding via Telegram anytime, anywhere
23
+
24
+ **Drive your terminal AI CLI via Telegram anytime and anywhere (supports Codex / ClaudeCode)**
25
+
26
+ For the Simplified Chinese version, see [中文文档](README-zh.md).
27
+
28
+ ## Features
29
+
30
+ 1. Control your terminal AI CLI through Telegram whenever you need it.
31
+ 2. Capture lightweight task management and bug reports directly inside Telegram.
32
+ 3. Switch between Codex / ClaudeCode terminal CLIs in one tap from Telegram.
33
+ 4. Send commands over the HTTPS channel provided by the Telegram Bot API, protected by end‑to‑end TLS.
34
+ 5. Keep runtime logs and state files under `~/.config/vibego/` so sensitive data never leaves the machine.
35
+
36
+ ## Environment Requirements
37
+
38
+ **The terminal environment has installed and login in codex / claudeCode**
39
+ ```bash
40
+ brew install python@3.11 tmux
41
+ python3 -m venv ~/.config/vibego/runtime/venv
42
+ source ~/.config/vibego/runtime/venv/bin/activate
43
+ ```
44
+
45
+ ## Quick Start
46
+
47
+ ### Create and retrieve a Telegram bot token
48
+
49
+ Use the official Telegram BotFather guide (<https://core.telegram.org/bots#botfather>):
50
+
51
+ 1. Search for `@BotFather` in the Telegram client and start a chat.
52
+ 2. Send `/start`, then `/newbot`, and follow the prompts for bot name and username.
53
+ 3. BotFather returns an HTTP API token resembling `123456789:ABC...`; store it safely.
54
+ 4. To regenerate or reset the token, send `/token` in the same chat and pick the bot.
55
+
56
+ ### Install and start vibego
57
+
58
+ Before continuing, make sure Codex / ClaudeCode CLIs are installed and logged in, and that you have a Telegram bot token
59
+ ready.
60
+
61
+ - Consider merging the contents of [AGENTS-en.md](AGENTS-en.md) into your `$HOME/.codex/AGENTS.md` or
62
+ `$HOME/.claude/CLAUDE.md`.
63
+
64
+ ```bash
65
+ pipx install vibego # or pip install --user vibego
66
+ vibego init # initialise the config directory and persist the Master Bot Token
67
+ vibego start # start the master service
68
+ ```
69
+
70
+ Then click on `/start` in the bot created by Telegram ,Enjoy it!
71
+
72
+ ## Directory Layout
73
+
74
+ - `bot.py`: aiogram 3 worker that supports multiple model sessions (Codex / ClaudeCode / reserved Gemini).
75
+ - `scripts/run_bot.sh`: one-click bootstrap (builds venv, starts tmux + model CLI + bot).
76
+ - `scripts/stop_bot.sh`: terminates the worker for a project (tmux session + bot process).
77
+ - `scripts/start_tmux_codex.sh`: low-level tmux/CLI launcher invoked by `run_bot.sh`, forces UTF‑8 via `tmux -u`.
78
+ - `scripts/models/`: model configuration modules (`common.sh` / `codex.sh` / `claudecode.sh` / `gemini.sh`).
79
+ - `logs/<model>/<project>/`: runtime logs (`run_bot.log`, `model.log`, `bot.pid`, `current_session.txt`), defaulted to
80
+ `~/.config/vibego/logs/`.
81
+ - `model.log` is rotated by `scripts/log_writer.py`, with 20 MB cap per file and 24-hour retention (override via
82
+ `MODEL_LOG_MAX_BYTES`, `MODEL_LOG_RETENTION_SECONDS`).
83
+ - `.env.example`: configuration template to copy to `.env` and adjust.
84
+
85
+ ## Logs & Directories
86
+
87
+ ```
88
+ ~/.config/vibego/logs/
89
+ └─ codex/
90
+ └─ mall-backend/
91
+ ├─ run_bot.log # output from run_bot.sh
92
+ ├─ model.log # model CLI output captured through tmux pipe-pane
93
+ ├─ bot.pid # current bot process PID (used by stop_bot.sh)
94
+ └─ current_session.txt # pointer to the latest JSONL session
95
+ ```
96
+
97
+ > Starting in 2025, all logs, databases, and state files default to `~/.config/vibego/`. Use
98
+ `./scripts/migrate_runtime.sh` to migrate legacy files created inside the repository back into the runtime directory.
99
+
100
+ ## Model Switching
101
+
102
+ - Supported model parameters: `codex`, `claudecode`, `gemini` (placeholder).
103
+ - Switch flow: `stop_bot.sh --model <old>` → `run_bot.sh --model <new>`.
104
+ - Each model keeps an isolated configuration in `scripts/models/<model>.sh`; shared logic lives in
105
+ `scripts/models/common.sh`.
106
+ - `ACTIVE_MODEL` is echoed in `/start` replies and logs, and exported to the environment for `bot.py`.
107
+
108
+ ### Codex
109
+
110
+ | Variable | Description |
111
+ |----------------------|----------------------------------------------------------------------------------|
112
+ | `CODEX_WORKDIR` | Codex CLI working directory (defaults to the value in `.env` or repository root) |
113
+ | `CODEX_CMD` | Launch command, default `codex --dangerously-bypass-...` |
114
+ | `CODEX_SESSION_ROOT` | JSONL root directory (default `~/.codex/sessions`) |
115
+ | `CODEX_SESSION_GLOB` | JSONL file pattern (default `rollout-*.jsonl`) |
116
+
117
+ ### ClaudeCode
118
+
119
+ | Variable | Description |
120
+ |-----------------------|--------------------------------------------------------------|
121
+ | `CLAUDE_WORKDIR` | Project directory (defaults to the same value used by Codex) |
122
+ | `CLAUDE_CMD` | CLI launch command, for example `claude --project <path>` |
123
+ | `CLAUDE_PROJECT_ROOT` | JSONL root directory (default `~/.claude/projects`) |
124
+ | `CLAUDE_SESSION_GLOB` | JSONL file pattern (default `*.jsonl`) |
125
+ | `CLAUDE_PROJECT_KEY` | Optional: explicitly set `~/.claude/projects/<key>` |
126
+
127
+ ### Gemini (placeholder)
128
+
129
+ - `scripts/models/gemini.sh` currently contains a placeholder command to be expanded once the official CLI is available.
130
+
131
+ ## aiogram Worker Behaviour
132
+
133
+ - `/start`: returns `chat_id`, `MODE`, and `ACTIVE_MODEL`; logs record `chat_id` and `user_id`.
134
+ - Text messages:
135
+ 1. Pick the `SessionAdapter` based on `ACTIVE_MODEL`, read `current_session.txt`, and search `MODEL_SESSION_ROOT` if
136
+ necessary.
137
+ 2. Inject the prompt into tmux (send `Esc` to clear modes, `Ctrl+J` for newline, `Enter` to submit).
138
+ 3. Initialise offsets from `SESSION_OFFSETS`; `_deliver_pending_messages()` streams tail updates from the JSONL log.
139
+ 4. During the watcher phase, the bot informs the user the `ACTIVE_MODEL` is processing and pushes the result once
140
+ ready (Markdown preserved).
141
+ - MODE = A still honours `AGENT_CMD` for direct CLI execution.
142
+
143
+ ## New Scripts
144
+
145
+ - `run_bot.sh`
146
+ - `--model <name>`: codex / claudecode / gemini.
147
+ - `--project <slug>`: directory name for logs/sessions; defaults to a slug derived from the working directory.
148
+ - `--foreground`: keep the process in the foreground (default: background via `nohup`).
149
+ - `--no-stop`: skip the pre-launch stop step (defaults to invoking `stop_bot.sh` for idempotency).
150
+ - `stop_bot.sh`
151
+ - Idempotent stop: issues `tmux kill-session`, terminates the process from `bot.pid`, and clears cached files.
152
+ - Example: `./scripts/stop_bot.sh --model codex --project mall-backend`.
153
+
154
+ ## Configuration Highlights
155
+
156
+ ### `.env` (master global configuration)
157
+
158
+ - Location: `~/.config/vibego/.env` (override with `VIBEGO_CONFIG_DIR`).
159
+ - `MASTER_BOT_TOKEN`: token for the master bot; collected by `vibego init` and required for startup.
160
+ - `MASTER_CHAT_ID` / `MASTER_USER_ID`: captured automatically the first time you interact with the master in Telegram to
161
+ mark authorised admins.
162
+ - `MASTER_WHITELIST`: comma-separated list of chat IDs. Leave empty to allow any chat; latest value always wins if auto
163
+ updates occur.
164
+ - You can add optional variables for proxies, log level, default model, etc. Scripts fall back to sensible defaults if
165
+ unspecified.
166
+
167
+ - Project definitions persist in `~/.config/vibego/config/master.db` (SQLite) with a JSON mirror at
168
+ `~/.config/vibego/config/projects.json`. For offline edits, use the `config/projects.json.example` template in the
169
+ repository.
170
+ - The master “⚙️ Project Management” menu can create/edit/delete projects; offline JSON edits are imported at startup
171
+ and synced to the database.
172
+ - Required fields: `bot_name`, `bot_token`, `project_slug`, `default_model`.
173
+ - Optional fields: `workdir` (project path), `allowed_chat_id` (pre-authorised chat). Leave blank to let the worker
174
+ capture the first valid chat and persist it to `~/.config/vibego/state/master_state.json`.
175
+ - Other custom fields are currently ignored.
176
+
177
+ ### Automatic Authorisation & State
178
+
179
+ - If `allowed_chat_id` is empty when the worker starts, the first authorised message writes to `state/state.json` and is
180
+ applied immediately.
181
+ - Master restarts: call `stop_bot.sh` first, then restore running projects from the saved state.
182
+
183
+ ## Roadmap
184
+
185
+ - Master bot will poll all project bots and invoke run/stop scripts to orchestrate workers; current version ships the
186
+ worker layout and logging standard first.
187
+ - Gemini CLI support will be added once an official integration path is available.
188
+
189
+ ## Notes
190
+
191
+ - `~/.config/vibego/.env` stores sensitive tokens and admin metadata—never commit it.
192
+ - To trim log size, clean up `logs/<model>/<project>/` as needed or adjust script thresholds.
193
+ - If you previously ran an old source checkout, run `./scripts/migrate_runtime.sh` and ensure only `.example` templates
194
+ remain in the repository to avoid committing databases or logs.
195
+ - The master caches version checks and reminds you once per release; rerun `/projects` or restart the master to force a
196
+ new check.
197
+
198
+ ## Master Control
199
+
200
+ - Launch the admin bot with `MASTER_BOT_TOKEN` (running `python master.py`).
201
+ - Master stores the project list in `~/.config/vibego/config/master.db`; use the project management menu or edit
202
+ `~/.config/vibego/config/projects.json` directly. Key fields:
203
+ - `bot_name`: Telegram bot username (with or without `@`; CLI adds `@` when displaying).
204
+ - `bot_token`: Telegram token for the worker.
205
+ - `default_model`: default model (codex / claudecode / gemini).
206
+ - `project_slug`: directory/log slug.
207
+ - `workdir`: project working directory (optional).
208
+ - `allowed_chat_id`: authorised chat injected into the runtime environment.
209
+ - State snapshot: `~/.config/vibego/state/master_state.json` records the active model and running status for each
210
+ project. On restart the master calls `stop_bot.sh`, then restores workers according to the state file.
211
+
212
+ ### Management Commands
213
+
214
+ | Command | Description |
215
+ |-----------------------------|-----------------------------------------------------------------------------|
216
+ | `/projects` | List all projects with their current status and model. |
217
+ | `/run <project> [model]` | Start a project worker; optional `model` overrides the default/current one. |
218
+ | `/stop <project>` | Stop the project worker. |
219
+ | `/switch <project> <model>` | Stop the worker and relaunch it with a new model. |
220
+ | `/start` | Show help and the total number of projects. |
221
+ | `/upgrade` | Run `pipx upgrade vibego && vibego stop && vibego start` to self-upgrade. |
222
+
223
+ - `<project>` accepts either the `project_slug` or `@bot_name`. Responses automatically render clickable `@` links.
224
+
225
+ > The master only interacts with the admin bot. Project bots continue to handle business traffic through the worker (
226
+ `bot.py`) launched by `run_bot.sh`.
@@ -1,19 +1,20 @@
1
- bot.py,sha256=LeIW6qALoSPlO38DgebRS5vNimxI89ihV4PtrBQzNy0,291820
2
- logging_setup.py,sha256=gvxHi8mUwK3IhXJrsGNTDo-DR6ngkyav1X-tvlBF_IE,4613
3
- master.py,sha256=Jwxf6I94jOADzb9Xio1wb-tWy5wgQ9PlmdpKW4mhQMg,117114
4
- project_repository.py,sha256=UcthtSGOJK0cTE5bQCneo3xkomRG-kyc1N1QVqxeHIs,17577
5
- scripts/__init__.py,sha256=LVrXUkvWKoc6Sb47X5G0gbIxu5aJ2ARW-qJ14vwi5vM,65
6
- scripts/bump_version.sh,sha256=a4uB8V8Y5LPsoqTCdzQKsEE8HhwpBmqRaQInG52LDig,4089
7
- scripts/log_writer.py,sha256=8euoMlRo7cbtHApbcEoJnwzLABxti-ovJWFLRN1oDQw,3843
8
- scripts/master_healthcheck.py,sha256=kvE6owdqyLmfQ-UYY_jglg86xFzOc87sINxBe5_qWzk,8489
9
- scripts/publish.sh,sha256=ehLfMedcXuGKJ87jpZy3kuiFszG9Cpavp3zXPfR4h-g,3511
10
- scripts/requirements.txt,sha256=ukJbFLJyzqnQYMz6j07O-IOrG87IwXg0oikmn1nfJ9M,91
11
- scripts/run_bot.sh,sha256=rN4K1nz041XBaUJmnBBKHS2cHmQf11vPNX8wf1hbVR4,4596
12
- scripts/start.sh,sha256=Sg6EUkQlRzex-B4fhHXSCNQtLsls_0Yh8nejLY3uEUU,14197
13
- scripts/start_tmux_codex.sh,sha256=xyLv29p924q-ysxvZYAP3T6VrqLPBPMBWo9QP7cuL50,4438
14
- scripts/stop_all.sh,sha256=VbNX4h8g1RcnGmLyutPcSySTHb84eIMbo3Ve9Vh-CDg,4360
15
- scripts/stop_bot.sh,sha256=ot6Sm0IYoXuRNslUVEflQmJKu5Agm-5xIUXXudJWyTM,5588
16
- scripts/test_deps_check.sh,sha256=AeSTucbNuNdOPSGvqVp0m31TVFDb0DmU8gSKg-Y5z2I,1696
1
+ bot.py,sha256=bQ-tadaS-CX9699JhO6wtgBeAiXZsbb21GDRAusXJiQ,300928
2
+ logging_setup.py,sha256=ViXK11TNVakIbA8QMLKXa6ywpAV_j1ydcws0Hx2QqNo,5084
3
+ master.py,sha256=bpcqGsUpk8kHW8sqD6QG6ss-5LGO1OsQ7zsdvkgDJ3E,132763
4
+ project_repository.py,sha256=fdO3xzvt7eBLvek_3mXjXkFpALwllrNWDWeSjtscW2I,17675
5
+ scripts/__init__.py,sha256=Sg-nUv9JfbojPpjpHlxImt6tA0p5-z1AqDA6csaFNZI,74
6
+ scripts/bump_version.sh,sha256=bAV-NHTSmqnjrsHjvrNTF3wS2rxhF-lZ5h5kpK2-Zyc,4462
7
+ scripts/log_writer.py,sha256=65HGLPREiBL1b4QRiMdxGmHfT21WBEUvg9RuCjP73Kc,3957
8
+ scripts/master_healthcheck.py,sha256=7uCCuKeyE70SjzWbT_ILxng3OUY1As2A0AeyGSOcaUg,4009
9
+ scripts/publish.sh,sha256=e3tzRFtweJnLpJin0i43xpCWseX4jzeO2sAd2eGcTKk,3686
10
+ scripts/requirements.txt,sha256=slmiARPzUg-75zfi2h_a-JiBXArTokKjg2o4yTmdMlA,107
11
+ scripts/run_bot.sh,sha256=palEshZaHTYwWRBgRN6pMOiU69dta430yQP9_gUaQxI,5362
12
+ scripts/session_pointer_watch.py,sha256=IvOTTj-i_3rFA2J4pmsCI1iUM9n64Z5tHYw_-2syhKo,9285
13
+ scripts/start.sh,sha256=nqJHO9iJ-OHbLMaLxAyycRT0o1rprrzSVNwQV4QEphA,16350
14
+ scripts/start_tmux_codex.sh,sha256=NfIHi23ASQYDyX_2NMX47TuM3K95QaplhpVfOYzJRDo,5836
15
+ scripts/stop_all.sh,sha256=bvl3--jNnXLt9xUrzPqXt8SWUNLAKTELwlMArU5-8gU,4400
16
+ scripts/stop_bot.sh,sha256=1pI8hxQRIWJTOCLXddWMOmsnk3XIkuAlQwF9mPqRW_k,6163
17
+ scripts/test_deps_check.sh,sha256=_g-xYY_VSaqe8xk7OPw33aKJrUqwJxB8hJf0bcF5cp0,2112
17
18
  scripts/.venv/lib/python3.14/site-packages/pip/__init__.py,sha256=_lgs5Mfp0t7AGtI7sTVwxKWquz_vahWWH9kKO1cJusA,353
18
19
  scripts/.venv/lib/python3.14/site-packages/pip/__main__.py,sha256=WzbhHXTbSE6gBY19mNN9m4s5o_365LOvTYSgqgbdBhE,854
19
20
  scripts/.venv/lib/python3.14/site-packages/pip/__pip-runner__.py,sha256=JOoEZTwrtv7jRaXBkgSQKAE04yNyfFmGHxqpHiGHvL0,1450
@@ -416,24 +417,25 @@ scripts/.venv/lib/python3.14/site-packages/pip/_vendor/urllib3/util/ssltransport
416
417
  scripts/.venv/lib/python3.14/site-packages/pip/_vendor/urllib3/util/timeout.py,sha256=cwq4dMk87mJHSBktK1miYJ-85G-3T3RmT20v7SFCpno,10168
417
418
  scripts/.venv/lib/python3.14/site-packages/pip/_vendor/urllib3/util/url.py,sha256=lCAE7M5myA8EDdW0sJuyyZhVB9K_j38ljWhHAnFaWoE,14296
418
419
  scripts/.venv/lib/python3.14/site-packages/pip/_vendor/urllib3/util/wait.py,sha256=fOX0_faozG2P7iVojQoE1mbydweNyTcm-hXEfFrTtLI,5403
419
- scripts/models/claudecode.sh,sha256=k8153NH6O925VvhXh2rywVRje9CyUyIurn42EetZHEI,1526
420
- scripts/models/codex.sh,sha256=_vp-v4L4eNz20JC2JIw1npE0Qz-HBUpdzyxLAtqridU,457
421
- scripts/models/common.sh,sha256=Xx6BaVqWSxpZUUHf6s6u_rkfbNts0UePeA9J9uoC_HA,2168
422
- scripts/models/gemini.sh,sha256=0fychnJL4uQJ1_wuc8O2sAQ4K0q3v7_Ku_9EOgUdocI,449
423
- tasks/__init__.py,sha256=8BLrjQDC5oQg_VL7u41jWZXgStVaM348sosB7klqqiw,260
424
- tasks/commands.py,sha256=WBf7-_t4kfI04jhFZHlgqYdQmiPZNdvw0I0OURLZR-k,1556
425
- tasks/constants.py,sha256=tS1kZxBIUm3JJUMHm25XI-KHNUZl5NhbbuzjzL_rF-c,299
426
- tasks/fsm.py,sha256=rKXXLEieQQU4r2z_CZUvn1_70FXiZXBBugF40gpe_tQ,1476
427
- tasks/models.py,sha256=N_qqRBo9xMSV0vbn4k6bLBXT8C_dp_oTFUxvdx16ZQM,2459
428
- tasks/service.py,sha256=w_S_aWiVqRXzXEpimLDsuCCCX2lB5uDkff9aKThBw9c,41916
429
- vibego_cli/__init__.py,sha256=Dq3Z2BpT6XWvQnGANbkzO3FY4VRtqY6CVwc_o3cjB1I,311
430
- vibego_cli/__main__.py,sha256=qqTrYmRRLe4361fMzbI3-CqpZ7AhTofIHmfp4ykrrBY,158
431
- vibego_cli/config.py,sha256=VxkPJMq01tA3h3cOkH-z_tiP7pMgfSGGicRvUnCWkhI,3054
432
- vibego_cli/deps.py,sha256=1nRXI7Dd-S1hYE8DligzK5fIluQWETRUj4_OKL0DikQ,1419
433
- vibego_cli/main.py,sha256=X__NXwZnIDIFbdKSTbNyZgZHKcPlN0DQz9sqTI1aQ9E,12158
420
+ scripts/models/claudecode.sh,sha256=vTaI3-cTlh1QROcL7s-_oopypxgIXYN2Q7oyVH8fMEI,1566
421
+ scripts/models/codex.sh,sha256=tAYITrwUFZ9Vv0gPj_CeTt4QtsfnoTO1L1UYawGx_34,464
422
+ scripts/models/common.sh,sha256=n5XF11spvR10gv9Oie1rCZ9JowtgDJn5nJraw9zKjfo,2674
423
+ scripts/models/gemini.sh,sha256=8MGxlshmBCz87yL7fDbRP0MGDa3fIFBpwKGiEomM0J8,473
424
+ tasks/__init__.py,sha256=IX9KyAQK6VUQxFsHo51w4eWn84k9aM4c9KfC-kOg8N8,269
425
+ tasks/commands.py,sha256=vgFoSyTGyppn84it5vZ5H43RGzT-AQCkhrEQj04hYf8,1598
426
+ tasks/constants.py,sha256=BNMxSnswF-PTij-p7paMK0G5Tj6wKN-6qpUlMwo1JQA,318
427
+ tasks/fsm.py,sha256=6n0hdFNF3j6ZUcpdJ_TwZBgkrE8aMYHNLHppdGbXGO4,1494
428
+ tasks/models.py,sha256=3OJL3F3nVZIQIejL6LplZkPQxYJXgOhCNA9Rikg8ihk,2461
429
+ tasks/service.py,sha256=rzd2v3kZaRpTi54cEAg2GJbeg45VTufC8bGSL1nGJWc,40115
430
+ vibego-1.0.10.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
431
+ vibego_cli/__init__.py,sha256=FPYqYQIBrm5aP_ujpHbtBhSFUsvBDlKfE0fD-RdZFAo,350
432
+ vibego_cli/__main__.py,sha256=lM_m-i1x3yVNQhzRt8wqvuIYeeo1OlLNAEVoJVD7tmw,155
433
+ vibego_cli/config.py,sha256=W-n5y4CTrRpencadWlmhpdrhUHX6tdXQEGXJG1pRM0U,3149
434
+ vibego_cli/deps.py,sha256=nFT-DMsfAiD1lLFnDotxe6aYfeeD9V5TrIPbIbAMTF4,1478
435
+ vibego_cli/main.py,sha256=CZAUHWr45GzzEfALoLuSrnvG2VUuCexiFuCpIvyH8Jc,12506
434
436
  vibego_cli/data/worker_requirements.txt,sha256=QSt30DSSSHtfucTFPpc7twk9kLS5rVLNTcvDiagxrZg,62
435
- vibego-0.2.58.dist-info/METADATA,sha256=eC-iJRkEcX9xYV5rYvrGPlOVaxXaDHsIXHzBFPpwtgE,10519
436
- vibego-0.2.58.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
437
- vibego-0.2.58.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
438
- vibego-0.2.58.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
439
- vibego-0.2.58.dist-info/RECORD,,
437
+ vibego-1.0.10.dist-info/METADATA,sha256=gnkCSgLPXn8SwqS3DpNp4G8rIdrXxXZPvy3kRkVrHLI,11901
438
+ vibego-1.0.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
439
+ vibego-1.0.10.dist-info/entry_points.txt,sha256=Lsy_zm-dlyxt8-9DL9blBReIwU2k22c8-kifr46ND1M,48
440
+ vibego-1.0.10.dist-info/top_level.txt,sha256=R56CT3nW5H5v3ce0l3QDN4-C4qxTrNWzRTwrxnkDX4U,69
441
+ vibego-1.0.10.dist-info/RECORD,,
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
vibego_cli/__init__.py CHANGED
@@ -1,12 +1,13 @@
1
- """vibego CLI 初始化与启动工具。
1
+ """vibego CLI bootstrap utilities.
2
2
 
3
- 该包提供 `vibego` 命令的核心实现,封装了配置目录管理、
4
- 依赖自检以及 master 服务启动/停止逻辑。"""
3
+ The package exposes the core implementation behind the ``vibego`` command,
4
+ including configuration directory management, dependency checks, and master
5
+ service lifecycle helpers."""
5
6
 
6
7
  from __future__ import annotations
7
8
 
8
9
  __all__ = ["main", "__version__"]
9
10
 
10
- __version__ = "0.2.58"
11
+ __version__ = "1.0.10"
11
12
 
12
13
  from .main import main # noqa: E402
vibego_cli/__main__.py CHANGED
@@ -1,4 +1,4 @@
1
- """允许通过 `python -m vibego_cli` 直接调用 CLI。"""
1
+ """Allow executing the CLI via ``python -m vibego_cli``."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -6,4 +6,3 @@ from . import main
6
6
 
7
7
  if __name__ == "__main__":
8
8
  main()
9
-
vibego_cli/config.py CHANGED
@@ -1,4 +1,4 @@
1
- """vibego CLI 通用配置与路径解析工具。"""
1
+ """Shared configuration and path utilities for the vibego CLI."""
2
2
 
3
3
  from __future__ import annotations
4
4
 
@@ -10,10 +10,10 @@ from typing import Dict
10
10
 
11
11
 
12
12
  def _default_config_root() -> Path:
13
- """计算默认配置根目录,遵循 XDG Base Directory 规范。
13
+ """Return the default configuration root following the XDG Base Directory spec.
14
14
 
15
- 优先读取环境变量 `VIBEGO_CONFIG_DIR`,否则采用
16
- `~/.config/vibego`。
15
+ The function prefers the ``VIBEGO_CONFIG_DIR`` environment variable and falls
16
+ back to ``~/.config/vibego`` when not provided.
17
17
  """
18
18
 
19
19
  override = os.environ.get("VIBEGO_CONFIG_DIR")
@@ -44,7 +44,7 @@ LOG_FILE: Path = LOG_DIR / "vibe.log"
44
44
 
45
45
 
46
46
  def ensure_worker_requirements_copy() -> Path:
47
- """确保运行目录内存在 worker 依赖清单副本并返回其路径。"""
47
+ """Ensure the runtime directory contains a fresh copy of worker dependencies."""
48
48
 
49
49
  source = resources.files("vibego_cli").joinpath("data/worker_requirements.txt")
50
50
  target = RUNTIME_DIR / "worker_requirements.txt"
@@ -57,14 +57,14 @@ def ensure_worker_requirements_copy() -> Path:
57
57
 
58
58
 
59
59
  def ensure_directories() -> None:
60
- """保证 CLI 运行所需的目录全部存在。"""
60
+ """Create every directory required by the CLI if it does not exist."""
61
61
 
62
62
  for path in (CONFIG_ROOT, CONFIG_DIR, LOG_DIR, STATE_DIR, DATA_DIR, RUNTIME_DIR):
63
63
  path.mkdir(parents=True, exist_ok=True)
64
64
 
65
65
 
66
66
  def parse_env_file(path: Path) -> Dict[str, str]:
67
- """解析简单的 KEY=VALUE 形式的 .env 文件。"""
67
+ """Parse a simple ``KEY=VALUE`` style ``.env`` file."""
68
68
 
69
69
  if not path.exists():
70
70
  return {}
@@ -81,12 +81,12 @@ def parse_env_file(path: Path) -> Dict[str, str]:
81
81
 
82
82
 
83
83
  def dump_env_file(path: Path, values: Dict[str, str]) -> None:
84
- """写入 .env 文件,确保文件权限为 600"""
84
+ """Write a ``.env`` file and enforce permission ``600`` when possible."""
85
85
 
86
86
  lines = [f"{key}={value}" for key, value in sorted(values.items())]
87
87
  path.write_text("\n".join(lines) + "\n", encoding="utf-8")
88
88
  try:
89
89
  path.chmod(stat.S_IRUSR | stat.S_IWUSR)
90
90
  except PermissionError:
91
- # 在部分平台(例如 Windows)可能无法调整权限,忽略即可。
91
+ # Some platforms (e.g., Windows) may not allow chmod; ignore the failure.
92
92
  pass