diff --git a/.gitignore b/.gitignore index 220e5f6..b1125ce 100644 --- a/.gitignore +++ b/.gitignore @@ -8,8 +8,6 @@ dist/bin/ .mimosa/ # Local enterprise configs can contain credentials. -enterprises/*.json -!enterprises/example.*.json # Local generated reports and exported deliverables. .local/ diff --git a/AGENTS.md b/AGENTS.md index 51e1220..079e100 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -6,7 +6,7 @@ This is a Bun + TypeScript toolkit for the `seal-use` CLI and a local stdio MCP The repository doubles as a ZCode plugin: `.zcode-plugin/plugin.json` declares a skills-only plugin manifest and the agent skill lives under `skills/seal-use/`. The plugin ships no MCP surface; the local MCP runs from the CLI (`seal-use mcp`, or the `mcp-config` snippet for Cursor/Claude Desktop). The in-repo `.agents/skills/seal-use` symlink has been dropped; workspace and Codex skill loading use the global `~/.agents/skills/seal-use` copy installed by `seal-use skill install`. -Tests are colocated as `*.test.ts` files in `src/`. Example enterprise configs are in `enterprises/example.*.json`; real configs must stay untracked. +Tests are colocated as `*.test.ts` files in `src/`. ## Build, Test, and Development Commands @@ -101,12 +101,12 @@ Recent commits use concise imperative subjects, often `Add ...` or `Refine ...`, git push origin refs/tags/vX.Y.Z ``` - GitHub Actions (`release.yml`) is responsible only for cross-compiling all 5 target binaries and publishing the GitHub Release. - - **Gitea & Homebrew Pull-Based Promotion**: Do not manually push branches or tags to `home` (Gitea). On WSL (`wsl-dev`), `seal-use-release-sync.timer` polls the latest GitHub Release every 15 minutes (or can be triggered immediately via `systemctl start seal-use-release-sync.service`), pulls the release and assets from GitHub into Gitea, and updates the Homebrew tap (`ops/README.md`). + - **Gitea & Homebrew Pull-Based Promotion**: Do not manually push branches or tags to `home` (Gitea). On WSL (`wsl-dev`), `seal-use-release-sync.timer` polls the latest GitHub Release every 15 minutes (or can be triggered immediately via `systemctl start seal-use-release-sync.service`), pulls the release and assets from GitHub into Gitea, and updates the Homebrew tap (`wsl-infra/systemd/`). - The workflow enforces the merge-before-tag rule rather than trusting the operator: `release.yml` refuses to publish unless the tagged commit is an ancestor of `origin/main`. Actions in both workflows are pinned to commit SHAs rather than moving tags for supply-chain integrity. ## Security & Configuration Tips -Never commit real enterprise credentials, Seal tokens, service logs, or local generated state. Use `enterprises/example.hose.json` or `enterprises/example.seal.json` as templates, then place real configs in `enterprises/local.json` or `~/.config/seal-use/enterprises` (with legacy fallback to `~/.config/seal-home/enterprises`). For auth or tenant changes, verify with `bun run probe` or `seal-use auth diagnose`. +Never commit real enterprise credentials, Seal tokens, service logs, or local generated state. Enterprise configs live only in `~/.config/seal-use/enterprises` (with legacy fallback to `~/.config/seal-home/enterprises`); the project tree carries none. For auth or tenant changes, verify with `bun run probe` or `seal-use auth diagnose`. Credential files are written `0600`; a config placed by hand keeps the `0o644` default, so run `seal-use doctor` and act on its `credential_permissions` check before sharing a machine or a backup. See `SECURITY.md` for the trust model (self-update, custom linters). diff --git a/README.md b/README.md index d8c2f83..a424e7c 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ seal-use update # Self-update (GitHub Releases binary, Homebrew, or so For local development from source with Bun: -For an already-authenticated Seal-native source, use `seal-use corps add-seal-bearer` or copy `enterprises/example.seal.json`. +For an already-authenticated Seal-native source, use `seal-use corps add-seal-bearer`. ## Public Usage @@ -133,12 +133,7 @@ seal-use update Because `npm link` makes the global command a symlink into your checkout, **updating the checkout is sufficient** — no reinstall step required. The symlink continues to point to the updated source. -Local enterprise config files are ignored by git: - -```text -enterprises/*.json -!enterprises/example.*.json -``` +Enterprise configs live only in the global directory `~/.config/seal-use/enterprises` (legacy fallback `~/.config/seal-home/enterprises`); the project tree carries none. The canonical plugin skill lives at `skills/seal-use`. There is no in-repo `.agents/skills/seal-use` symlink; run `seal-use skill install` (or copy that folder yourself) to place it in a Codex skills directory such as `~/.agents/skills/seal-use` when you want Codex to invoke the workflow as `$seal-use`. diff --git a/SECURITY.md b/SECURITY.md index 910f4a2..67a35a7 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -36,10 +36,10 @@ than described here. `checksums.txt` but only warns on a mismatch. Prefer the direct GitHub source (`SEAL_USE_MIRROR=github`, which skips the third-party mirrors) and pass an explicit `SEAL_USE_VERSION` when installing. -- **Custom rule linters are code that gets executed.** Files under `/linters/` and - `~/.config/seal-use/linters/` are imported into the CLI process by `seal-use rules lint`, with - that process's filesystem access and enterprise credentials. Treat those directories as trusted - code and do not run the CLI from an untrusted checkout. See `linters/README.md`. +- **Custom rule linters are code that gets executed.** Files under `~/.config/seal-use/linters/` + are imported into the CLI process by `seal-use rules lint`, with that process.s filesystem access + and enterprise credentials. Treat that directory as trusted code and do not hand it untrusted + scripts. ## Supported versions diff --git a/skills/seal-use/references/rule-lint.md b/skills/seal-use/references/rule-lint.md index b6d1357..782a111 100644 --- a/skills/seal-use/references/rule-lint.md +++ b/skills/seal-use/references/rule-lint.md @@ -59,7 +59,9 @@ seal-use config lint disable | :--- | :--- | :--- | | 内置引擎 | 编译进二进制 | 永远可用,`builtin` 即此层 | | 官方明文版 | `~/.config/seal-use/linters/official/` | `syncOfficialLinters` 自动同步,改动会被覆盖;agent 可直接阅读源码理解校验逻辑 | -| 用户自定义 | `~/.config/seal-use/linters/.ts` 或 `/linters/.ts` | 私有脚本,前者全局生效、后者仅当前项目 | +| 用户自定义 | `~/.config/seal-use/linters/.ts`(全局唯一位置) | 私有脚本,跨项目共用;不再从项目 cwd 读取 | + +哪些官方校验器明文下发由 `src/domains/seal/linter/manifest.ts` 的 `plaintext` 标记决定:`true` 的条目源码会被写入 `official/`(源码嵌入物 `plaintext.generated.ts` 由 `bun run generate:linter-plaintext` 从 `linter/checkers/` 生成,改动校验器后必须重跑并提交,CI 的 `verify:linter-plaintext` 会拦截漂移);`false` 的条目只以进程内函数存在、不下发明文。 | Linter Name | Scope & Purpose | Aliases | | :--- | :--- | :--- | diff --git a/ops/README.md b/wsl-infra/README.md similarity index 100% rename from ops/README.md rename to wsl-infra/README.md diff --git a/ops/backup-workspace-scripts.sh b/wsl-infra/backup-workspace-scripts.sh similarity index 100% rename from ops/backup-workspace-scripts.sh rename to wsl-infra/backup-workspace-scripts.sh diff --git a/ops/infra-healthcheck.sh b/wsl-infra/infra-healthcheck.sh similarity index 100% rename from ops/infra-healthcheck.sh rename to wsl-infra/infra-healthcheck.sh diff --git a/ops/release-sync.sh b/wsl-infra/release-sync.sh similarity index 100% rename from ops/release-sync.sh rename to wsl-infra/release-sync.sh diff --git a/ops/systemd/mihomo.service b/wsl-infra/systemd/mihomo.service similarity index 100% rename from ops/systemd/mihomo.service rename to wsl-infra/systemd/mihomo.service diff --git a/ops/systemd/seal-use-release-sync.service b/wsl-infra/systemd/seal-use-release-sync.service similarity index 100% rename from ops/systemd/seal-use-release-sync.service rename to wsl-infra/systemd/seal-use-release-sync.service diff --git a/ops/systemd/seal-use-release-sync.timer b/wsl-infra/systemd/seal-use-release-sync.timer similarity index 100% rename from ops/systemd/seal-use-release-sync.timer rename to wsl-infra/systemd/seal-use-release-sync.timer