fix: 整合本地单据校验与离线身份修复

从旧审查分支选择仍未进入主分支的单据修复,保留主分支较新的工作流与插件分发实现。
兼容费用类型包装树,统一创建预演与执行,修正核销净支付,并将真实规格校验接入复制及送审。
注册 whoami 离线参数,补充写入契约和完整入口回归,保留旧分支与工作区。

验证:bun test 876 pass / 0 fail;bun run check、check:version、git diff --check 通过。
This commit is contained in:
gitea committed 2026-10-28 15:00:37 +08:00
1 parent c2d36733fb
commit ebeec98f6d
12 files changed
+369 -54

No files matched your search

+7
View File
@@ -9,6 +9,13 @@ import { CLI_COMMAND_REGISTRY, findCommandByArea } from "./registry.js";
import { runAiProCli } from "../aipro-cli.js";
describe("strict command options", () => {
test("top-level whoami accepts offline flags without changing the command target", () => {
for (const flag of ["offline", "cached"]) {
const parsed = parseArgs(["whoami", `--${flag}`, "--json"]);
expect(parsed.options[flag]).toBe(true);
expect(parsed.args).toEqual([]);
}
});
test("rejects misspellings and missing values instead of silently dropping filters", async () => {
const typo = await runCli(["bill", "list", "--limitt", "5", "--json"]);
expect(typo.exitCode).toBe(2);