Commit Graph
326 Commits
Author SHA1 Message Date
gitea f454d62be1 feat: 增加 SealAI 官方规则 CSV 导出 2026-11-06 15:00:05 +08:00
gitea 8c9f102931 feat: 原生 Seal 授权续期自愈与本地 SQLite 分歧待办闭环
- 授权自愈: 引入长效会话 Cookie 备份池,支持 Seal 原生协助授权到期与 401 报错时平滑自动换发与静默续期;
- 存储升级: 审核报告人工裁决底座迁移至 SQLite (~/.config/seal-use/state/reviews.sqlite),支持历史 JSONL 自动平滑导入与向后兼容双写;
- 分歧待办: 新增 report review unreviewed 与 dismiss 命令,收集人机不一致单据并在日常企业命令完成后于 stderr 注入 Agent 动作指引;
- 精密频控: 实现 30 天单据时效窗口过滤(陈年单据自动归档)、动态 5 小时滑动窗口频控与 24 小时人工拒审静音抑制协议;
- 透明认知: 全面补充 Skill 路由与帮助手册,消除黑盒,透传数据边界与安全红线。
2026-11-02 15:22:47 +08:00
gitea a885d1478e test(update): 为 cleanStaleBinaries 增加临时目录沙箱隔离
在 `src/cli/commands/update.ts` 中为 `cleanStaleBinaries` 增加可选的 `candidateOverrides` 参数,允许在单元测试中注入沙箱路径。
在 `src/cli/commands/update.test.ts` 中重构单测,使用 `mkdtempSync` 创建临时隔离文件测试活跃路径保留与废弃文件清理逻辑,杜绝在宿主机测试期间误伤或删除真实全局二进制。
2026-10-29 15:48:34 +08:00
gitea 3540c634a0 test: 为全局技能版本检查增加测试环境隔离与环境变量覆盖
在 `src/core/skill-version.ts` 中引入 `SEAL_USE_GLOBAL_SKILL_DIR` 环境变量,支持自定义覆盖全局 Skill 路径。
在 `src/cli/runner.test.ts` 中通过隔离的临时目录运行 CLI runner 测试,避免开发者本地环境或发版预检期间 `~/.agents/skills/seal-use` 版本漂移导致 `runner.test.ts` 误报。
同时增加专门的单测验证 Skill 新于 CLI 时 stderr 告警与引导输出。
2026-10-29 15:25:23 +08:00
yunyingk a40bcd1967 Merge pull request #271 from yunyingk/mac15/improve-export-tasks
fix: 统一审核记录导出的后台等待与实时进度
2026-10-29 15:15:03 +08:00
gitea 87bb10f527 feat(install): 支持 --system 与 --user 模式切换并自动清理残留二进制
- 在 scripts/install.sh 中默认安装至用户目录 ~/.local/bin,并自动清理历史遗留的 /opt/homebrew/bin/seal-use
- 在 scripts/dev-override.ts 中优先命中 ~/.local/bin/seal-use,忽略 Homebrew 路径并自动清理残留
- 在 seal-use update 中支持 --system(提权迁移至 /usr/local/bin)与 --user(降权回归至 ~/.local/bin)选项,添加 seal-use migrate 别名
- 迁移与更新时自动清理另一端的非活动实体二进制(恪守 Single Binary Invariant)
- 自更新权限预检:当目标位于系统目录且缺少写权限时,友好提示 sudo seal-use update 而非底层报错
- 在 seal-use doctor 中增加执行模式识别与多份二进制(PATH 阴影)检测告警
2026-10-29 15:10:40 +08:00
gitea db5a3f7139 fix: 修复审核记录导出进度与后台等待机制
为审核记录导出增加可复用的本地后台任务及 status/wait/list,等待超时或观察进程退出后任务继续执行。
统一实时脱敏诊断输出,保留 stdout 单一 JSON;补齐高级参数、预览和筛选配置摘要。
默认保留合思未找到单据,分别统计单据与审核记录,并显式报告部分补取失败。
补充 CLI/Skill 版本诊断、技能路由及回归测试,修复企业列表加载开销和源码更新测试隔离。
2026-10-27 15:59:04 +08:00
gitea d5725e12d1 Adopt users activate with --yes gate and --dry-run preview
seal-use users activate <userId> shipped in v0.4.0 as scaffolding for
the automated delegation flow but never made it onto the documented
surface, while sealUserActivate stayed reachable through the MCP write
gateway — an undocumented, ungated mutation. Adopt it:

