pocket-coding 0.1.0__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.
- pocket_coding-0.1.0.dist-info/METADATA +168 -0
- pocket_coding-0.1.0.dist-info/RECORD +7 -0
- pocket_coding-0.1.0.dist-info/WHEEL +4 -0
- pocket_coding-0.1.0.dist-info/entry_points.txt +2 -0
- poco/__init__.py +4 -0
- poco/app.py +577 -0
- poco/bridge.py +1221 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pocket-coding
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: PoCo: Pocket Coding for Feishu
|
|
5
|
+
Author: PoCo contributors
|
|
6
|
+
Keywords: bot,codex,feishu,lark,tui
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Environment :: Console
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Operating System :: OS Independent
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Topic :: Communications :: Chat
|
|
16
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
17
|
+
Requires-Python: >=3.11
|
|
18
|
+
Requires-Dist: lark-oapi==1.5.3
|
|
19
|
+
Requires-Dist: textual<1,>=0.75
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# PoCo
|
|
23
|
+
|
|
24
|
+
[中文说明](README.zh-CN.md)
|
|
25
|
+
|
|
26
|
+
`PoCo` is the product name. The Python package name is `pocket-coding`.
|
|
27
|
+
|
|
28
|
+
PoCo is a local TUI for running `Codex app-server` behind a Feishu bot.
|
|
29
|
+
|
|
30
|
+
- DM the bot for management
|
|
31
|
+
- Use Feishu groups as project workspaces
|
|
32
|
+
- Run one Codex worker per project group
|
|
33
|
+
- Stream progress back by creating and editing Feishu messages
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
Install:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install pocket-coding
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Or from source:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install .
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Start:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
poco
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
In the TUI:
|
|
56
|
+
|
|
57
|
+
1. Fill in `Feishu App ID` and `App Secret`
|
|
58
|
+
2. Click `Save & Restart`
|
|
59
|
+
3. Add the bot to a project group
|
|
60
|
+
4. In that group, run:
|
|
61
|
+
|
|
62
|
+
```text
|
|
63
|
+
/poco name my-project
|
|
64
|
+
/poco cwd /path/to/project
|
|
65
|
+
/poco mode mention
|
|
66
|
+
/poco enable
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
After that:
|
|
70
|
+
|
|
71
|
+
- DM the bot with `/poco workers` or `/poco status my-project`
|
|
72
|
+
- In the group, use `/poco ...` for PoCo commands
|
|
73
|
+
- In the group, all non-`/poco` text is forwarded to Codex
|
|
74
|
+
|
|
75
|
+
## How It Works
|
|
76
|
+
|
|
77
|
+
- DM with the bot: management console
|
|
78
|
+
- Group chat with the bot: project workspace
|
|
79
|
+
- Each project group gets its own Codex worker process
|
|
80
|
+
- Each group must configure its own working directory before enable
|
|
81
|
+
- PoCo connects to Feishu in long-connection mode, so no public callback URL is required
|
|
82
|
+
|
|
83
|
+
## Commands
|
|
84
|
+
|
|
85
|
+
DM commands:
|
|
86
|
+
|
|
87
|
+
- `/poco help`
|
|
88
|
+
- `/poco workers`
|
|
89
|
+
- `/poco list`
|
|
90
|
+
- `/poco status <worker_alias|group_chat_id>`
|
|
91
|
+
- `/poco stop <worker_alias|group_chat_id>`
|
|
92
|
+
- `/poco reset <worker_alias|group_chat_id>`
|
|
93
|
+
- `/poco remove <worker_alias|group_chat_id>`
|
|
94
|
+
|
|
95
|
+
Group commands:
|
|
96
|
+
|
|
97
|
+
- `/poco help`
|
|
98
|
+
- `/poco mode <mention|auto>`
|
|
99
|
+
- `/poco cwd <path>`
|
|
100
|
+
- `/poco enable`
|
|
101
|
+
- `/poco disable`
|
|
102
|
+
- `/poco reset`
|
|
103
|
+
- `/poco new`
|
|
104
|
+
- `/poco name <alias>`
|
|
105
|
+
- `/poco unname`
|
|
106
|
+
- `/poco status`
|
|
107
|
+
- `/poco stop`
|
|
108
|
+
- `/poco remove`
|
|
109
|
+
|
|
110
|
+
## Feishu Requirements
|
|
111
|
+
|
|
112
|
+
Use a self-built enterprise app, not a custom webhook bot.
|
|
113
|
+
|
|
114
|
+
Required capabilities:
|
|
115
|
+
|
|
116
|
+
- Bot enabled
|
|
117
|
+
- Event subscription: `im.message.receive_v1`
|
|
118
|
+
- Permission to send messages
|
|
119
|
+
- Permission to update messages
|
|
120
|
+
|
|
121
|
+
Recommended:
|
|
122
|
+
|
|
123
|
+
- Long connection mode
|
|
124
|
+
|
|
125
|
+
## TUI
|
|
126
|
+
|
|
127
|
+
Views:
|
|
128
|
+
|
|
129
|
+
- `Dashboard`
|
|
130
|
+
- `Config`
|
|
131
|
+
- `Logs`
|
|
132
|
+
|
|
133
|
+
Top actions:
|
|
134
|
+
|
|
135
|
+
1. `Save & Restart`
|
|
136
|
+
2. `Save Config`
|
|
137
|
+
3. `Dashboard`
|
|
138
|
+
4. `Config`
|
|
139
|
+
5. `Logs`
|
|
140
|
+
6. `Quit`
|
|
141
|
+
|
|
142
|
+
Shortcuts:
|
|
143
|
+
|
|
144
|
+
- `F2`: Dashboard
|
|
145
|
+
- `F3`: Config
|
|
146
|
+
- `F4`: Logs
|
|
147
|
+
- `Ctrl+S`: Save config
|
|
148
|
+
- `Ctrl+R`: Save and restart
|
|
149
|
+
- `q`: Quit
|
|
150
|
+
|
|
151
|
+
## Files
|
|
152
|
+
|
|
153
|
+
- Config: `~/.config/poco/config.json`
|
|
154
|
+
- State: `~/.local/state/poco/`
|
|
155
|
+
|
|
156
|
+
## Development
|
|
157
|
+
|
|
158
|
+
Build packages:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
uv build
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Quick syntax check:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
uv run python -m py_compile poco/__init__.py poco/app.py poco/bridge.py
|
|
168
|
+
```
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
poco/__init__.py,sha256=aZZQKY39Pf4JnwgVBt3hej3kj1cKSEXOpIzQ2redEDQ,69
|
|
2
|
+
poco/app.py,sha256=T3ZlFuWsHFJlL53zfDLLC6sB0CP3j72M4srwBTuUG9I,20675
|
|
3
|
+
poco/bridge.py,sha256=ZWSLRuzb8KC2vghGd16CIO3BUvZZCwteJO_TakhwcXc,48567
|
|
4
|
+
pocket_coding-0.1.0.dist-info/METADATA,sha256=k9to5CVZn6iiFF0QpgDcmmgiUjUHAjwTfqrrBuXZtZ8,3275
|
|
5
|
+
pocket_coding-0.1.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
6
|
+
pocket_coding-0.1.0.dist-info/entry_points.txt,sha256=Mfu9FDLBWS3EOhMH_yO2HRo0dneMP1T6zAG28wwSy6s,39
|
|
7
|
+
pocket_coding-0.1.0.dist-info/RECORD,,
|
poco/__init__.py
ADDED