Compare commits

..
Author SHA1 Message Date
gitea bfbf6cf55f chore: 加固 Gitea Release 上传,避免维护期丢资产
0.9.5 的 Release workflow 因 Gitea 服务端维护期不稳,5 个资产
上传 3 次重试全部失败,Gitea 侧只落地 7/12(已手动补齐)。
根因不是代码缺陷,但二进制变大后并发大文件上传放大了影响。

- job timeout-minutes: 30 → 60,给重试留足窗口。
- 单资产重试次数 3 → 5,间隔保持 3 秒。
- 上传从「2 并发 + wait」改为串行,维护期不再互相抢带宽;
  幂等逻辑不变(已存在资产校验 SHA-256 后跳过,字节不同才删除重传)。
- 同步 release-validation.test.ts:断言改 attempt 2/5,
  并发用例改为验证严格单 worker(peak === 1),
  失败用例的 spawnSync 超时放宽到 40s。

校验:YAML parse 通过;bun test 1114 pass / 0 fail;
bun run check、check:readme 37/37 全通过。
本次只改 CI,不打 tag、不发版。
2026-11-06 10:39:49 +08:00
yunyingk f3caebfd8a Merge pull request #181 from yunyingk/release/v0.9.5
CI / validate (push) Canceled after 0s
🚀 Release / 🚀 Build & Publish Multi-Platform Binaries (push) Canceled after 0s
chore: 发布 0.9.5
2026-11-06 01:31:35 +08:00
gitea 1eeb288143 chore: 发布 0.9.5
版本号统一提升至 0.9.5,同步 package.json、README、两份 Skill、
.zcode-plugin/plugin.json、OpenAPI YAML 与 bundled JSON;重新生成
OpenAPI 规范与 MCP plugin bundle。

本版相对 0.9.4 合入 #180:/docs 交互式文档改为完全离线——
Scalar standalone 运行时内嵌进二进制,由 GET /static/scalar.js
本地提供,HTML 加 CSP 兜底,运行时零 CDN 依赖。

校验:bun run bump patch 版本同步通过;bun test 1114 pass / 0 fail;
bun run check、check:version、check:readme(37/37)全通过。
2026-11-06 01:30:22 +08:00
yunyingk 4272dd8e60 Merge pull request #180 from yunyingk/fix/offline-api-docs
CI / validate (push) Has been cancelled
fix: /docs 交互式文档改为完全离线,去掉 CDN 依赖
2026-11-05 20:56:30 +08:00
9 changed files with 20 additions and 28 deletions

No files matched your search

