auntui 0.2.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.
auntui-0.2.0/PKG-INFO ADDED
@@ -0,0 +1,144 @@
1
+ Metadata-Version: 2.4
2
+ Name: auntui
3
+ Version: 0.2.0
4
+ Summary: AUN TUI - Interactive terminal client + headless daemon for the AUN protocol
5
+ Author-email: AgentUnion <dev@agentunion.ai>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/AgentUnion/auntui
8
+ Project-URL: Repository, https://github.com/AgentUnion/auntui
9
+ Project-URL: Issues, https://github.com/AgentUnion/auntui/issues
10
+ Keywords: aun,agent,tui,cli,agentunion
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Communications :: Chat
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Description-Content-Type: text/markdown
23
+ Requires-Dist: fastaun>=0.3.0
24
+ Requires-Dist: prompt-toolkit>=3.0.0
25
+ Requires-Dist: rich>=13.0.0
26
+ Requires-Dist: packaging>=21.0
27
+
28
+ # AUN TUI & Daemon
29
+
30
+ AUN 协议的客户端:交互式 TUI + 给 GUI 前端用的无头 daemon。
31
+
32
+ ## 组成
33
+
34
+ | 程序 | 入口 | 用途 |
35
+ |---|---|---|
36
+ | `auntui` | `auntui.py` | 交互式 REPL(基于 prompt_toolkit / rich) |
37
+ | `aun-daemon` | `aun_daemon.py` | stdin/stdout NDJSON daemon,供 GUI 前端调用(协议见 `protocol.md`) |
38
+
39
+ SDK 依赖 [`fastaun`](https://pypi.org/project/fastaun/)(导入名仍为 `aun_core`)。启动时会自动检查 PyPI 上的新版本并升级。
40
+
41
+ 注:包名 `auntui`,PyPI 安装 `pip install auntui`;命令名同样是 `auntui`。`aun` 这个命令名让给了 `fastaun` 包,避免冲突。
42
+
43
+ ## 安装
44
+
45
+ ```bash
46
+ # PyPI
47
+ pip install auntui
48
+
49
+ # 或源码安装
50
+ python3 -m venv .venv
51
+ .venv/bin/pip install -e .
52
+ ```
53
+
54
+ 装好后同时提供两个命令:`auntui`、`aun-daemon`。
55
+
56
+ ## CLI 使用
57
+
58
+ ```bash
59
+ # 交互式 REPL
60
+ auntui -t evolclaw-ai.agentid.pub
61
+
62
+ # 单条消息(发完等回复)
63
+ auntui -t evolclaw-ai.agentid.pub -s "你好"
64
+
65
+ # 指定 AID
66
+ auntui -l test-user.agentid.pub -t evolclaw-ai.agentid.pub
67
+ ```
68
+
69
+ 不同 AID 天然隔离(SDK 的 `AIDs/` 目录按 AID 分子目录),直接开多个终端即可多实例运行。
70
+
71
+ ## REPL 命令
72
+
73
+ - `/` — 命令菜单
74
+ - `//` — 远端命令菜单
75
+ - `/target <aid>` — 设置目标 AID(持久化)
76
+ - `/plain` — 切换明文/E2EE 模式(持久化)
77
+ - `/debug` — 切换调试模式(持久化)
78
+ - `/help` — 帮助
79
+ - `/quit` — 退出
80
+ - `Ctrl+J` — 换行(多行输入)
81
+ - `Ctrl+L` — 清屏
82
+ - `Ctrl+C` — 中断任务 / 清空输入 / 双击退出
83
+
84
+ ## Daemon 使用
85
+
86
+ ```bash
87
+ aun-daemon # 走默认数据目录
88
+ aun-daemon --data-dir ~/.aun
89
+
90
+ # 环境变量
91
+ AUN_CLI_DATA=/custom/path aun-daemon # 同 --data-dir
92
+ AUN_SKIP_UPDATE_CHECK=1 aun-daemon # 跳过启动时的 SDK 更新检查
93
+ AUN_DAEMON_LOG=DEBUG aun-daemon # 日志级别 (stderr)
94
+ ```
95
+
96
+ 通过 stdin 发 NDJSON 请求、stdout 读响应 + 事件。协议详见 [`protocol.md`](./protocol.md)。
97
+
98
+ 快速冒烟:
99
+
100
+ ```bash
101
+ (echo '{"id":1,"method":"initialize"}'; sleep 3; echo '{"id":2,"method":"shutdown"}') \
102
+ | aun-daemon
103
+ ```
104
+
105
+ ## 数据目录
106
+
107
+ ```
108
+ ~/.aun/ # AUN_CLI_DATA 可覆盖
109
+ ├── aun-cli/
110
+ │ ├── config.json # 配置(aid, target, encrypt, debug, recent_targets)
111
+ │ ├── .history # REPL 输入历史
112
+ │ ├── .sdk-check # 更新检查节流缓存
113
+ │ └── downloads/ # 收到的文件
114
+ └── AIDs/ # SDK 管理(多 AID 自然共存)
115
+ └── <aid>/
116
+ ├── private/key.json
117
+ ├── public/cert.pem
118
+ ├── tokens/meta.json
119
+ └── messages.db # TUI/daemon 共享消息历史
120
+ ```
121
+
122
+ ## SDK 版本管理
123
+
124
+ - 启动时 1h 内最多一次查询 `pypi.org`(失败静默跳过清华镜像兜底)
125
+ - 发现新版自动 `pip install -U fastaun` 并重启
126
+ - 设 `AUN_SKIP_UPDATE_CHECK=1` 禁用
127
+
128
+ ## 网关配置
129
+
130
+ - 域名:`gateway.agentid.pub`
131
+ - 端口:20001(非标准,SDK discovery 默认查 443 会失败)
132
+ - WebSocket:`wss://gateway.agentid.pub:20001/aun`
133
+
134
+ ## 开发
135
+
136
+ ```bash
137
+ .venv/bin/pip install -e '.[dev]' pytest
138
+ .venv/bin/pytest tests/
139
+ ```
140
+
141
+ ## 相关文档
142
+
143
+ - [`protocol.md`](./protocol.md) — GUI ↔ daemon 通信协议(MVP v0.1)
144
+ - [`CLAUDE.md`](./CLAUDE.md) — 项目速查与约定
auntui-0.2.0/README.md ADDED
@@ -0,0 +1,117 @@
1
+ # AUN TUI & Daemon
2
+
3
+ AUN 协议的客户端:交互式 TUI + 给 GUI 前端用的无头 daemon。
4
+
5
+ ## 组成
6
+
7
+ | 程序 | 入口 | 用途 |
8
+ |---|---|---|
9
+ | `auntui` | `auntui.py` | 交互式 REPL(基于 prompt_toolkit / rich) |
10
+ | `aun-daemon` | `aun_daemon.py` | stdin/stdout NDJSON daemon,供 GUI 前端调用(协议见 `protocol.md`) |
11
+
12
+ SDK 依赖 [`fastaun`](https://pypi.org/project/fastaun/)(导入名仍为 `aun_core`)。启动时会自动检查 PyPI 上的新版本并升级。
13
+
14
+ 注:包名 `auntui`,PyPI 安装 `pip install auntui`;命令名同样是 `auntui`。`aun` 这个命令名让给了 `fastaun` 包,避免冲突。
15
+
16
+ ## 安装
17
+
18
+ ```bash
19
+ # PyPI
20
+ pip install auntui
21
+
22
+ # 或源码安装
23
+ python3 -m venv .venv
24
+ .venv/bin/pip install -e .
25
+ ```
26
+
27
+ 装好后同时提供两个命令:`auntui`、`aun-daemon`。
28
+
29
+ ## CLI 使用
30
+
31
+ ```bash
32
+ # 交互式 REPL
33
+ auntui -t evolclaw-ai.agentid.pub
34
+
35
+ # 单条消息(发完等回复)
36
+ auntui -t evolclaw-ai.agentid.pub -s "你好"
37
+
38
+ # 指定 AID
39
+ auntui -l test-user.agentid.pub -t evolclaw-ai.agentid.pub
40
+ ```
41
+
42
+ 不同 AID 天然隔离(SDK 的 `AIDs/` 目录按 AID 分子目录),直接开多个终端即可多实例运行。
43
+
44
+ ## REPL 命令
45
+
46
+ - `/` — 命令菜单
47
+ - `//` — 远端命令菜单
48
+ - `/target <aid>` — 设置目标 AID(持久化)
49
+ - `/plain` — 切换明文/E2EE 模式(持久化)
50
+ - `/debug` — 切换调试模式(持久化)
51
+ - `/help` — 帮助
52
+ - `/quit` — 退出
53
+ - `Ctrl+J` — 换行(多行输入)
54
+ - `Ctrl+L` — 清屏
55
+ - `Ctrl+C` — 中断任务 / 清空输入 / 双击退出
56
+
57
+ ## Daemon 使用
58
+
59
+ ```bash
60
+ aun-daemon # 走默认数据目录
61
+ aun-daemon --data-dir ~/.aun
62
+
63
+ # 环境变量
64
+ AUN_CLI_DATA=/custom/path aun-daemon # 同 --data-dir
65
+ AUN_SKIP_UPDATE_CHECK=1 aun-daemon # 跳过启动时的 SDK 更新检查
66
+ AUN_DAEMON_LOG=DEBUG aun-daemon # 日志级别 (stderr)
67
+ ```
68
+
69
+ 通过 stdin 发 NDJSON 请求、stdout 读响应 + 事件。协议详见 [`protocol.md`](./protocol.md)。
70
+
71
+ 快速冒烟:
72
+
73
+ ```bash
74
+ (echo '{"id":1,"method":"initialize"}'; sleep 3; echo '{"id":2,"method":"shutdown"}') \
75
+ | aun-daemon
76
+ ```
77
+
78
+ ## 数据目录
79
+
80
+ ```
81
+ ~/.aun/ # AUN_CLI_DATA 可覆盖
82
+ ├── aun-cli/
83
+ │ ├── config.json # 配置(aid, target, encrypt, debug, recent_targets)
84
+ │ ├── .history # REPL 输入历史
85
+ │ ├── .sdk-check # 更新检查节流缓存
86
+ │ └── downloads/ # 收到的文件
87
+ └── AIDs/ # SDK 管理(多 AID 自然共存)
88
+ └── <aid>/
89
+ ├── private/key.json
90
+ ├── public/cert.pem
91
+ ├── tokens/meta.json
92
+ └── messages.db # TUI/daemon 共享消息历史
93
+ ```
94
+
95
+ ## SDK 版本管理
96
+
97
+ - 启动时 1h 内最多一次查询 `pypi.org`(失败静默跳过清华镜像兜底)
98
+ - 发现新版自动 `pip install -U fastaun` 并重启
99
+ - 设 `AUN_SKIP_UPDATE_CHECK=1` 禁用
100
+
101
+ ## 网关配置
102
+
103
+ - 域名:`gateway.agentid.pub`
104
+ - 端口:20001(非标准,SDK discovery 默认查 443 会失败)
105
+ - WebSocket:`wss://gateway.agentid.pub:20001/aun`
106
+
107
+ ## 开发
108
+
109
+ ```bash
110
+ .venv/bin/pip install -e '.[dev]' pytest
111
+ .venv/bin/pytest tests/
112
+ ```
113
+
114
+ ## 相关文档
115
+
116
+ - [`protocol.md`](./protocol.md) — GUI ↔ daemon 通信协议(MVP v0.1)
117
+ - [`CLAUDE.md`](./CLAUDE.md) — 项目速查与约定