penglai 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.
- penglai-0.1.0/PKG-INFO +44 -0
- penglai-0.1.0/README.md +25 -0
- penglai-0.1.0/penglai.egg-info/PKG-INFO +44 -0
- penglai-0.1.0/penglai.egg-info/SOURCES.txt +8 -0
- penglai-0.1.0/penglai.egg-info/dependency_links.txt +1 -0
- penglai-0.1.0/penglai.egg-info/entry_points.txt +2 -0
- penglai-0.1.0/penglai.egg-info/top_level.txt +1 -0
- penglai-0.1.0/penglai_bootstrap.py +94 -0
- penglai-0.1.0/pyproject.toml +34 -0
- penglai-0.1.0/setup.cfg +4 -0
penglai-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: penglai
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 蓬莱 Penglai — bootstrap installer for the Penglai personal-butler distribution of GenericAgent / 中文个人管家发行版引导安装器
|
|
5
|
+
Author: Kevin Chen (kevinchennewbee)
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kevinchennewbee/PenglaiAgent
|
|
8
|
+
Project-URL: Upstream, https://github.com/lsdefine/GenericAgent
|
|
9
|
+
Keywords: agent,assistant,feishu,wechat,genericagent,penglai
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Communications :: Chat
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# 蓬莱 · Penglai
|
|
21
|
+
|
|
22
|
+
**住在你飞书和微信里的中文 AI 管家** · Your personal AI butler, living in Feishu & WeChat.
|
|
23
|
+
|
|
24
|
+
这是蓬莱的**引导安装器**。安装后运行 `penglai`,它会引导你完成全部安装:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install penglai
|
|
28
|
+
penglai # 引导:选目录 → 自动克隆发行版 → 向导(依赖→模型→飞书→可选微信扫码)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
装好之后,`penglai` 命令自动透传给发行版:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
penglai doctor # 体检:环境/依赖/配置/LLM/记忆/服务/上游
|
|
35
|
+
penglai status # 服务状态
|
|
36
|
+
penglai update # 一键同步上游内核
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- 项目主页:https://github.com/kevinchennewbee/PenglaiAgent
|
|
40
|
+
- 蓬莱基于 [GenericAgent](https://github.com/lsdefine/GenericAgent) 内核(MIT,零改动),
|
|
41
|
+
叠加微信渠道、语音情绪感知、确定性安全红线、记忆卫生、跨厂商防幻觉复核等精选外设。
|
|
42
|
+
- 国内网络友好:克隆自动回退 gh-proxy 镜像,依赖走清华 PyPI 镜像。
|
|
43
|
+
|
|
44
|
+
**代码 MIT;「蓬莱 / Penglai」名称与视觉品牌保留所有权利。**
|
penglai-0.1.0/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 蓬莱 · Penglai
|
|
2
|
+
|
|
3
|
+
**住在你飞书和微信里的中文 AI 管家** · Your personal AI butler, living in Feishu & WeChat.
|
|
4
|
+
|
|
5
|
+
这是蓬莱的**引导安装器**。安装后运行 `penglai`,它会引导你完成全部安装:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install penglai
|
|
9
|
+
penglai # 引导:选目录 → 自动克隆发行版 → 向导(依赖→模型→飞书→可选微信扫码)
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
装好之后,`penglai` 命令自动透传给发行版:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
penglai doctor # 体检:环境/依赖/配置/LLM/记忆/服务/上游
|
|
16
|
+
penglai status # 服务状态
|
|
17
|
+
penglai update # 一键同步上游内核
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- 项目主页:https://github.com/kevinchennewbee/PenglaiAgent
|
|
21
|
+
- 蓬莱基于 [GenericAgent](https://github.com/lsdefine/GenericAgent) 内核(MIT,零改动),
|
|
22
|
+
叠加微信渠道、语音情绪感知、确定性安全红线、记忆卫生、跨厂商防幻觉复核等精选外设。
|
|
23
|
+
- 国内网络友好:克隆自动回退 gh-proxy 镜像,依赖走清华 PyPI 镜像。
|
|
24
|
+
|
|
25
|
+
**代码 MIT;「蓬莱 / Penglai」名称与视觉品牌保留所有权利。**
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: penglai
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: 蓬莱 Penglai — bootstrap installer for the Penglai personal-butler distribution of GenericAgent / 中文个人管家发行版引导安装器
|
|
5
|
+
Author: Kevin Chen (kevinchennewbee)
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/kevinchennewbee/PenglaiAgent
|
|
8
|
+
Project-URL: Upstream, https://github.com/lsdefine/GenericAgent
|
|
9
|
+
Keywords: agent,assistant,feishu,wechat,genericagent,penglai
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: End Users/Desktop
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Natural Language :: Chinese (Simplified)
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Topic :: Communications :: Chat
|
|
17
|
+
Requires-Python: >=3.10
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
|
|
20
|
+
# 蓬莱 · Penglai
|
|
21
|
+
|
|
22
|
+
**住在你飞书和微信里的中文 AI 管家** · Your personal AI butler, living in Feishu & WeChat.
|
|
23
|
+
|
|
24
|
+
这是蓬莱的**引导安装器**。安装后运行 `penglai`,它会引导你完成全部安装:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install penglai
|
|
28
|
+
penglai # 引导:选目录 → 自动克隆发行版 → 向导(依赖→模型→飞书→可选微信扫码)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
装好之后,`penglai` 命令自动透传给发行版:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
penglai doctor # 体检:环境/依赖/配置/LLM/记忆/服务/上游
|
|
35
|
+
penglai status # 服务状态
|
|
36
|
+
penglai update # 一键同步上游内核
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
- 项目主页:https://github.com/kevinchennewbee/PenglaiAgent
|
|
40
|
+
- 蓬莱基于 [GenericAgent](https://github.com/lsdefine/GenericAgent) 内核(MIT,零改动),
|
|
41
|
+
叠加微信渠道、语音情绪感知、确定性安全红线、记忆卫生、跨厂商防幻觉复核等精选外设。
|
|
42
|
+
- 国内网络友好:克隆自动回退 gh-proxy 镜像,依赖走清华 PyPI 镜像。
|
|
43
|
+
|
|
44
|
+
**代码 MIT;「蓬莱 / Penglai」名称与视觉品牌保留所有权利。**
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
penglai_bootstrap
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""蓬莱引导安装器(PyPI 包 `penglai` 的唯一模块)。
|
|
3
|
+
|
|
4
|
+
职责只有两个,保持极简:
|
|
5
|
+
1. 本机还没有蓬莱发行版 → 引导:选目录 → git clone(GitHub 失败自动走 gh-proxy 镜像)→ 进向导
|
|
6
|
+
2. 已有发行版 → 把所有参数原样透传给发行版仓库里的 `penglai` 入口脚本
|
|
7
|
+
|
|
8
|
+
发行版位置的发现顺序:$PENGLAI_HOME → ~/.penglai/home 记录 → 当前目录 → ~/PenglaiAgent。
|
|
9
|
+
本模块永不修改发行版内容;升级发行版 = 在仓库里 `penglai update`。
|
|
10
|
+
"""
|
|
11
|
+
import os
|
|
12
|
+
import shutil
|
|
13
|
+
import subprocess
|
|
14
|
+
import sys
|
|
15
|
+
|
|
16
|
+
REPO = "https://github.com/kevinchennewbee/PenglaiAgent.git"
|
|
17
|
+
MIRROR = "https://gh-proxy.com/" + REPO
|
|
18
|
+
HOME_RECORD = os.path.expanduser("~/.penglai/home")
|
|
19
|
+
DEFAULT_DIR = os.path.expanduser("~/PenglaiAgent")
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def _is_distro(path):
|
|
23
|
+
"""发行版特征:有 penglai 入口脚本 + GA 内核文件。"""
|
|
24
|
+
return (path and os.path.isfile(os.path.join(path, "penglai"))
|
|
25
|
+
and os.path.isfile(os.path.join(path, "agent_loop.py")))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
def _recorded_home():
|
|
29
|
+
try:
|
|
30
|
+
with open(HOME_RECORD, encoding="utf-8") as f:
|
|
31
|
+
return f.read().strip()
|
|
32
|
+
except OSError:
|
|
33
|
+
return ""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def find_distro():
|
|
37
|
+
for cand in (os.environ.get("PENGLAI_HOME", ""), _recorded_home(),
|
|
38
|
+
os.getcwd(), DEFAULT_DIR):
|
|
39
|
+
if _is_distro(cand):
|
|
40
|
+
return cand
|
|
41
|
+
return ""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def _record_home(path):
|
|
45
|
+
os.makedirs(os.path.dirname(HOME_RECORD), exist_ok=True)
|
|
46
|
+
with open(HOME_RECORD, "w", encoding="utf-8") as f:
|
|
47
|
+
f.write(path)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _clone(target):
|
|
51
|
+
for i, url in enumerate((REPO, MIRROR)):
|
|
52
|
+
label = "GitHub 直连" if i == 0 else "gh-proxy 镜像(国内网络)"
|
|
53
|
+
print(f" 正在克隆({label})...")
|
|
54
|
+
r = subprocess.run(["git", "clone", "--depth", "1", url, target])
|
|
55
|
+
if r.returncode == 0:
|
|
56
|
+
return True
|
|
57
|
+
print(f" ❌ {label} 失败," + ("尝试镜像..." if i == 0 else "请检查网络后重试。"))
|
|
58
|
+
return False
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def install():
|
|
62
|
+
print("🏮 蓬莱 · Penglai — 住在你飞书和微信里的中文 AI 管家\n")
|
|
63
|
+
if not shutil.which("git"):
|
|
64
|
+
print("❌ 需要 git。请先安装:apt install git / brew install git")
|
|
65
|
+
return 1
|
|
66
|
+
target = input(f"安装目录 [{DEFAULT_DIR}]: ").strip() or DEFAULT_DIR
|
|
67
|
+
target = os.path.abspath(os.path.expanduser(target))
|
|
68
|
+
if _is_distro(target):
|
|
69
|
+
print("✅ 该目录已是蓬莱发行版,直接进入向导。")
|
|
70
|
+
elif os.path.isdir(target) and os.listdir(target):
|
|
71
|
+
print(f"❌ 目录 {target} 非空且不是蓬莱发行版,换个目录再来。")
|
|
72
|
+
return 1
|
|
73
|
+
elif not _clone(target):
|
|
74
|
+
return 1
|
|
75
|
+
_record_home(target)
|
|
76
|
+
print(f"\n✅ 发行版就绪:{target}\n 进入安装向导(依赖 → 模型 → 飞书 → 可选微信扫码)...\n")
|
|
77
|
+
return subprocess.run([sys.executable, os.path.join(target, "penglai"), "setup"],
|
|
78
|
+
cwd=target).returncode
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def main():
|
|
82
|
+
args = sys.argv[1:]
|
|
83
|
+
distro = find_distro()
|
|
84
|
+
if distro:
|
|
85
|
+
sys.exit(subprocess.run(
|
|
86
|
+
[sys.executable, os.path.join(distro, "penglai")] + args, cwd=distro).returncode)
|
|
87
|
+
if not args or args[0] in ("setup", "install"):
|
|
88
|
+
sys.exit(install())
|
|
89
|
+
print("尚未安装蓬莱发行版。直接运行 `penglai` 开始引导安装。")
|
|
90
|
+
sys.exit(1)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
if __name__ == "__main__":
|
|
94
|
+
main()
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# 蓬莱 PyPI 引导器 — 独立小包,与 GA 内核的 pyproject.toml 互不相干。
|
|
2
|
+
# pip install penglai → `penglai` 命令引导 clone 发行版 + 进入向导;已安装则透传。
|
|
3
|
+
[project]
|
|
4
|
+
name = "penglai"
|
|
5
|
+
version = "0.1.0"
|
|
6
|
+
description = "蓬莱 Penglai — bootstrap installer for the Penglai personal-butler distribution of GenericAgent / 中文个人管家发行版引导安装器"
|
|
7
|
+
readme = "README.md"
|
|
8
|
+
requires-python = ">=3.10"
|
|
9
|
+
license = { text = "MIT" }
|
|
10
|
+
authors = [{ name = "Kevin Chen (kevinchennewbee)" }]
|
|
11
|
+
keywords = ["agent", "assistant", "feishu", "wechat", "genericagent", "penglai"]
|
|
12
|
+
classifiers = [
|
|
13
|
+
"Development Status :: 4 - Beta",
|
|
14
|
+
"Environment :: Console",
|
|
15
|
+
"Intended Audience :: End Users/Desktop",
|
|
16
|
+
"License :: OSI Approved :: MIT License",
|
|
17
|
+
"Natural Language :: Chinese (Simplified)",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
"Topic :: Communications :: Chat",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.urls]
|
|
23
|
+
Homepage = "https://github.com/kevinchennewbee/PenglaiAgent"
|
|
24
|
+
Upstream = "https://github.com/lsdefine/GenericAgent"
|
|
25
|
+
|
|
26
|
+
[project.scripts]
|
|
27
|
+
penglai = "penglai_bootstrap:main"
|
|
28
|
+
|
|
29
|
+
[build-system]
|
|
30
|
+
requires = ["setuptools>=68.0"]
|
|
31
|
+
build-backend = "setuptools.build_meta"
|
|
32
|
+
|
|
33
|
+
[tool.setuptools]
|
|
34
|
+
py-modules = ["penglai_bootstrap"]
|
penglai-0.1.0/setup.cfg
ADDED