# Changelog All notable changes to `seal-use` will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [0.10.9] - 2026-09-04 ### Refactored & Purged - **MCP Legacy Code Purge & Strict CLI-First Architecture**: - Removed obsolete intermediate MCP definitions (`sealMcpTools`, `mcpDirectToolNames`, `sealActionNames`, `sealActionAliases`, `runSealAction`, `sealActionHelp`, `findSealMcpTool`) from `src/domains/seal/tools.ts`. - Removed mistakenly registered `seal_approval_run_attachments_download` tool definition and aliases from `tools.ts`. - Decoupled `seal-use approval-runs attachments` (inspection & download) CLI commands to invoke pure domain functions in `src/domains/seal/attachments.ts` directly, bypassing the legacy tool runner. - Purged obsolete "Fine-Grained Tools" lists from `README.md` and `skills/seal-use/references/cli.md`, reinforcing the CLI-First contract where agents execute `seal-use ` directly or via the single `seal_cli` MCP tool. - **Repository-Wide Dead Code & Unused Export Cleanup**: - Eliminated duplicate enterprise directory export aliases in `src/core/config/loader.ts`. - Converted internal helpers in `src/core/embedded-skill.ts`, `src/cli/printer.ts`, `src/cli/commands/auth.ts`, `src/domains/seal/linter/loader.ts`, `src/domains/seal/material-pack/validate.ts`, and `src/core/auth/seal.ts` to private module functions. ## [0.10.8] - 2026-09-04 ### Added & Enhanced - **Approval Run Attachments Extraction Compatibility (Issue #35)**: - Generalized `extractApprovalRunAttachments` to inspect `document.fields[].type === "ATTACHMENT"` arrays with nested `value[]` collections, properly recognizing HoseCloud/Seal 2026 flattened attachment fields that previously resolved to `count: 0`. - Extracted comprehensive metadata including `ossSignedUrl`, `token` (automatically parsing embedded `fileId` and object `key`), `ossFileSize`, `mimeType`, and preserved parent field labels as `sourceField`. - Added `hasSignedUrl` and `ossFileSize` to compact summary outputs without exposing raw signed URLs. - **New Attachments Download Command (Issue #35)**: - Added `seal-use approval-runs attachments download [--name ] [--all] [--out-dir ]` CLI command. - Prioritizes direct `ossSignedUrl` links from the run record and verifies downloaded file size against `ossFileSize`. - Automatically sanitizes sensitive temporary signatures in CLI logging (`?[MASKED]`) to prevent credential leakage in build/agent transcripts. - Implemented graceful error recovery for expired temporary URLs (HTTP 403) or missing links, reporting diagnostics for failed items while allowing valid attachments to complete without interruption. ## [0.10.7] - 2026-09-04 ### Added & Enhanced - **Local Approval Rules Workspace & Offline Linting**: - Added `seal-use rules pull` (`seal_approval_rules_pull`) to export remote draft or published version rules to a local JSON file (defaults to `./rules.local.json`), eliminating unwanted mutations to remote drafts. - Added `seal-use rules lint --file ` to execute rule quality and execution checks completely offline with zero network requests and zero dirty version records in the remote backend. Supports quality score gates (`--min-score`) and operates seamlessly even without configured enterprise credentials. - Added `seal-use rules push` (`seal_approval_rules_push`) to apply refined local rules to the remote draft with preview (`--dry-run`), confirmation (`--yes`), and optional single-step formal release publishing (`--publish`). - **Persistent HTTP Companion Daemon in Background Service**: - Embedded the HTTP API server into `seal-use service run`, allowing `seal-use service start` to run as a detached background daemon with persistent HTTP service (serving `/docs`, `/openapi.json`, and `POST /api/cli`). - Added `seal-use service logs` (`--lines `) to easily inspect service background activity. - Enhanced `seal-use service status` to track active host, port, and URL via daemon metadata state. - Optimized `parseJsonBody` and CLI runner concurrency with standing command bypasses to prevent process queue blocks. - Added top-level `seal-use stop` command, intuitive service aliases (`seal-use service kill|down|shutdown`), and `POST /shutdown` HTTP endpoint to gracefully terminate the background daemon from any terminal or script. ## [0.10.6] - 2026-09-03 ### Added & Enhanced - **Inbound Webhook Material Pack Import (Issue #27)**: Added local preview and push workflows for SealAI material packs, including strict ZIP/XLSX validation, normalized approval-document parsing, attachment upload, and HMAC-signed Webhook delivery. - **CLI and MCP Support**: Added `seal-use webhook material-pack preview|push` and the `seal_webhook_material_pack` tool, while keeping the existing simulation `material_pack` flow separate. - **Test-Enterprise Verification**: Verified the new push path against the configured test enterprise with official sample materials; customer enterprise data was not used. ## [0.10.5] - 2026-09-03 ### Added & Enhanced - **Intelligent HoseCloud Sync Discovery & Actionable Guidance (Issue #26)**: In `seal-use deploy hosecloud sync` and `deploy hosecloud get`, when `` is omitted, the CLI dynamically discovers all active HoseCloud integration configs for the tenant and renders structured cards on `stderr` with 1-click copy commands (e.g. `👉 同步命令: seal-use deploy hosecloud sync --corp `). - **Single-Config Fast Track (`--auto`)**: Added `--auto` (and `--yes`) flag to `deploy hosecloud sync`. When a tenant has exactly one configured HoseCloud integration, `--auto` automatically locks and syncs without requiring manual `signKey` extraction. - **Enhanced Empty State & Diagnostic Hints**: If a tenant has zero HoseCloud integrations configured, clearly prompts the user with next-step configuration command `seal-use deploy hosecloud configure ...`. - **Updated Reference Documentation**: Updated `skills/seal-use/references/hose-enterprise-deploy.md` and CLI references with `--auto` and dynamic discovery patterns. ## [0.10.4] - 2026-09-03 ### Added & Enhanced - **Built-in Approval Rule Linter & Quality Validation Engine**: Introduced a pure TypeScript/heuristic rule quality validator (`seal-use rules lint` & `seal_approval_rules_lint`). Detects subjective fuzzy words (`原则上`, `尽量`, `适当`, `酌情`), hanging exception clauses lacking evidence keywords (`除非/特殊情况` 未指明 `备注/附件/截图` 凭证来源), and short invalid descriptions. - **Plugin-as-Code Dynamic TS Linter Loader**: Supports loading custom enterprise TypeScript linter plugins dynamically from `~/.config/seal-use/linters/*.ts` or explicit paths (`--linter `). - **Fault-Tolerant Automatic Fallback (Anti-Crash Guarantee)**: If a user's custom `.ts` linter file contains syntax errors, throws runtime exceptions, or is missing, the engine automatically catches errors, logs diagnostic warnings to `stderr`, and seamlessly falls back to the built-in heuristic linter without failing or blocking CLI execution. - **Global Config & Default-Disabled Policy**: Added `lint: { enabled: false, activeLinter: "builtin", minScore: 0 }` to global configuration (`~/.config/seal-use/config.json`). Linter is **disabled by default** to avoid unsolicited noise; can be enabled via `seal-use config lint enable`. - **Real-time Diagnostic Hook on Rule Updates**: When linting is enabled, `seal_approval_rule_update` automatically inspects modified descriptions and outputs structured warnings on `stderr` while keeping clean machine JSON on `stdout`. - **Comprehensive Scenarios & Gatekeeping**: `seal-use rules lint` supports full draft scanning, historical version review (`--version `), rule filtering (`--code `), summary mode (`--summary`), and quality gate scoring (`--min-score `) with non-zero exit codes. - **Dedicated Reference Documentation**: Added `skills/seal-use/references/rule-lint.md` and updated SKILL router. ## [0.10.3] - 2026-09-02 ### Added & Enhanced - **Auto Platform Probing for HoseCloud Deployment**: In `deploy hosecloud configure` (`seal_deploy_hosecloud_configure`), automatically probes 6 standard Hose SaaS platform domains (Standard, DingTalk, WeChat Work, Feishu, CloudHub, DingTalk Enterprise) using `probeHoseDomain` when `customApiUrl` is omitted. Eliminates manual platform guessing and prevents authentication failures (`请检查 API 平台和凭证配置是否正确`). - **Standardized Business Terminology**: Aligned all CLI and tool descriptions with Seal AI product semantics: `Seal AI 智能审核发布到合思费控` (replacing raw backend jargon like "合思出站消息"). - **Dedicated Reference Documentation**: Added `skills/seal-use/references/hose-enterprise-deploy.md` covering end-to-end deployment, auto platform detection, 3-step publishing, and EBot node integration. ## [0.10.2] - 2026-09-02 ### Added & Enhanced - **Agent Skill Self-Bootstrap & Auto-Installation**: Embedded direct 1-line installation scripts into `skills/seal-use/SKILL.md` and onboarding references. Third-party AI Agents can now automatically self-install and bootstrap `seal-use` when missing without human intervention. - **CI / Mirror Routing Isolation**: Added intelligent mirror mode resolver (`SEAL_USE_MIRROR=github|gitea|auto`). Automatically bypasses Gitea in CI environments to ensure 100% offline, deterministic, and fast (<20s) test execution. ## [0.10.1] - 2026-09-02 ### Changed & Infrastructure - **Default Branch Modernization (`master` $\rightarrow$ `main`)**: Standardized default branch to `main` across GitHub and Gitea with dual-branch transition compatibility for legacy script URLs. - **Repository Rename (`seal-home` $\rightarrow$ `seal-use`)**: Updated primary repository references to `yunyingk/seal-use` and `gitea/seal-use` with multi-source fallback and GitHub 301/302 redirect support. - **Two-Job Decoupled Release Architecture**: Split CI/CD release workflow into independent GitHub Release job (~40s fast path) and asynchronous Gitea mirror sync job. - **Tiered Gitea Sync with Supreme Priority**: Prioritized `seal-use-darwin-arm64.tar.gz` and `checksums.txt` (Tier 1, ~26MB) for 10-second sync completion on macOS Apple Silicon. ## [0.10.0] - 2026-09-02 ### Added & Changed - **Rebrand to `seal-use`**: Aligned naming mental model with `hose-use` for a unified developer and Agent CLI/SDK ecosystem. - **Clean Agent Skill Cutover**: Replaced `skills/seal-home` with `skills/seal-use` and `.agents/skills/seal-use`. Embedded installer and runtime automatically clean up legacy `~/.agents/skills/seal-home` to eliminate model prompt pollution and routing collisions. - **Dual CLI Binary & Alias Compatibility**: `package.json` exposes both `seal-use` and `seal-home`. Binaries, installer, and self-updater maintain symlinks for 100% backward compatibility with existing terminal habits. - **Cascading Configuration & Token Fallback**: Primary storage in `~/.config/seal-use/` with seamless fallback and lazy migration from legacy `~/.config/seal-home/`. Environment variables support `SEAL_USE_*` with `SEAL_HOME_*` fallback. - **Runtime Self-Healing Bootstrap**: Added zero-overhead runtime self-healing that automatically repairs missing `seal-use` binaries and upgrades global skills when older `<= 0.9.8` installations update. - **Installer Modernization**: Updated `scripts/install.sh` to download `seal-use` assets, create alias symlinks, and clean legacy skills. ## [0.9.8] - 2026-09-02 ### Added - **Hose Assistance-Link Onboarding**: Added `seal-home corps add-link ` to parse supported `thirdparty.html` links, exchange the temporary Hose token through Seal SSO, verify the tenant identity, and write a short-lived enterprise config. - **Direct Delegation Link Generation**: Added `seal-home delegation create --from-link ` to generate a Seal delegation link without first persisting an enterprise config. - **Credential Safety Checks**: Restricted incoming links to HTTPS Hose domains, redacted temporary credentials from CLI output, rejected tenant mismatches, and added focused parser, exchange, onboarding, and delegation tests. ## [0.9.7] - 2026-09-01 ### Enhanced - **Agent-first Enterprise Onboarding**: Added a dedicated first-run workflow that makes Agents discover configured enterprises before asking users for parameters, resolves human enterprise names to internal IDs, and avoids asking users for discoverable `corpId`, `staffId`, or tenant identifiers. - **Identity and Credential Classification**: Clearly separated Hose/合思-sourced versus Seal-native tenant identity from the way access was obtained: standard Hose app credentials, incoming assistance links, or browser-copied cURL sessions. - **Browser cURL Guidance and Secret Handling**: Added concrete F12/Network/Fetch-XHR capture instructions, read-only verification guidance, credential redaction rules, and explicit boundaries for raw cURL and assistance-link capabilities not yet supported by the CLI. - **Simplified Hose Setup Routing**: Updated the standard Hose path to request only `appKey` and `appSecurity` initially, while automatically discovering the domain, enterprise, and administrator candidates. --- ## [0.9.6] - 2026-08-27 ### Fixed & Enhanced - **Smart Download Speed & Stall Monitor**: Added dynamic transfer speed monitoring with a 50 KB/s low-speed threshold and 5s stall detection in `seal-home update`, allowing fast downloads to complete without artificial timeouts while proactively abandoning crawling mirrors. - **Deduplicated Progress Logging**: Eliminated duplicated stderr/console progress logging in binary downloads. - **Curated Mirror List**: Pruned expired/broken CDN mirrors from the fallback candidate chain. --- ## [0.9.5] - 2026-08-27 ### Enhanced & Optimized - **CI/CD Pipeline Security & Least Privilege**: Updated GitHub Actions CI to strictly enforce `permissions: contents: read` and automatic concurrency cancellation (`concurrency.cancel-in-progress: true`), preventing workflow backlogs and privilege escalation. - **CI Build Integrity & Artifact Drift Validation**: Added automated OpenAPI bundling, MCP plugin build, and standalone binary build steps in CI, ensuring `dist/openapi.json` and `dist/mcp/server.js` stay perfectly in sync with source definitions (`git diff --exit-code`). - **Parallel Multi-Platform Cross-Compilation**: Refactored `scripts/build-binary.mjs` to compile all 5 target platform binaries concurrently via `Promise.all`, reducing full build time by 60%+. - **Binary & Plugin Minification**: Enabled `--minify` across standalone binary and MCP plugin builds, reducing plugin bundle size from 1.32MB down to 0.75MB and optimizing binary startup latency. - **Automated SHA-256 Checksums Generation**: Integrated automated `checksums.txt` generation in release pipelines, allowing secure verification of binary integrity upon download. - **Enhanced Installer (`install.sh`)**: Added support for `SEAL_HOME_VERSION` custom version targeting and automated SHA-256 integrity verification. - **Repository Hygiene & Community Standards**: Added standard MIT `LICENSE`, `.editorconfig`, GitHub Issue Forms (`bug_report.yml`, `feature_request.yml`, `config.yml`), Pull Request template, and status badges. --- ## [0.9.4] - 2026-08-26 ### Fixed & Enhanced - **Seamless Release Mirror Fallback & Fail-Safe Routing**: Enhanced `seal-home update` release discovery and asset downloading to automatically fall through to fast CDN and GitHub direct mirrors if a primary mirror returns an incomplete/empty asset list or times out, preventing update failures during in-progress release publishing. - **Unconditional Global Skill Synchronization**: Ensured `seal-home update` and `skill install` always overwrite and synchronize all latest embedded skill files (including `SKILL.md` and all references) to `~/.agents/skills/seal-home/`. - **Parallel Gitea Asset Release Upload**: Optimized CI release workflow to upload release binaries in parallel, reducing publishing latency from 6+ minutes down to ~30 seconds. --- ## [0.9.3] - 2026-08-26 ### Added - **Automated Hose Enterprise Initialization & Probing**: Added `seal-home corps probe-hose` to probe enterprise metadata and discover available role definition groups via OpenAPI. - **Multi-Domain Concurrent Probing**: Intelligently probes candidate public SaaS domains (`app.ekuaibao.com`, `dd2.hosecloud.com`, `wx2.ekuaibao.com`, `kdcloud2.ekuaibao.com`, `ddenterprise.ekuaibao.com`, `feishu.ekuaibao.com`) when `domain` is omitted, while supporting explicit custom domains for private cloud / dedicated tenants (e.g. 美年大健康). - **OpenAPI Role & Staff Discovery**: Added `seal-home corps hose-staffs` to query members under any role (defaults to `admin`, or business roles like `财务主管`, `采购申请权限`) and batch resolve member details (name, cellphone, activation status, third-party user ID) via `POST /api/openapi/v1/staffs/getStaffIds`. - **Strict Staff Selection Guard (Anti-Silent Activation)**: Guarded `seal-home corps add-hose` against silent administrator activation. When multiple candidate administrators exist, the system requires explicit selection (`staffId`, `staffName`, or `staffPhone`) or structured candidate confirmation. - **Dedicated Skill Reference**: Added `skills/seal-home/references/hose-enterprise-init.md` covering domain decision tiering, OpenAPI contracts, and non-TUI Agent autonomous workflows. --- ## [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 - **Native HTTP REST API & Documentation Server**: Added `seal-home http [--port 8787] [--host 127.0.0.1]` and `seal-home serve` to start a zero-dependency local HTTP API server. - **Interactive API Reference (`/docs`)**: Built-in interactive Scalar API documentation rendering the full OpenAPI 3.1.0 specification. - **Agent CLI & Tool Execution Endpoints**: Added `POST /api/cli` (executing arbitrary seal-home commands over HTTP with JSON responses) and `POST /api/tool/:name` (invoking granular tools directly). - **Standard RESTful API Endpoints (`/v1/*`)**: Exposed OpenAPI-mapped RESTful endpoints for corps, whoami, approval runs, rules, simulations, and decision preferences. - **Full CORS & Enterprise Header Routing**: Enabled out-of-the-box CORS support and `X-Seal-Corp` header routing for web frontends, Dify, FastGPT, and external automation workflows. --- ## [0.9.0] - 2026-08-25 ### Added - **Multi-Platform Simulation & Lifecycle Management**: Added support for multi-source system simulation (`hosecloud`, `feishu`, `weaver`, `helios`, `maycur`, `material_pack`) along with `simulation wait ` (polling batch completion), `simulation clean ` (purging test data), and `simulation specifications` (listing available templates). - **HoseCloud Deployment & Outbound Sync**: Added `deploy hosecloud` command suite (`requirements`, `list`, `get`, `status`, `configure`, `sync`) for seamless tenant credential verification, integration management, and outbound webhook synchronization. - **Audit Decision Preferences & Thinking Depth Management**: Added `preference` command suite (`get`, `decision update`, `thinking-depth set`, `thinking-depth policies list|upsert|remove`) to configure immediate decision preferences, global default thinking depth, and routing policies. - **Approval Runs Analytics & Deduplication**: Added `approval-runs stats` (with status distribution, source system aggregation, and customizable deduplication by `sourceDocumentSN`, `sourceDocumentId`, or `id`) and `approval-runs count`. - **sealai-cli Feature Parity**: Full feature superset matching all capabilities and command ergonomics of `@sealai-official/cli` (v0.3.1). --- ## [0.8.1] - 2026-08-25 ### Added - **Automated Gitea Releases Dual-Publishing**: Automated cross-publishing of compiled standalone binary assets to both GitHub Releases and Gitea (`git.ying-qing.cn`) via GitHub Actions. - **Enhanced Installer Visuals**: Added real-time progress bar, source host identifier, and human-readable byte size indicators to `install.sh`. - **One-Command Version Bumping**: Added `bun run bump ` script to automatically synchronize all manifest, documentation, OpenAPI, and bundled assets. --- ## [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 - **Release History & Changelog Query**: Added `seal-home changelog` and `seal-home update check` with release publish timestamps, author info, and changelog body. - **Cross-Version Diff Tracking**: Automatically computes skipped/intermediate versions (`pendingReleases`) with commit notes when local version is behind. - **Strict Downgrade Protection (Anti-rollback Guard)**: Enforced forward-only updates. Attempts to downgrade to an older version (e.g. `seal-home update 0.3.3`) are strictly blocked with explicit guidance. - **Latest Keyword Normalization**: Normalized `seal-home update latest` and `--version latest` to point cleanly to the newest release. - **Approval Runs List Alias**: Added `seal-home approval-runs list` as a friendly alias for `approval-runs search`. ### Fixed - **UNIX Pipe EPIPE Handling**: Handled `EPIPE` broken pipe errors on `process.stdout` so piped commands (e.g. `seal-home openapi | head`) exit cleanly without dumping stack traces. - **Empty Filter Guidance**: Added friendly stderr diagnostics when queries (e.g. `approval-runs summary` or `corps list`) find no records for the current date/filter. --- ## [0.7.0] - 2026-08-25 ### Added - **Zero-Dependency Native Binaries**: Compiled standalone native executables for macOS (arm64/x64), Linux (x64/arm64), and Windows (x64) via Bun compiled standalone target. - **High-Speed Release Pipeline**: GitHub Actions multi-target cross-compilation pipeline delivering release assets in under 60 seconds. - **Sudo-Free One-Line Installer**: Created `scripts/install.sh` with automatic writable path detection (`/opt/homebrew/bin` → `/usr/local/bin` → `~/.local/bin`) and macOS ad-hoc code-signing. - **Strict POSIX Stream Isolation**: Guaranteed `stdout` emits 100% pure, parseable JSON for AI agents and scripts, while diagnostics and human onboarding tips route to `stderr`. - **Simulation Batch Management**: Added `simulation create` for both HoseCloud flow IDs and material package ZIP imports. - **In-place Self-Update**: `seal-home update` atomic binary replacement with automatic global skill directory synchronization. --- ## [0.3.3] - 2026-06-13 ### Added - Initial proof-of-concept release for Seal tenant operations and Hose approval automation.