- Document in the help registry (users area).
- Require --yes like its siblings delete/reset-password (CLI layer
  only; the MCP capability call path is unchanged).
- Wire the --dry-run preview already supported by the capability.
- Cover the gate and the preview in users.test.ts and
  dry-run-gates.test.ts.
2026-10-25 00:56:23 +08:00
gitea ffb9820822 Add --dry-run mutation previews across remaining mutating commands
Close the AGENTS.md "Safety Guardrail & Mutation Preview" coverage gap:
every remote-mutating command now supports --dry-run returning
structured JSON with preview: true, without executing the mutation.

- Domain capabilities gain an optional dryRun param and preview
  handlers: sealUserCreate/ResetPassword/Delete/Activate/DelegationCreate,
  sealDelegationRevoke, sealApprovalRuleCreate/Update/Delete/
  VersionPublish, sealSimulationBatchClean, sealInsightRecordAnalyze.
  Previews reuse the shared mutationPreview() diff shape; reads (GET)
  are allowed to build the before/after, writes never fire.
- CLI wiring: users create/delegation/reset-password/delete, rules
  create/update/delete/publish, simulation delete, analytics analyze,
  auth link revoke pass dryRun; dry-run bypasses the --yes gate
  (webhook delete pattern); corps mark previews the local config tag
  change without writing it.
- Shared dryRunOption() helper in parser.ts; help registry documents
  --dry-run on all covered commands; cli-protocol.md §3 example list
  updated; cli.md and embedded skill regenerated.
- New src/cli/commands/dry-run-gates.test.ts pins the contract:
  preview JSON on stdout, zero mutating requests (GET-only where reads
  are needed), config untouched for local previews.

Local user-config writes (corps switch/rename, config mode/test-dir/
lint) stay outside this contract: they are reversible local edits with
no upstream effect.
2026-10-24 22:08:37 +08:00
gitea 245ec33d1a Enforce cross-domain naming charter with silent legacy aliases
Unify the visible command surface on one canonical spelling per
semantic concept while keeping every legacy spelling working as a
silent parser/dispatcher alias (per .agents/rules/cli-protocol.md §6):

- Fix silent-ignore accept-set gaps: webhook resource-pack export now
  reads --out/--output-file and --downloads/--download; approval-runs
  and webhook read canonical --start-date/--end-date; webhook secret
  reveal accepts --reveal/-r alongside legacy --show-secret.
- Add kebab-case parser registrations for camel-only flags (human-result,
  manual-approval-status, include-bridge, rule-version, document-limit,
  context-lines, source-document-sn/-id, simulation-batch-id) and read
  them in rules/documents search, context, approval-runs list/summary/
  bridge/export.
- Retire verbs on the visible surface only: webhook create (add),
  simulation delete (clean), preference thinking-depth policies delete
  (remove); dispatch keeps both. Runtime nextAction suggestions and
  doctor knowledge switch to canonical spellings.
- Add src/cli/naming-charter.test.ts: help surface must be lowercase
  kebab-case and free of retired tokens; canonical/legacy spellings
  must both parse; P0 accept-sets pinned.
- Document the charter in .agents/rules/cli-protocol.md §7; sync
  AGENTS.md, README, and skills/references docs; regenerate cli.md and
  embedded skill artifacts.
