Remove legacy key/password aliases and clean up workspace

Drop the Hose key/password compatibility path from the config schema, credential reads, CLI messages, tests, and docs; appKey/appSecurity are now the only accepted fields. Isolate seal-renew tests from the real enterprises directory so renewals never write local config. Remove the tracked pkg/ report spec and local artifacts, and rewrite .gitignore with complete sections.
This commit is contained in:
gitea committed 2026-11-19 16:10:21 +08:00
1 parent 8d6b65d3d5
commit 35f761e8a0
18 files changed
+106 -940

No files matched your search

+6 -6
View File
@@ -175,11 +175,11 @@ export async function handleAuthCommand(action: string | undefined, corp: CorpCo
2
);
}
const appKey = corp.source.appKey ?? corp.source.key;
const appSecurity = corp.source.appSecurity ?? corp.source.password;
const appKey = corp.source.appKey;
const appSecurity = corp.source.appSecurity;
if (!appKey || !appSecurity) {
throw validationError(
`缺少合思凭证:企业「${corp.name}」(id: ${corp.id}) 未配置 appKey/appSecurity(或 key/password),无法向合思 OpenAPI 签发 accessToken。`
`缺少合思凭证:企业「${corp.name}」(id: ${corp.id}) 未配置 appKey/appSecurity,无法向合思 OpenAPI 签发 accessToken。`
);
}
const force =
@@ -237,8 +237,8 @@ async function diagnoseAuth(corp: CorpConfig) {
clearCorpTokenCache(corp.id);
const source = corp.source;
const appKey = source.appKey ?? source.key;
const appSecurity = source.appSecurity ?? source.password;
const appKey = source.appKey;
const appSecurity = source.appSecurity;
const sealUrl = (corp.seal.url ?? source.sealUrl ?? `https://${source.corpId.toLowerCase()}.sealai.cc`).replace(/\/+$/, "");
const uid = source.staffId.includes(":") ? source.staffId : `${source.corpId}:${source.staffId}`;
const stages: Array<Record<string, unknown>> = [];
@@ -255,7 +255,7 @@ async function diagnoseAuth(corp: CorpConfig) {
{
name: "hose.openapi",
ok: false,
error: "Hose source requires appKey/key and appSecurity/password"
error: "Hose source requires appKey and appSecurity"
}
]
};