pocket-coding 0.1.0__tar.gz

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,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,147 @@
1
+ # PoCo
2
+
3
+ [中文说明](README.zh-CN.md)
4
+
5
+ `PoCo` is the product name. The Python package name is `pocket-coding`.
6
+
7
+ PoCo is a local TUI for running `Codex app-server` behind a Feishu bot.
8
+
9
+ - DM the bot for management
10
+ - Use Feishu groups as project workspaces
11
+ - Run one Codex worker per project group
12
+ - Stream progress back by creating and editing Feishu messages
13
+
14
+ ## Quick Start
15
+
16
+ Install:
17
+
18
+ ```bash
19
+ pip install pocket-coding
20
+ ```
21
+
22
+ Or from source:
23
+
24
+ ```bash
25
+ pip install .
26
+ ```
27
+
28
+ Start:
29
+
30
+ ```bash
31
+ poco
32
+ ```
33
+
34
+ In the TUI:
35
+
36
+ 1. Fill in `Feishu App ID` and `App Secret`
37
+ 2. Click `Save & Restart`
38
+ 3. Add the bot to a project group
39
+ 4. In that group, run:
40
+
41
+ ```text
42
+ /poco name my-project
43
+ /poco cwd /path/to/project
44
+ /poco mode mention
45
+ /poco enable
46
+ ```
47
+
48
+ After that:
49
+
50
+ - DM the bot with `/poco workers` or `/poco status my-project`
51
+ - In the group, use `/poco ...` for PoCo commands
52
+ - In the group, all non-`/poco` text is forwarded to Codex
53
+
54
+ ## How It Works
55
+
56
+ - DM with the bot: management console
57
+ - Group chat with the bot: project workspace
58
+ - Each project group gets its own Codex worker process
59
+ - Each group must configure its own working directory before enable
60
+ - PoCo connects to Feishu in long-connection mode, so no public callback URL is required
61
+
62
+ ## Commands
63
+
64
+ DM commands:
65
+
66
+ - `/poco help`
67
+ - `/poco workers`
68
+ - `/poco list`
69
+ - `/poco status <worker_alias|group_chat_id>`
70
+ - `/poco stop <worker_alias|group_chat_id>`
71
+ - `/poco reset <worker_alias|group_chat_id>`
72
+ - `/poco remove <worker_alias|group_chat_id>`
73
+
74
+ Group commands:
75
+
76
+ - `/poco help`
77
+ - `/poco mode <mention|auto>`
78
+ - `/poco cwd <path>`
79
+ - `/poco enable`
80
+ - `/poco disable`
81
+ - `/poco reset`
82
+ - `/poco new`
83
+ - `/poco name <alias>`
84
+ - `/poco unname`
85
+ - `/poco status`
86
+ - `/poco stop`
87
+ - `/poco remove`
88
+
89
+ ## Feishu Requirements
90
+
91
+ Use a self-built enterprise app, not a custom webhook bot.
92
+
93
+ Required capabilities:
94
+
95
+ - Bot enabled
96
+ - Event subscription: `im.message.receive_v1`
97
+ - Permission to send messages
98
+ - Permission to update messages
99
+
100
+ Recommended:
101
+
102
+ - Long connection mode
103
+
104
+ ## TUI
105
+
106
+ Views:
107
+
108
+ - `Dashboard`
109
+ - `Config`
110
+ - `Logs`
111
+
112
+ Top actions:
113
+
114
+ 1. `Save & Restart`
115
+ 2. `Save Config`
116
+ 3. `Dashboard`
117
+ 4. `Config`
118
+ 5. `Logs`
119
+ 6. `Quit`
120
+
121
+ Shortcuts:
122
+
123
+ - `F2`: Dashboard
124
+ - `F3`: Config
125
+ - `F4`: Logs
126
+ - `Ctrl+S`: Save config
127
+ - `Ctrl+R`: Save and restart
128
+ - `q`: Quit
129
+
130
+ ## Files
131
+
132
+ - Config: `~/.config/poco/config.json`
133
+ - State: `~/.local/state/poco/`
134
+
135
+ ## Development
136
+
137
+ Build packages:
138
+
139
+ ```bash
140
+ uv build
141
+ ```
142
+
143
+ Quick syntax check:
144
+
145
+ ```bash
146
+ uv run python -m py_compile poco/__init__.py poco/app.py poco/bridge.py
147
+ ```
@@ -0,0 +1,147 @@
1
+ # PoCo
2
+
3
+ [English](README.md)
4
+
5
+ `PoCo` 是产品名,Python 包名是 `pocket-coding`。
6
+
7
+ PoCo 是一个本地 TUI,用来把 `Codex app-server` 接到飞书机器人后面。
8
+
9
+ - 和机器人单聊时,把它当作管理控制台
10
+ - 把飞书群当作项目工作区
11
+ - 每个项目群对应一个独立的 Codex worker
12
+ - 通过飞书消息创建和编辑,把进度持续回推到群里
13
+
14
+ ## 快速开始
15
+
16
+ 安装:
17
+
18
+ ```bash
19
+ pip install pocket-coding
20
+ ```
21
+
22
+ 如果你是从源码运行:
23
+
24
+ ```bash
25
+ pip install .
26
+ ```
27
+
28
+ 启动:
29
+
30
+ ```bash
31
+ poco
32
+ ```
33
+
34
+ 进入 TUI 后:
35
+
36
+ 1. 填写 `Feishu App ID` 和 `App Secret`
37
+ 2. 点击 `Save & Restart`
38
+ 3. 把 bot 拉进项目群
39
+ 4. 在项目群里执行:
40
+
41
+ ```text
42
+ /poco name my-project
43
+ /poco cwd /path/to/project
44
+ /poco mode mention
45
+ /poco enable
46
+ ```
47
+
48
+ 之后:
49
+
50
+ - 在单聊里用 `/poco workers` 或 `/poco status my-project`
51
+ - 在群里,`/poco ...` 是 PoCo 自己的命令
52
+ - 在群里,其他非 `/poco` 文本会直接转发给 Codex
53
+
54
+ ## 工作方式
55
+
56
+ - 单聊机器人:管理控制台
57
+ - 群聊机器人:项目工作区
58
+ - 每个项目群会启动一个独立的 Codex worker 进程
59
+ - 每个群都必须先配置自己的工作目录,才能启用
60
+ - PoCo 使用飞书长连接模式,不需要公网回调地址
61
+
62
+ ## 命令
63
+
64
+ 单聊命令:
65
+
66
+ - `/poco help`
67
+ - `/poco workers`
68
+ - `/poco list`
69
+ - `/poco status <worker_alias|group_chat_id>`
70
+ - `/poco stop <worker_alias|group_chat_id>`
71
+ - `/poco reset <worker_alias|group_chat_id>`
72
+ - `/poco remove <worker_alias|group_chat_id>`
73
+
74
+ 项目群命令:
75
+
76
+ - `/poco help`
77
+ - `/poco mode <mention|auto>`
78
+ - `/poco cwd <path>`
79
+ - `/poco enable`
80
+ - `/poco disable`
81
+ - `/poco reset`
82
+ - `/poco new`
83
+ - `/poco name <alias>`
84
+ - `/poco unname`
85
+ - `/poco status`
86
+ - `/poco stop`
87
+ - `/poco remove`
88
+
89
+ ## 飞书要求
90
+
91
+ 请使用“企业自建应用”,不要使用自定义群机器人。
92
+
93
+ 至少需要:
94
+
95
+ - 开启机器人能力
96
+ - 事件订阅:`im.message.receive_v1`
97
+ - 发送消息权限
98
+ - 更新消息权限
99
+
100
+ 推荐:
101
+
102
+ - 使用长连接模式
103
+
104
+ ## TUI
105
+
106
+ 页面:
107
+
108
+ - `Dashboard`
109
+ - `Config`
110
+ - `Logs`
111
+
112
+ 顶部动作:
113
+
114
+ 1. `Save & Restart`
115
+ 2. `Save Config`
116
+ 3. `Dashboard`
117
+ 4. `Config`
118
+ 5. `Logs`
119
+ 6. `Quit`
120
+
121
+ 快捷键:
122
+
123
+ - `F2`:Dashboard
124
+ - `F3`:Config
125
+ - `F4`:Logs
126
+ - `Ctrl+S`:保存配置
127
+ - `Ctrl+R`:保存并重启
128
+ - `q`:退出
129
+
130
+ ## 文件位置
131
+
132
+ - 配置文件:`~/.config/poco/config.json`
133
+ - 状态目录:`~/.local/state/poco/`
134
+
135
+ ## 开发
136
+
137
+ 构建安装包:
138
+
139
+ ```bash
140
+ uv build
141
+ ```
142
+
143
+ 快速语法检查:
144
+
145
+ ```bash
146
+ uv run python -m py_compile poco/__init__.py poco/app.py poco/bridge.py
147
+ ```
@@ -0,0 +1,4 @@
1
+ """PoCo package."""
2
+
3
+ __all__ = ["__version__"]
4
+ __version__ = "0.1.0"