2026-10-24 21:56:59 +08:00
gitea d77c0505d8 Refine simulation batch timestamps and update source messaging 2026-10-23 17:01:21 +08:00
gitea ed57c0cd42 Add local search for simulation batches 2026-10-23 16:42:20 +08:00
gitea 3ae39bcc08 Add native JSON fallback for approval record details 2026-10-22 16:19:52 +08:00
gitea 41e0bfba71 Report verified personnel names for assistance links 2026-10-22 12:35:28 +08:00
gitea b5dd3560b6 Add approval record extra risk filtering 2026-10-22 12:34:54 +08:00
gitea a2963c736c Preserve auth exit codes when document readback fails 2026-10-20 17:40:06 +08:00
gitea b017e1fc48 Add safe knowledge document file editing 2026-10-20 17:30:38 +08:00
gitea 10852eb198 Fix platform-dependent config selection test 2026-10-20 10:23:36 +08:00
gitea b21d92efae Add expense store lookup by document number 2026-10-20 10:15:08 +08:00
yunyingk 4b3a899e5a Merge pull request #242 from yunyingk/mac15/clean-report-templates-and-assets
Clean report templates, drop legacy charts, and refine guidelines
2026-10-18 22:54:55 +08:00
gitea 05dfd0f5bb Clean report templates, drop legacy charts, and refine guidelines 2026-10-18 22:53:25 +08:00
gitea d40ab9648d Add normalized invoice fields, first-class invoices CLI, and CLI-attributed conflict diagnosis 2026-10-18 22:52:36 +08:00
gitea 9e7275f09b Add protocol test closures for secure writes, aliases, help and cli docs 2026-10-18 11:16:07 +08:00
gitea 50e4e492b4 Fix architecture review findings and align CLI metadata 2026-10-17 20:17:06 +08:00
gitea 818f33a8e1 Refine report glossary to plain business language and improve math layout 2026-10-16 18:27:18 +08:00
gitea 69d5b4f130 Add trailing terms definition appendix to report renderers 2026-10-16 18:06:02 +08:00
gitea 91feec7b0b Refine risk intercept fallback calculation and sync ledger documentation 2026-10-16 17:44:58 +08:00
gitea 04915c6ad6 Refine report data collection to support unlimited runs without 500 cap 2026-10-16 17:36:36 +08:00
gitea c6bd113fff Add report ledger workflow, refine terminology and codify skill discipline 2026-10-16 15:35:25 +08:00
gitea 077ecb050c Refine report pipeline to support date ranges and recordId reviews 2026-10-16 14:56:11 +08:00
gitea d127e80c1b Release v0.11.9: Automated release bump 2026-10-16 11:42:28 +08:00
gitea bbff9338a0 Add hose-ebot command for Hose outbound discovery and approval callback 2026-10-16 11:19:50 +08:00
yunyingk 2749d765b3 Merge pull request #238 from yunyingk/mac15/auth-hose-openapi-token
🧪 CI / 🧪 Test, Type-Check & Build Validation (push) Has been cancelled
Add auth hose-openapi-token command for Hose enterprises
2026-10-15 17:07:52 +08:00
gitea 6e4a8cb088 Add auth hose-openapi-token command for Hose enterprises 2026-10-15 17:05:55 +08:00
gitea f6fe0de286 Add pkg/report standalone external validation suite and example report 2026-10-15 16:47:26 +08:00
gitea f9f72fa918 Decouple chapter numbers from validation and pipeline rendering to allow arbitrary chapter order 2026-10-15 16:39:33 +08:00
gitea a52b6ac117 Standardize report tables on clean 2-column format with clickable SN 2026-10-15 16:29:28 +08:00
gitea 7df5feb7b7 Add automated audit link column and reconcile divergence metrics 2026-10-15 16:06:29 +08:00
gitea 16f3f252c0 Align Hose document URL with backlogDetail hash routing 2026-10-15 15:36:26 +08:00
gitea 25d1036eed Refine approval run URL resolution with Hose fallback and SSO 2026-10-15 15:27:14 +08:00
gitea 0210051ab7 Implement pre-flight adjudication gate and companion ledger cross-validation 2026-10-15 15:17:44 +08:00
gitea 1fb61f794e Fix report sample count and decision distribution for scoped runs 2026-10-15 14:53:25 +08:00
gitea aad591569a Streamline monthly report template and enhance validator 2026-10-15 14:30:59 +08:00
gitea 2177a06f39 Add lightweight report data capability and authoring reference 2026-10-13 17:22:02 +08:00
gitea 586ad521dc Harden post-write error codes, rules push recovery ledger, and capability param normalization 2026-10-13 11:48:37 +08:00
gitea 75017ab49c Merge remote-tracking branch 'origin/main' into mac15/rule-import-renumber 2026-10-13 11:30:28 +08:00
gitea 4f3fb82856 Add companion XLSX/CSV report ledgers and unify reviewed accuracy metrics 2026-10-13 11:16:02 +08:00
gitea 8c7cb219a0 Organize Seal modules and add guarded rule recoding 2026-10-13 02:24:41 +00:00
gitea d71be55ec8 Refine report asset naming and include review notes in section 6 2026-10-13 10:16:49 +08:00
gitea 140d7bb33a Fix Venn chart dynamic rendering and eliminate EEKA mock data across report sections 2026-10-13 00:35:19 +08:00