refactor(core): migrate to Bun and converge acquisition policies and Agent boundaries
This commit is contained in:
1 parent
3f1c6d02f6
commit
27c0f27434
268 files changed
+7468
-7852
No files matched your search
@@ -1,6 +1,6 @@
|
||||
# scripts/mp-sync
|
||||
|
||||
跟随上游移植工具(说明与对照总表:`docs/porting/mp-sync-ledger.md`)。用 `deno run -A` 运行(`yaml` 经根 deno.json import map 解析),不依赖 deno.json 任务。
|
||||
跟随上游移植工具(说明与对照总表:`docs/porting/mp-sync-ledger.md`)。用 `bun` 运行(`yaml` 经根 package.json 依赖解析),不依赖任务包装。
|
||||
|
||||
| 脚本 | 作用 |
|
||||
| --- | --- |
|
||||
@@ -9,9 +9,9 @@
|
||||
| `movieclaw-import.mjs [--repo <MC 仓库>] [--ref v0.27.0] [--check]` | MovieClaw v0.27.0(MIT)站点 YAML → `packages/adapters/src/sites/definitions/*.json` + `manifest.generated.ts`;覆盖层 `movieclaw-overrides/<id>.json`;`--check` 只比较 |
|
||||
|
||||
```bash
|
||||
deno run -A scripts/mp-sync/check.mjs --to <新提交>
|
||||
deno run -A scripts/mp-sync/build-ledger.mjs --commit <新提交>
|
||||
deno run -A scripts/mp-sync/movieclaw-import.mjs --check
|
||||
bun scripts/mp-sync/check.mjs --to <新提交>
|
||||
bun scripts/mp-sync/build-ledger.mjs --commit <新提交>
|
||||
bun scripts/mp-sync/movieclaw-import.mjs --check
|
||||
```
|
||||
|
||||
MovieClaw v0.27.0 之后为附条件许可:`movieclaw-import.mjs` 校验 ref→提交与 LICENSE=MIT,其他 ref 需 `--allow-ref` 并另行核对许可。
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env -S deno run -A
|
||||
#!/usr/bin/env -S bun
|
||||
/**
|
||||
* 生成 scripts/mp-sync/ledger.json 与 docs/porting/mp-sync-ledger.md 中的对照总表。
|
||||
*
|
||||
* deno run -A scripts/mp-sync/build-ledger.mjs [--mp /opt/moviepilot-plus/upstream/MoviePilot] [--commit e6820a8]
|
||||
* bun scripts/mp-sync/build-ledger.mjs [--mp /opt/moviepilot-plus/upstream/MoviePilot] [--commit e6820a8]
|
||||
*
|
||||
* 数据来源:源码文件头 `@mp-source <上游路径> @ <提交>` 标签 + ledger.manual.json(未打标签的既有移植)。
|
||||
* 每条记录保存移植时的上游提交与该文件内容 sha256,供 check.mjs 比较。
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env -S deno run -A
|
||||
#!/usr/bin/env -S bun
|
||||
/**
|
||||
* 比较 ledger.json 与 MoviePilot 目标提交,列出需要跟随移植的上游变化。
|
||||
*
|
||||
* deno run -A scripts/mp-sync/check.mjs [--mp <MP 仓库路径>] [--to <目标提交,默认 HEAD>] [--json]
|
||||
* bun scripts/mp-sync/check.mjs [--mp <MP 仓库路径>] [--to <目标提交,默认 HEAD>] [--json]
|
||||
*
|
||||
* 输出:已变更 / 已删除 / 未变化 的 ledger 文件,监视目录(spider/、parser/)中 ledger 未收录的新文件,
|
||||
* 以及逐文件 `git diff` 命令。存在变化时退出码为 1(可用于 CI 或定时提醒)。
|
||||
@@ -59,7 +59,7 @@ if (args.json) {
|
||||
console.log(`未变化:${unchanged.length}`);
|
||||
if (changed.length || deleted.length || added.length) {
|
||||
console.log(
|
||||
"\n处理流程:按 diff 增量移植 → 把对应源码文件头 `@mp-source ... @ <提交>` 改为新提交(新文件新增标签)→ deno run -A scripts/mp-sync/build-ledger.mjs --commit <新提交> → 测试。",
|
||||
"\n处理流程:按 diff 增量移植 → 把对应源码文件头 `@mp-source ... @ <提交>` 改为新提交(新文件新增标签)→ bun scripts/mp-sync/build-ledger.mjs --commit <新提交> → 测试。",
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ meta:读 packages/domain/test/differential/meta-samples.json,分别以
|
||||
accelerator=None(Python 参考实现)与 accelerator=rust(moviepilot_rust 快路径)
|
||||
调用 MetaInfo / MetaInfoPath,写 meta-mp.json。两条路径不一致的样本记在 rustMismatch。
|
||||
|
||||
生成后执行 `deno task fmt`(biome 统一 JSON 格式),再跑差分测试;新出现的差异需人工分类后
|
||||
生成后执行 `bun run fmt`(biome 统一 JSON 格式),再跑差分测试;新出现的差异需人工分类后
|
||||
登记进对应 *-deviations.json / deviations 字段(kind 见 docs/porting/mp-rust-logic-parity.md)。
|
||||
"""
|
||||
from __future__ import annotations
|
||||
@@ -354,7 +354,7 @@ def gen_filter_cmd() -> None:
|
||||
# parse_indexer_subtitles` 打桩为 None 强制走 PyQuery 回退;再恢复原函数跑一次记录 `mp_rust`)。
|
||||
# MP 自带站点定义在加密资源 `user.sites.v3.bin`(Cython `SitesHelper`),未认证用户 `get_indexer()` 返回 {},
|
||||
# `get_indexsites()` 只含 id/name/url,因此 indexer 配置改用本项目 `definitions/*.json`(同 MP schema)。
|
||||
# 输入先由 `deno run -A packages/adapters/test/differential/export-inputs.ts` 导出 tk-* fixture。
|
||||
# 输入先由 `bun packages/adapters/test/differential/export-inputs.ts` 导出 tk-* fixture。
|
||||
|
||||
UMT_ROOT = REPO
|
||||
DEFAULT_OUT = UMT_ROOT / "packages/adapters/test/differential"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#!/usr/bin/env -S deno run -A
|
||||
#!/usr/bin/env -S bun
|
||||
/**
|
||||
* MovieClaw v0.27.0(MIT)站点 YAML → 本项目 SiteDefinition JSON 转换器(可重复执行)。
|
||||
*
|
||||
* 用法:
|
||||
* deno run -A scripts/mp-sync/movieclaw-import.mjs [--repo spikes/movieclaw-src/repo] [--ref v0.27.0] [--check]
|
||||
* bun scripts/mp-sync/movieclaw-import.mjs [--repo spikes/movieclaw-src/repo] [--ref v0.27.0] [--check]
|
||||
*
|
||||
* - 只用 `git show <ref>:<path>` 读取文件(固定 tag,不读工作区,避免混入许可切换后的内容)。
|
||||
* - 校验 <ref> 解析到的提交与 LICENSE 为 MIT;ref 不是 v0.27.0 时要求 --allow-ref(许可需另行核对)。
|
||||
|
||||
Reference in new issue
Block a user