Skip to content

Commit 3654154

Browse files
committed
fix: normalize package names to short form + add xpkg v0.0.40
- All mcpplibs packages: name changed from "mcpplibs.<name>" to "<name>" (namespace field already carries the prefix, name was redundant) - capi.lua: name changed from "mcpplibs.capi.lua" to "lua" - xpkg: add v0.0.40 entry with SHA256 (latest tag) - README: update xpkg version, fix Form A example to show namespace field, fix broken file references in "添加新包" section
1 parent 6599593 commit 3654154

7 files changed

Lines changed: 22 additions & 9 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ mcpp build # 自动拉取源码 + 构建
2121
| `mcpplibs.tinyhttps` | 0.2.2 | 轻量 HTTP/HTTPS 客户端(SSE 流式) — `import mcpplibs.tinyhttps;` | [mcpplibs/tinyhttps](https://github.com/mcpplibs/tinyhttps) |
2222
| `mcpplibs.llmapi` | 0.2.5 | 大语言模型 API 客户端(OpenAI/Anthropic 兼容) — `import mcpplibs.llmapi;` | [mcpplibs/llmapi](https://github.com/mcpplibs/llmapi) |
2323
| `mcpplibs.capi.lua` | 0.0.3 | Lua 5.4 C API 的 C++23 模块封装 — `import mcpplibs.capi.lua;` | [mcpplibs/lua](https://github.com/mcpplibs/lua) |
24-
| `mcpplibs.xpkg` | 0.0.39 | xpkg V1 规范的 C++23 参考实现 — `import mcpplibs.xpkg;` | [openxlings/libxpkg](https://github.com/openxlings/libxpkg) |
24+
| `mcpplibs.xpkg` | 0.0.40 | xpkg V1 规范的 C++23 参考实现 — `import mcpplibs.xpkg;` | [openxlings/libxpkg](https://github.com/openxlings/libxpkg) |
2525
| `mcpplibs.templates` | 0.0.1 | 最小化模块库模板 — `import mcpplibs.templates;` | [mcpplibs/templates](https://github.com/mcpplibs/templates) |
2626

2727
### 第三方 C/C++ 库
@@ -58,7 +58,8 @@ mcpp 0.0.3+ 的 transitive walker 自动沿链路传播头文件和依赖,消费
5858
```lua
5959
package = {
6060
spec = "1",
61-
name = "mcpplibs.tinyhttps",
61+
namespace = "mcpplibs",
62+
name = "tinyhttps",
6263
xpm = {
6364
linux = { ["0.2.2"] = { url = "...", sha256 = "..." } },
6465
macosx = { ["0.2.2"] = { url = "...", sha256 = "..." } },
@@ -103,7 +104,7 @@ cd ~/.mcpp/registry/data/mcpp-index && git pull
103104
## 添加新包
104105

105106
1. Fork 本仓库
106-
2.`pkgs/<首字母>/` 下创建 `<包名>.lua`,参考现有文件([mbedtls.lua](pkgs/m/mbedtls.lua)[ftxui.lua](pkgs/f/ftxui.lua))
107+
2.`pkgs/<首字母>/` 下创建 `<包名>.lua`,参考现有文件([compat.mbedtls.lua](pkgs/c/compat.mbedtls.lua)[compat.ftxui.lua](pkgs/c/compat.ftxui.lua))
107108
3. 提交 PR — `validate` workflow 自动 lint,`deploy-site` 合入后自动发布到浏览站
108109

109110
详细格式说明见 [mcpp 扩展字段文档](https://github.com/mcpp-community/mcpp/blob/main/docs/04-schema-xpkg-extension.md)

pkgs/c/capi.lua.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package = {
55
spec = "1",
66
namespace = "mcpplibs.capi",
7-
name = "mcpplibs.capi.lua",
7+
name = "lua",
88
description = "C++23 module wrapping the Lua 5.4 C API — `import mcpplibs.capi.lua;`",
99
licenses = {"Apache-2.0"},
1010
repo = "https://github.com/mcpplibs/lua",

pkgs/c/cmdline.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
package = {
1212
spec = "1",
1313
namespace = "mcpplibs",
14-
name = "mcpplibs.cmdline",
14+
name = "cmdline",
1515
description = "A simple command-line parsing library/framework for modern C++",
1616
licenses = {"Apache-2.0"},
1717
repo = "https://github.com/mcpplibs/cmdline",

pkgs/l/llmapi.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package = {
55
spec = "1",
66
namespace = "mcpplibs",
7-
name = "mcpplibs.llmapi",
7+
name = "llmapi",
88
description = "Modern C++ LLM API client with openai-compatible support",
99
licenses = {"Apache-2.0"},
1010
repo = "https://github.com/mcpplibs/llmapi",

pkgs/t/templates.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
package = {
77
spec = "1",
88
namespace = "mcpplibs",
9-
name = "mcpplibs.templates",
9+
name = "templates",
1010
description = "Minimal C++23 modular hello library",
1111
licenses = {"Apache-2.0"},
1212
repo = "https://github.com/mcpp-community/templates",

pkgs/t/tinyhttps.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
package = {
55
spec = "1",
66
namespace = "mcpplibs",
7-
name = "mcpplibs.tinyhttps",
7+
name = "tinyhttps",
88
description = "Minimal C++23 HTTP/HTTPS client with SSE streaming support",
99
licenses = {"Apache-2.0"},
1010
repo = "https://github.com/mcpplibs/tinyhttps",

pkgs/x/xpkg.lua

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,38 @@
44
package = {
55
spec = "1",
66
namespace = "mcpplibs",
7-
name = "mcpplibs.xpkg",
7+
name = "xpkg",
88
description = "C++23 reference implementation of the xpkg V1 spec — `import mcpplibs.xpkg;`",
99
licenses = {"Apache-2.0"},
1010
repo = "https://github.com/openxlings/libxpkg",
1111
type = "package",
1212

1313
xpm = {
1414
linux = {
15+
["0.0.40"] = {
16+
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz",
17+
sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f",
18+
},
1519
["0.0.39"] = {
1620
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz",
1721
sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71",
1822
},
1923
},
2024
macosx = {
25+
["0.0.40"] = {
26+
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz",
27+
sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f",
28+
},
2129
["0.0.39"] = {
2230
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz",
2331
sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71",
2432
},
2533
},
2634
windows = {
35+
["0.0.40"] = {
36+
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.40.tar.gz",
37+
sha256 = "95fd6d7b2c044578830015fd5b1dceaafd5c0dbadc04a0c78e82d380405e193f",
38+
},
2739
["0.0.39"] = {
2840
url = "https://github.com/openxlings/libxpkg/archive/refs/tags/v0.0.39.tar.gz",
2941
sha256 = "292d6a85da95b3615cc96f8e2e64dbe7767d059d8a8e9422bbc72db648f81f71",

0 commit comments

Comments
 (0)