feat(index): mcpplibs org migration + xlings 0.4.68 per-repo artifact adoption — 0.0.103 (#267 #269)#270
Merged
Merged
Conversation
The index repo moved from mcpp-community to the mcpplibs org; the old URL only worked via GitHub's repo redirect. Centralize the canonical/legacy URLs as constants, rewrite the URL in canonicalize_legacy_index_names (URL first, so legacy name entries still match and legacy/default entries fold in dedup), heal persisted config.toml/.xlings.json via the existing text migrations, and update the publish fork hint + docs links. canonicalize_legacy_index_names is now exported so ordering stays tested.
…oml/template (#269) IndexRepo gains optional artifact/source; [index.repos.*] parses both keys; the default template and add_default declare the xlings-res/mcpp-index artifact base; canonicalize fills it in memory for pre-artifact configs (source="git" is the opt-out, user-set bases win). seed_xlings_json now takes SeedRepo spans and emits artifact/source only when set — output for plain repos stays byte-identical (locked by test). Older xlings (<0.4.68) ignores both keys.
… injection (#267-A #269) Existing installs only run the text migration (seed is skipped when the file exists), so it now rewrites the org URL and injects the artifact declaration next to the canonical mcpplibs url. Idempotency gate: skip injection when the res base is already present (plain replace_all would re-inject every run). Covers both writer spacings (mcpp pretty / xlings compact); unrelated keys (subos, bindings) are preserved byte-for-byte.
…git rule (#269) IndexSpec gains artifact/source, parsed from both mcpp.toml and config.toml [indices] long forms; ensure_project_index_dir passes them through to the project seed. artifact_applicable() encodes the design rule: rev/tag/branch pins (and local path) force git because the artifact channel only tracks the latest pointer — a declared-but-inapplicable artifact warns instead of silently syncing the wrong revision.
…ign kXlingsVersion 0.4.68 (openxlings/xlings#377/#379/#380) lets custom index_repos entries declare an artifact source with git fallback — the feature #269 adopts. Older xlings ignores the new fields, so this bump is the benefit switch, not a correctness prerequisite. kXlingsVersion was stale at 0.4.51 with no consumer; align it and print it from `mcpp self env` so the constant can't silently drift again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #267, closes #269.
设计:
.agents/docs/2026-07-22-issue267-269-index-artifact-and-org-migration-design.md实施计划:
.agents/docs/2026-07-22-issue267-269-impl-plan.md内容
#267-A URL 组织迁移:索引仓已迁
mcpplibs/mcpp-index,此前 4 处硬编码旧 org URL 全靠 GitHub 重定向。新/旧 URL 与 artifact base 收敛为mcpp::config三常量;canonicalize_legacy_index_names导出,单循环内 URL 归一先行 → 名字迁移 → artifact 填充 → name+url 去重(老配置仍命中、新旧条目折叠);存量 config.toml / registry.xlings.json经既有文本迁移钩子治愈;publish Fork 提示 + docs 链接同步。#269 artifact 采纳(xlings 0.4.68 #377):
mcpplibs条目声明artifact = https://github.com/xlings-res/mcpp-index(模板 + 内存级默认,source = "git"为显式退出口);(name,url)pair →SeedRepo{name,url,artifact,source},非空才发射,无 artifact 仓输出逐字节不变(测试锁定);.xlings.json就地注入 artifact(幂等闸 = res base 已现即跳过;双间距变体覆盖 mcpp pretty / xlings compact 两个写者;subos/版本绑定逐字节保留,不整文件重生成);[indices]增artifact/source,artifact_applicable()编码 rev/tag/branch/path pin 强制 git,不适用时告警;kXlingsVersion(0.4.51)对齐并由mcpp self env打印。发布端
xlings-res/mcpp-index零改动(#269 实测逐字节兼容);旧 xlings 忽略新字段,行为不变。CN region 对象按设计文档 P5 推迟。测试
.xlings.json迁移幂等(pretty/compact)、seed 零 diff 门 + artifact 发射、read_seeded_index_repos容错、[indices]artifact 解析与 pin 抑制 —— 36/36 绿