Release v0.8.0: Multi-Source High-Speed Downloads, Gitea Acceleration & Strict Anti-Rollback

This commit is contained in:
gitea committed 2026-08-25 16:05:06 +08:00
1 parent 7476db2bb5
commit 5a146adf5d
7 files changed
+162 -98

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-home",
"version": "0.7.1",
"version": "0.8.0",
"description": "Seal Home tenant operations: approval-run diagnosis, minimal rule remediation, delegation links, Hose/合思 authorization, users, rules, billing, and search.",
"author": {
"name": "yingqing"
+10
View File
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [0.8.0] - 2026-08-25
### Added
- **Multi-Source Download & Gitea Acceleration**: Enhanced `install.sh` and `seal-home update` with intelligent multi-source racing and automatic fallback across Gitea (`git.ying-qing.cn`), GitHub Releases, and CDN mirrors, achieving lightning-fast downloads in mainland China.
- **Strict Anti-Rollback & Forward-Only Enforcement**: Guarded update commands against downgrades to prevent state schema and skill definition corruption.
- **Release History & Changelog Introspection**: Integrated `seal-home changelog` and `update check` with publish timestamps, author identity, and intermediate version diff calculations.
- **Automated CI Tag Release Notes**: Updated GitHub Actions release workflow to extract annotated git tag messages and append GitHub-generated PR and commit notes.
---
## [0.7.1] - 2026-08-25
### Added
+144 -90
View File
@@ -24943,7 +24943,7 @@ async function createSealClientForToken(corp, token) {
// package.json
var package_default = {
name: "seal-home",
version: "0.7.1",
version: "0.8.0",
type: "module",
module: "src/server.ts",
bin: {
@@ -29565,7 +29565,7 @@ var openapi_default = {
openapi: "3.1.0",
info: {
title: "seal-home Wrapped API",
version: "0.7.1",
version: "0.8.0",
description: `Planned HTTP contract for the seal-home wrapped backend API.
These endpoints describe the intended stable API for frontend developers and agents once
@@ -33292,13 +33292,13 @@ import { dirname as dirname3, join as join6 } from "node:path";
// skills/seal-home/SKILL.md
var SKILL_default = `---
name: seal-home
description: "v0.7.0: Use when working with Seal Home tenant operations: packaged customer feedback from WeChat or screenshots, target-enterprise discovery, approval-run and Langfuse diagnosis, simulation test batch creation and publishing, minimal approval-rule remediation and publishing, delegation links, Hose/合思 authorization, LLM config, permissions, billing, users, rules, documents, and search."
description: "v0.8.0: Use when working with Seal Home tenant operations: packaged customer feedback from WeChat or screenshots, target-enterprise discovery, approval-run and Langfuse diagnosis, simulation test batch creation and publishing, minimal approval-rule remediation and publishing, delegation links, Hose/合思 authorization, LLM config, permissions, billing, users, rules, documents, and search."
metadata:
version: 0.7.0
short-description: Seal tenant and Hose approval automation (v0.7.0)
version: 0.8.0
short-description: Seal tenant and Hose approval automation (v0.8.0)
---
# Seal Home (v0.7.0)
# Seal Home (v0.8.0)
Use the \`seal_cli\` MCP tool when it is available; pass the command string as its \`command\` argument. If MCP is unavailable, fall back to the global \`seal-home\` CLI. This skill is a routing layer for agents: keep this file short, choose the right command, and read a focused reference only when the task needs detail.
@@ -34487,6 +34487,32 @@ async function handleUpdateCommand(runtime, options = {}) {
launcher: runtime.launcher
};
const repo = options.repo || process.env[GITHUB_REPO_ENV]?.trim() || DEFAULT_GITHUB_REPO;
const rawTarget = options.targetVersion?.trim();
const targetVersion = rawTarget && rawTarget.toLowerCase() !== "latest" ? rawTarget : undefined;
if (targetVersion) {
const cleanTarget = targetVersion.replace(/^v/, "");
const cmp = compareSemVer(cleanTarget, VERSION);
if (cmp < 0) {
printJson({
updated: false,
currentVersion: VERSION,
targetVersion: cleanTarget,
mode: isCompiledBinary() ? "binary" : "source",
message: `Cannot downgrade seal-home from v${VERSION} to older version v${cleanTarget}. Updates must be forward-only.`
});
return;
}
if (cmp === 0 && !options.force) {
printJson({
updated: false,
currentVersion: VERSION,
targetVersion: cleanTarget,
mode: isCompiledBinary() ? "binary" : "source",
message: `seal-home is already at version v${VERSION}. Use --force to reinstall.`
});
return;
}
}
if (options.changelogOnly) {
const releases2 = await fetchGitHubReleases(repo, options.limit ?? 10);
printJson({
@@ -34558,7 +34584,7 @@ async function handleUpdateCommand(runtime, options = {}) {
const platform = detectPlatform();
const arch = detectArch();
const releases = await fetchGitHubReleases(repo, 30);
const release = options.targetVersion ? releases.find((r) => r.version === options.targetVersion || r.tagName === options.targetVersion) ?? await fetchGitHubRelease(repo, options.targetVersion) : releases[0] ?? await fetchGitHubRelease(repo);
const release = targetVersion ? releases.find((r) => r.version === targetVersion || r.tagName === targetVersion || r.tagName === `v${targetVersion}`) ?? await fetchGitHubRelease(repo, targetVersion) : releases[0] ?? await fetchGitHubRelease(repo);
if (!release) {
printJson({
updated: false,
@@ -34571,7 +34597,7 @@ async function handleUpdateCommand(runtime, options = {}) {
const latestVersion = release.version;
const currentRelease = releases.find((r) => r.version === VERSION);
const isUpgrade = isNewerVersion(latestVersion, VERSION);
const shouldUpdate = options.force || Boolean(options.targetVersion) || isUpgrade;
const shouldUpdate = isUpgrade || Boolean(options.force);
const pendingReleases = releases.filter((r) => isNewerVersion(r.version, VERSION));
if (options.checkOnly) {
printJson({
@@ -34672,84 +34698,95 @@ function detectArch() {
return process.arch === "arm64" ? "arm64" : "x64";
}
async function fetchGitHubReleases(repo, limit = 20) {
const url2 = `https://api.github.com/repos/${repo}/releases?per_page=${limit}`;
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
const headers = {
"User-Agent": `seal-home/${VERSION}`,
Accept: "application/vnd.github.v3+json"
Accept: "application/vnd.github.v3+json",
...token ? { Authorization: `Bearer ${token}` } : {}
};
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
if (token) {
headers.Authorization = `Bearer ${token}`;
const urls = [
`https://api.github.com/repos/${repo}/releases?per_page=${limit}`,
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases?per_page=${limit}`
];
for (const url2 of urls) {
try {
const res = await fetch(url2, { headers, signal: AbortSignal.timeout(5000) });
if (!res.ok)
continue;
const json2 = await res.json();
if (!Array.isArray(json2) || json2.length === 0)
continue;
const list = [];
for (const item of json2) {
const tagName = item.tag_name ?? "";
const version2 = tagName.replace(/^v/, "");
if (!version2)
continue;
const assets = (item.assets ?? []).map((a) => ({
name: a.name,
downloadUrl: a.browser_download_url,
size: a.size ?? 0
}));
list.push({
version: version2,
tagName,
name: item.name ?? tagName,
publishedAt: item.published_at,
author: item.author?.login,
notes: item.body ?? "",
htmlUrl: item.html_url ?? "",
assets
});
}
if (list.length > 0)
return list;
} catch {}
}
try {
const res = await fetch(url2, { headers });
if (!res.ok)
return [];
const json2 = await res.json();
if (!Array.isArray(json2))
return [];
return json2.map((item) => {
const tagName = item.tag_name ?? "";
return [];
}
async function fetchGitHubRelease(repo, targetVersion) {
const tag = targetVersion ? targetVersion.startsWith("v") ? targetVersion : `v${targetVersion}` : undefined;
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
const headers = {
"User-Agent": `seal-home/${VERSION}`,
Accept: "application/vnd.github.v3+json",
...token ? { Authorization: `Bearer ${token}` } : {}
};
const urls = tag ? [
`https://api.github.com/repos/${repo}/releases/tags/${tag}`,
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/tags/${tag}`
] : [
`https://api.github.com/repos/${repo}/releases/latest`,
`https://git.ying-qing.cn/api/v1/repos/gitea/seal-home/releases/latest`
];
for (const url2 of urls) {
try {
const res = await fetch(url2, { headers, signal: AbortSignal.timeout(5000) });
if (!res.ok)
continue;
const json2 = await res.json();
const tagName = json2.tag_name ?? "";
const version2 = tagName.replace(/^v/, "");
if (!version2)
return;
const assets = (item.assets ?? []).map((a) => ({
name: a.name,
downloadUrl: a.browser_download_url,
size: a.size ?? 0
continue;
const assets = (json2.assets ?? []).map((item) => ({
name: item.name,
downloadUrl: item.browser_download_url,
size: item.size ?? 0
}));
return {
version: version2,
tagName,
name: item.name ?? tagName,
publishedAt: item.published_at,
author: item.author?.login,
notes: item.body ?? "",
htmlUrl: item.html_url ?? "",
name: json2.name ?? tagName,
publishedAt: json2.published_at,
author: json2.author?.login,
notes: json2.body ?? "",
htmlUrl: json2.html_url ?? "",
assets
};
}).filter((item) => Boolean(item));
} catch {
return [];
}
}
async function fetchGitHubRelease(repo, targetVersion) {
const url2 = targetVersion ? `https://api.github.com/repos/${repo}/releases/tags/${targetVersion.startsWith("v") ? targetVersion : `v${targetVersion}`}` : `https://api.github.com/repos/${repo}/releases/latest`;
const headers = {
"User-Agent": `seal-home/${VERSION}`,
Accept: "application/vnd.github.v3+json"
};
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
if (token) {
headers.Authorization = `Bearer ${token}`;
}
try {
const res = await fetch(url2, { headers });
if (!res.ok)
return;
const json2 = await res.json();
const tagName = json2.tag_name ?? "";
const version2 = tagName.replace(/^v/, "");
if (!version2)
return;
const assets = (json2.assets ?? []).map((item) => ({
name: item.name,
downloadUrl: item.browser_download_url,
size: item.size ?? 0
}));
return {
version: version2,
tagName,
name: json2.name ?? tagName,
publishedAt: json2.published_at,
author: json2.author?.login,
notes: json2.body ?? "",
htmlUrl: json2.html_url ?? "",
assets
};
} catch {
return;
} catch {}
}
return;
}
function matchAssetForPlatform(assets, platform, arch) {
const platformKeywords = {
@@ -34776,12 +34813,25 @@ function matchAssetForPlatform(assets, platform, arch) {
return archive || matched[0];
}
async function downloadFile(url2, destPath) {
const res = await fetch(url2);
if (!res.ok) {
throw new Error(`Failed to download asset from ${url2}: ${res.status} ${res.statusText}`);
const candidates = [url2];
if (url2.includes("github.com")) {
candidates.push(`https://ghfast.top/${url2}`);
}
const buffer = Buffer.from(await res.arrayBuffer());
writeFileSync7(destPath, buffer);
let lastError;
for (const candidate of candidates) {
try {
const res = await fetch(candidate, { signal: AbortSignal.timeout(15000) });
if (!res.ok) {
throw new Error(`HTTP ${res.status} ${res.statusText}`);
}
const buffer = Buffer.from(await res.arrayBuffer());
writeFileSync7(destPath, buffer);
return;
} catch (err) {
lastError = err instanceof Error ? err : new Error(String(err));
}
}
throw new Error(`Failed to download asset from ${url2}: ${lastError?.message}`);
}
function extractTarGz(archivePath, targetDir, platform) {
const result = spawnSync("tar", ["-xzf", archivePath, "-C", targetDir], { stdio: "pipe" });
@@ -34811,18 +34861,21 @@ function extractZip(archivePath, targetDir, platform) {
return exact;
return files[0] || archivePath;
}
function isNewerVersion(latest, current) {
const lParts = latest.split(".").map(Number);
const cParts = current.split(".").map(Number);
for (let i = 0;i < Math.max(lParts.length, cParts.length); i++) {
const l = lParts[i] ?? 0;
const c = cParts[i] ?? 0;
if (l > c)
return true;
if (l < c)
return false;
function compareSemVer(v1, v2) {
const p1 = v1.replace(/^v/, "").split(".").map((n) => Number.parseInt(n, 10) || 0);
const p2 = v2.replace(/^v/, "").split(".").map((n) => Number.parseInt(n, 10) || 0);
for (let i = 0;i < Math.max(p1.length, p2.length); i++) {
const a = p1[i] ?? 0;
const b = p2[i] ?? 0;
if (a > b)
return 1;
if (a < b)
return -1;
}
return false;
return 0;
}
function isNewerVersion(latest, current) {
return compareSemVer(latest, current) > 0;
}
function runCommand(command, args, options = {}) {
const result = spawnSync(command, args, {
@@ -35000,7 +35053,8 @@ var KNOWN_AREAS = new Set([
"mcp-config",
"skill",
"openapi",
"probe"
"probe",
"changelog"
]);
var runQueue = Promise.resolve();
function runCli(argv, options = {}) {
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "seal-home Wrapped API",
"version": "0.7.1",
"version": "0.8.0",
"description": "Planned HTTP contract for the seal-home wrapped backend API.\n\nThese endpoints describe the intended stable API for frontend developers and agents once\nthe HTTP adapter is implemented.\nThey are not the raw downstream Seal endpoints. seal-home is responsible for enterprise\nselection, source authentication, response compaction, and diagnostics-friendly fields.\n"
},
"servers": [
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: seal-home Wrapped API
version: 0.7.1
version: 0.8.0
description: |
Planned HTTP contract for the seal-home wrapped backend API.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-home",
"version": "0.7.1",
"version": "0.8.0",
"type": "module",
"module": "src/server.ts",
"bin": {
+4 -4
View File
@@ -1,12 +1,12 @@
---
name: seal-home
description: "v0.7.0: Use when working with Seal Home tenant operations: packaged customer feedback from WeChat or screenshots, target-enterprise discovery, approval-run and Langfuse diagnosis, simulation test batch creation and publishing, minimal approval-rule remediation and publishing, delegation links, Hose/合思 authorization, LLM config, permissions, billing, users, rules, documents, and search."
description: "v0.8.0: Use when working with Seal Home tenant operations: packaged customer feedback from WeChat or screenshots, target-enterprise discovery, approval-run and Langfuse diagnosis, simulation test batch creation and publishing, minimal approval-rule remediation and publishing, delegation links, Hose/合思 authorization, LLM config, permissions, billing, users, rules, documents, and search."
metadata:
version: 0.7.0
short-description: Seal tenant and Hose approval automation (v0.7.0)
version: 0.8.0
short-description: Seal tenant and Hose approval automation (v0.8.0)
---
# Seal Home (v0.7.0)
# Seal Home (v0.8.0)
Use the `seal_cli` MCP tool when it is available; pass the command string as its `command` argument. If MCP is unavailable, fall back to the global `seal-home` CLI. This skill is a routing layer for agents: keep this file short, choose the right command, and read a focused reference only when the task needs detail.