+7 -15
View File
@@ -27,7 +27,7 @@ jobs:
build-and-publish:
name: 🚀 Build & Publish Multi-Platform Binaries
runs-on: ubuntu-latest
timeout-minutes: 30
timeout-minutes: 60
permissions:
contents: write
env:
@@ -183,9 +183,9 @@ jobs:
local file="$1" filename expected_hash attempt info existing remote_hash asset_id response delete_failed
filename=$(basename "$file")
expected_hash=$(sha256sum "$file" | awk '{ print $1 }')
for attempt in 1 2 3; do
for attempt in 1 2 3 4 5; do
if [ "$attempt" -gt 1 ]; then sleep "${GITEA_RETRY_DELAY:-3}"; fi
echo " [start] Uploading ${filename} to Gitea (attempt ${attempt}/3)..."
echo " [start] Uploading ${filename} to Gitea (attempt ${attempt}/5)..."
if ! info=$(curl -fsS --connect-timeout 15 --max-time 60 -H "Authorization: token ${GITEA_TOKEN}" "${GITEA_HOST}/api/v1/repos/${GITEA_REPO}/releases/${RELEASE_ID}"); then
continue
fi
@@ -212,24 +212,16 @@ jobs:
return 0
fi
done
echo "::error::Failed to upload ${filename} after 3 attempts."
echo "::error::Failed to upload ${filename} after 5 attempts."
return 1
}
# Bound outbound traffic: large raw binaries must not compete with all archives.
pids=()
# 串行上传:Gitea 维护期并发推大文件容易把重试窗口耗光,宁可慢也不要丢资产。
# 配合 job 超时 60 分钟与单资产 5 次重试,给服务端抖动留出余量。
failed=0
for file in dist/bin/hose-use-* dist/bin/checksums.txt; do
upload_asset "$file" &
pids+=($!)
if [ "${#pids[@]}" -eq 2 ]; then
for pid in "${pids[@]}"; do wait "$pid" || failed=1; done
pids=()
fi
upload_asset "$file" || failed=1
done
if [ "${#pids[@]}" -gt 0 ]; then
for pid in "${pids[@]}"; do wait "$pid" || failed=1; done
fi
if [ "$failed" -ne 0 ]; then
echo "::error::One or more Gitea assets failed to upload."
exit 1
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hose-use",
"version": "0.9.4",
"version": "0.9.5",
"description": "合思/易快报 (ekuaibao) 企业级 SaaS CLI 与底层 SDK:多账号登录、企业租户切换、单据明细检索、工作流管理、内置 HTTP 服务与常驻守护进程。",
"author": {
"name": "yingqing"
+1 -1
View File
@@ -1,4 +1,4 @@
# hose-use (v0.9.4)
# hose-use (v0.9.5)
合思/易快报(ekuaibao)企业级 CLI 命令行工具与底层 SDK。
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "hose-use",
"version": "0.9.4",
"version": "0.9.5",
"module": "src/server.ts",
"type": "module",
"exports": {
+4 -4
View File
@@ -162,7 +162,7 @@ for arg in "$@"; do
done
exit 22
`, { mode: 0o755 });
const result = spawnSync("bash", ["-eo", "pipefail", "-c", step.run], { cwd: f.root, env: { ...process.env, PATH: `${join(f.root, "tools")}:${process.env.PATH}`, GITEA_TOKEN: "fixture", GITEA_RETRY_DELAY: "0", GITEA_HOST: "https://example.test", GITEA_REPO: "test/repo", RELEASE_TAG: "v1.0.0" }, encoding: "utf8", timeout: 30_000 });
const result = spawnSync("bash", ["-eo", "pipefail", "-c", step.run], { cwd: f.root, env: { ...process.env, PATH: `${join(f.root, "tools")}:${process.env.PATH}`, GITEA_TOKEN: "fixture", GITEA_RETRY_DELAY: "0", GITEA_HOST: "https://example.test", GITEA_REPO: "test/repo", RELEASE_TAG: "v1.0.0" }, encoding: "utf8", timeout: 40_000 });
expect(result.status).toBe(1);
expect(result.stdout).toContain("assets failed to upload");
expect(result.stdout).not.toContain("Successfully published");
@@ -173,7 +173,7 @@ exit 22
const result = f.run();
expect(result.status).toBe(0);
for (const name of f.files) expect(readFileSync(join(f.root, `count-${name}`), "utf8")).toBe("2");
expect(result.stdout).toContain("attempt 2/3");
expect(result.stdout).toContain("attempt 2/5");
}, 60_000);
test("correct mirror assets are verified and retained without uploading replacements", () => {
@@ -189,7 +189,7 @@ exit 22
expect(readFileSync(join(f.root, "gh.log"), "utf8")).toContain("release download v1.0.0");
}, 60_000);
test("asset transfers never exceed two concurrent workers", () => {
test("asset transfers are serialized to a single worker", () => {
const f = mirrorFixture("concurrency");
expect(f.run().status).toBe(0);
let active = 0, peak = 0;
@@ -198,6 +198,6 @@ exit 22
peak = Math.max(peak, active);
}
expect(active).toBe(0);
expect(peak).toBeLessThanOrEqual(2);
expect(peak).toBe(1);
}, 60_000);
});
+2 -2
View File
@@ -2,11 +2,11 @@
name: hose-aipro
description: "合思 AI PRO(EASO AI PRO)确定性审批仲裁网关 CLI 与技能套件:单据挂载绑定、事实证据核验与打标 (PASS/FAIL/SKIP)、审核要点/规则场景库检索、确定性审批仲裁(同意/驳回/转人工硬阻断)、审计轨迹日志查询与常驻服务管理。用于一切合思 AI PRO 确定性审批仲裁与要点核验请求。"
metadata:
version: 0.9.4
version: 0.9.5
short-description: 合思 AI PRO 确定性审批仲裁网关与审核要点核验 skill
---
# hose-aipro (v0.9.4)
# hose-aipro (v0.9.5)
合思 AI PRO 确定性审批仲裁网关是专门面向企业财务核算、单据审核与自动化合规风控的确定性仲裁命令行与 SDK。
+2 -2
View File
@@ -2,11 +2,11 @@
name: hose-use
description: "合思/易快报(Ekuaibao)企业级 SaaS 一站式能力:hose-use CLI/SDK 多账号登录、租户切换、单据检索与审批动作、自建应用与工作流扫描、密钥与应用中心、常驻守护进程与 HTTP 文档/OpenAPI,以及工作流 MVEL 代码节点脚本生成调试、节点批量开通。用于一切合思/易快报相关请求。"
metadata:
version: 0.9.4
version: 0.9.5
short-description: 合思/易快报 企业级 CLI 与工作流 skill 套件(含 MVEL 代码节点)
---
# hose-use (v0.9.4)
# hose-use (v0.9.5)
在具备 MCP 的 AI 智能体环境中,**优先使用 `hose_cli` 单工具网关**,传入 `command: string` 执行;在终端或自动化脚本中,直接调用全局 `hose` 或 `hose-use` 命令行。
本 Skill 是智能体的路由分发层:保持主文档简明,遇到复杂业务时深入查阅对应的专属参考文档(`references/*.md`)。
+1 -1
View File
@@ -1,7 +1,7 @@
openapi: 3.1.0
info:
title: hose-use API & MCP Tools Specification
version: 0.9.4
version: 0.9.5
description: >-
Unified Enterprise SaaS API, CLI, and MCP Specification for Ekuaibao (合思/易快报), EASO, and Piper Workflows.
servers:
+1 -1
View File
@@ -2,7 +2,7 @@
"openapi": "3.1.0",
"info": {
"title": "hose-use API & MCP Tools Specification",
"version": "0.9.4",
"version": "0.9.5",
"description": "Unified Enterprise SaaS API, CLI, and MCP Specification for Ekuaibao (合思/易快报), EASO, and Piper Workflows."
},
"servers": [