Release v0.9.2: Real-time streaming download progress and live mirror feedback during self-update

This commit is contained in:
gitea committed 2026-08-25 19:10:30 +08:00
1 parent 013a788077
commit 7cdadf60ca
7 files changed
+76 -24

No files matched your search

+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-home",
"version": "0.9.1",
"version": "0.9.2",
"description": "Seal Home tenant operations: approval-run diagnosis, minimal rule remediation, delegation links, Hose/合思 authorization, users, rules, billing, and search.",
"author": {
"name": "yingqing"
+8
View File
@@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
---
## [0.9.2] - 2026-08-25
### Fixed & Enhanced
- **Real-Time Streaming Download Progress in Self-Update**: Upgraded `seal-home update` to stream download progress, mirror probe status, and live percentages directly to `stderr` in real-time, eliminating silent waiting and terminal stalling during binary upgrades.
- **Fast Mirror Connectivity Probes**: Added fast 10s connection timeouts and stream chunk tracking for Gitea, fast CDN proxies, and GitHub download candidates.
---
## [0.9.1] - 2026-08-25
### Added
+60 -16
View File
@@ -24943,7 +24943,7 @@ async function createSealClientForToken(corp, token) {
// package.json
var package_default = {
name: "seal-home",
version: "0.9.1",
version: "0.9.2",
type: "module",
module: "src/server.ts",
bin: {
@@ -30193,7 +30193,7 @@ var openapi_default = {
openapi: "3.1.0",
info: {
title: "seal-home Wrapped API",
version: "0.9.1",
version: "0.9.2",
description: `Planned HTTP contract for the seal-home wrapped backend API.
These endpoints describe the intended stable API for frontend developers and agents once
@@ -34495,13 +34495,13 @@ import { dirname as dirname3, join as join6 } from "node:path";
// skills/seal-home/SKILL.md
var SKILL_default = `---
name: seal-home
description: "v0.9.1: 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.9.2: 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.9.1
short-description: Seal tenant and Hose approval automation (v0.9.1)
version: 0.9.2
short-description: Seal tenant and Hose approval automation (v0.9.2)
---
# Seal Home (v0.9.1)
# Seal Home (v0.9.2)
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.
@@ -36040,12 +36040,18 @@ function matchAssetForPlatform(assets, platform, arch) {
const archive = matched.find((asset) => asset.name.endsWith(".tar.gz") || asset.name.endsWith(".tgz") || asset.name.endsWith(".zip"));
return archive || matched[0];
}
function logProgress(msg) {
try {
process.stderr.write(`${msg}
`);
} catch {}
console.error(msg);
}
async function downloadFile(url2, destPath, tagName, assetName) {
const candidates = [];
if (tagName && assetName) {
const tag = tagName.startsWith("v") ? tagName : `v${tagName}`;
candidates.push(`https://git.ying-qing.cn/gitea/seal-home/releases/download/${tag}/${assetName}`);
candidates.push(`https://git.ying-qing.cn/gitea/seal-home/releases/download/latest/${assetName}`);
}
if (url2.startsWith("https://git.ying-qing.cn")) {
candidates.unshift(url2);
@@ -36060,23 +36066,61 @@ async function downloadFile(url2, destPath, tagName, assetName) {
}
const uniqueCandidates = Array.from(new Set(candidates));
let lastError;
for (const candidate of uniqueCandidates) {
for (let i = 0;i < uniqueCandidates.length; i++) {
const candidate = uniqueCandidates[i];
try {
console.error(`==> Trying download mirror: ${candidate}`);
const res = await fetch(candidate, { signal: AbortSignal.timeout(30000) });
logProgress(`==> [${i + 1}/${uniqueCandidates.length}] Downloading via: ${candidate}`);
const res = await fetch(candidate, { signal: AbortSignal.timeout(1e4) });
if (!res.ok) {
throw new Error(`HTTP ${res.status} ${res.statusText}`);
}
const buffer = Buffer.from(await res.arrayBuffer());
if (buffer.length < 1000) {
throw new Error(`Downloaded content is suspiciously small (${buffer.length} bytes)`);
const totalBytes = Number(res.headers.get("content-length")) || 0;
const reader = res.body?.getReader();
if (!reader) {
const buffer = Buffer.from(await res.arrayBuffer());
if (buffer.length < 1000) {
throw new Error(`Downloaded content is suspiciously small (${buffer.length} bytes)`);
}
writeFileSync7(destPath, buffer);
logProgress(`✓ Download succeeded (${(buffer.length / 1024 / 1024).toFixed(1)} MB)`);
return;
}
writeFileSync7(destPath, buffer);
console.error(`✓ Download succeeded from: ${candidate} (${buffer.length} bytes)`);
const chunks = [];
let receivedBytes = 0;
let lastReport = 0;
while (true) {
const { done, value } = await reader.read();
if (done)
break;
if (value) {
chunks.push(value);
receivedBytes += value.length;
const now = Date.now();
if (now - lastReport > 200) {
lastReport = now;
const percent = totalBytes ? Math.round(receivedBytes / totalBytes * 100) : 0;
const receivedMb = (receivedBytes / (1024 * 1024)).toFixed(1);
const totalMb = totalBytes ? (totalBytes / (1024 * 1024)).toFixed(1) : "?";
try {
process.stderr.write(`\r ↳ Progress: ${percent}% (${receivedMb} / ${totalMb} MB)...`);
} catch {}
}
}
}
try {
process.stderr.write(`
`);
} catch {}
const completeBuffer = Buffer.concat(chunks);
if (completeBuffer.length < 1000) {
throw new Error(`Downloaded content is suspiciously small (${completeBuffer.length} bytes)`);
}
writeFileSync7(destPath, completeBuffer);
logProgress(`✓ Download completed successfully (${(completeBuffer.length / 1024 / 1024).toFixed(1)} MB)`);
return;
} catch (err) {
lastError = err instanceof Error ? err : new Error(String(err));
console.error(` ↳ Mirror failed: ${lastError.message}`);
logProgress(` ↳ Mirror failed: ${lastError.message}`);
}
}
throw new Error(`Failed to download asset from all mirrors: ${lastError?.message}`);
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "seal-home Wrapped API",
"version": "0.9.1",
"version": "0.9.2",
"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.9.1
version: 0.9.2
description: |
Planned HTTP contract for the seal-home wrapped backend API.
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "seal-home",
"version": "0.9.1",
"version": "0.9.2",
"type": "module",
"module": "src/server.ts",
"bin": {
+4 -4
View File
@@ -1,12 +1,12 @@
---
name: seal-home
description: "v0.9.1: 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.9.2: 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.9.1
short-description: Seal tenant and Hose approval automation (v0.9.1)
version: 0.9.2
short-description: Seal tenant and Hose approval automation (v0.9.2)
---
# Seal Home (v0.9.1)
# Seal Home (v0.9.2)
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.