Fix #137: decouple hose-link cache and add issue PR rule

- Decouple getHoseProvisionalAuthLink from internal closeapi session cache to prevent silent truncation and cache pollution (#137)
- Add --force, --refresh, -f options and positive integer validation to auth hose-link
- Clarify distinction between Hose web assistance links and Seal delegation tokens across CLI help, SKILL.md, and docs
- Add modular issue resolution and PR workflow rule under .agents/rules/
This commit is contained in:
gitea committed 2026-09-17 10:19:18 +08:00
1 parent 0fad6359b5
commit 1f8bd016aa
12 files changed
+286 -139

No files matched your search

+3 -3
View File
@@ -3,7 +3,7 @@ import { KyInstance } from "ky";
import { readFileSync } from "node:fs";
import { randomBytes } from "node:crypto";
import * as api from "./api.js";
import { defaultSealUrl, getHoseEnterpriseUrl, getHoseProvisionalAuthLink, probeHoseDomain } from "../../core/auth/hose.js";
import { defaultSealUrl, ensureHoseCloseApiToken, getHoseEnterpriseUrl, getHoseProvisionalAuthLink, probeHoseDomain } from "../../core/auth/hose.js";
import { CorpConfig } from "../../core/config/types.js";
import { loadGlobalConfig, loadCorpConfigs, getEnterprisesDirCandidates } from "../../core/config/loader.js";
import { resolveCorpConfig } from "../../core/config/manager.js";
@@ -1782,8 +1782,8 @@ export const sealTools = [
);
}
const linkInfo = await getHoseProvisionalAuthLink(context.corp, expiresIn);
const provisionalToken = new URL(linkInfo.url).searchParams.get("accessToken");
const hoseAccess = await ensureHoseCloseApiToken(context.corp);
const provisionalToken = hoseAccess.token;
if (!provisionalToken) {
throw new Error("Failed to obtain Hose provisional authentication token");
}