@fateforge/archery-cli 1.0.5 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/CLI-SPEC.md +26 -11
- package/.agent/CLI-SPEC_zh.md +7 -3
- package/.agent/SEC-SPEC.md +14 -9
- package/.agent/SEC-SPEC_zh.md +2 -2
- package/CHANGELOG.md +16 -0
- package/package.json +7 -7
- package/skills/archery-cli/SKILL.md +2 -2
package/.agent/CLI-SPEC.md
CHANGED
|
@@ -134,6 +134,7 @@ Error codes and exit codes must align:
|
|
|
134
134
|
- `E_CONFLICT` -> 6
|
|
135
135
|
- `E_NETWORK` / `E_RATE_LIMITED` / `E_SERVER` -> 7
|
|
136
136
|
- `E_TIMEOUT` -> 8
|
|
137
|
+
- `E_INTEGRITY` -> 1 (release integrity failure: missing/invalid signature or checksum mismatch; **non-retryable**, see §14)
|
|
137
138
|
- `E_HUMAN_REQUIRED` -> 9 (optional, only when §16.3 is enabled)
|
|
138
139
|
|
|
139
140
|
When the failure comes from an upstream HTTP call, map the status onto the
|
|
@@ -635,17 +636,31 @@ Version notification contract:
|
|
|
635
636
|
|
|
636
637
|
Release verification baseline:
|
|
637
638
|
|
|
638
|
-
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
639
|
+
- **Mandatory signature verification, no skip path**: the binary self-update path
|
|
640
|
+
MUST verify the Sigstore signature on `checksums.txt` in-process, then verify
|
|
641
|
+
the archive SHA256 against it. A missing signature bundle, a signature that does
|
|
642
|
+
not verify, or a checksum mismatch all fail closed — there is no "can't verify,
|
|
643
|
+
proceed anyway" degradation. The whole chain surfaces `E_INTEGRITY` (exit 1,
|
|
644
|
+
non-retryable): a forged or corrupt release is not a transient blip to retry.
|
|
645
|
+
- **Verifier embedded, no user-environment dependency**: verification happens
|
|
646
|
+
inside the tool binary (Go via `sigstore-go`, Python inside the frozen binary
|
|
647
|
+
via `sigstore`) with **no external cosign** and nothing pre-installed on the
|
|
648
|
+
machine. The TUF trust root is bootstrapped from the library's embedded
|
|
649
|
+
`root.json`, not fetched on first-use trust (TOFU).
|
|
650
|
+
- **New bundle format**: the signing side produces a Sigstore protobuf bundle
|
|
651
|
+
(`checksums.txt.sigstore.json`) via `cosign sign-blob --new-bundle-format`, which
|
|
652
|
+
the in-process verifier consumes; the legacy cosign bundle format is not accepted.
|
|
653
|
+
- **Identity binding**: verifiers bind the certificate SAN to this repo's tagged
|
|
654
|
+
release workflow (`…/release.yml@refs/tags/v*`, anchored `^…$`) and validate the
|
|
655
|
+
GitHub OIDC issuer. When the target tag is known, pin the exact identity (stronger
|
|
656
|
+
than a regexp).
|
|
657
|
+
- **Cross-language parity**: Go binaries and Python frozen binaries follow the same
|
|
658
|
+
self-update contract — download archive → in-process signature verify → checksum
|
|
659
|
+
→ replace binary. Package managers do not own integrity.
|
|
660
|
+
- Update results carry `signature_status` (`verified` on success; any failure exits
|
|
661
|
+
via the error envelope) and `signature_verified` (true only when in-process
|
|
662
|
+
Sigstore verification actually ran and succeeded). Never imply checksum
|
|
663
|
+
verification is a signature.
|
|
649
664
|
|
|
650
665
|
- After `update --confirm <token>` succeeds, return `previous_version` and `current_version` in `data`.
|
|
651
666
|
- Also hint in the result: `run "changelog --since <previous_version>" to see what changed`.
|
package/.agent/CLI-SPEC_zh.md
CHANGED
|
@@ -131,6 +131,7 @@
|
|
|
131
131
|
- `E_CONFLICT` -> 6
|
|
132
132
|
- `E_NETWORK` / `E_RATE_LIMITED` / `E_SERVER` -> 7
|
|
133
133
|
- `E_TIMEOUT` -> 8
|
|
134
|
+
- `E_INTEGRITY` -> 1(发布完整性失败:签名缺失/无效或 checksum 不符;**非重试**,见 §14)
|
|
134
135
|
- `E_HUMAN_REQUIRED` -> 9(可选,仅启用 §16.3 时)
|
|
135
136
|
|
|
136
137
|
当错误来自上游 HTTP 调用时,按状态码映射到错误码,让 agent 能从 `error.code` +
|
|
@@ -583,9 +584,12 @@ update 必须遵守的契约:
|
|
|
583
584
|
|
|
584
585
|
release 校验基线:
|
|
585
586
|
|
|
586
|
-
-
|
|
587
|
-
-
|
|
588
|
-
-
|
|
587
|
+
- **强制签名验证,无跳过路径**:二进制自更新路径必须在进程内验证 `checksums.txt` 的 Sigstore 签名,再用它校验归档 SHA256。签名 bundle 缺失、签名验不过、checksum 不符,一律**失败关闭**,不存在"验不了就放行"的降级。整条链对外返回 `E_INTEGRITY`(exit 1,非重试)——伪造或损坏的发布不该被当成可重试的瞬时错误。
|
|
588
|
+
- **验证器内置、不依赖用户环境**:验证在工具二进制内完成(Go 用 `sigstore-go`,Python 冻结二进制内用 `sigstore`),**不外挂 cosign**,不依赖机器上预装任何东西。TUF 信任根从库内嵌的 `root.json` 引导(不是 TOFU 现拉现信)。
|
|
589
|
+
- **新版 bundle 格式**:签名侧用 `cosign sign-blob --new-bundle-format` 产出 Sigstore protobuf bundle(`checksums.txt.sigstore.json`),与进程内验证器对齐;旧版 cosign bundle 格式不被接受。
|
|
590
|
+
- **身份绑定**:验证端把证书 SAN 绑定到本仓库的 tagged release workflow(`…/release.yml@refs/tags/v*`,锚定 `^…$`)并校验 GitHub OIDC issuer。已知目标 tag 时可绑精确身份,强于正则。
|
|
591
|
+
- **跨语言统一**:Go 二进制与 Python 冻结二进制走同一套自更新契约——都是"下载归档 → 进程内验签 → checksum → 替换二进制",包管理器不参与完整性。
|
|
592
|
+
- update 结果携带 `signature_status`(成功即 `verified`;异常一律走 error envelope 中止)与 `signature_verified`(仅当进程内 Sigstore 验证真实执行且成功时为 true)。不能把 checksum 校验伪装成签名校验。
|
|
589
593
|
|
|
590
594
|
- `update --confirm <token>` 成功后,结果 `data` 中返回 `previous_version` 与 `current_version`。
|
|
591
595
|
- 同时在结果中提示:`run "changelog --since <previous_version>" to see what changed`。
|
package/.agent/SEC-SPEC.md
CHANGED
|
@@ -97,15 +97,20 @@ Fallback and channel rules:
|
|
|
97
97
|
|
|
98
98
|
## 5. Supply chain (applies to anything distributed)
|
|
99
99
|
|
|
100
|
-
- **Integrity verification
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
100
|
+
- **Integrity verification, mandatory and no-skip**: binary self-update MUST verify
|
|
101
|
+
the Sigstore signature on `checksums.txt` **in-process** (the verifier is embedded
|
|
102
|
+
in the tool binary — Go via `sigstore-go`, Python inside the frozen binary via
|
|
103
|
+
`sigstore` — with **no external cosign** and no user-environment dependency), then
|
|
104
|
+
verify the archive SHA256. A missing/invalid signature or a checksum mismatch
|
|
105
|
+
**fails closed** with no "can't verify, proceed anyway" degradation, surfacing
|
|
106
|
+
`E_INTEGRITY` (non-retryable). A checksum proves bytes match a checksum file; only
|
|
107
|
+
the signature proves the checksum file came from the publisher.
|
|
108
|
+
- **Signed release material**: release pipelines sign `checksums.txt` with
|
|
109
|
+
Sigstore/Cosign keyless signing from the tagged GitHub Actions release workflow
|
|
110
|
+
using `--new-bundle-format` (a Sigstore protobuf bundle the in-process verifier
|
|
111
|
+
consumes). Verification binds the signature to the expected repository workflow
|
|
112
|
+
identity (anchored `^…$`) and GitHub OIDC issuer; the TUF trust root is
|
|
113
|
+
bootstrapped from the library's embedded root, not TOFU.
|
|
109
114
|
- **Dependency locking + audit**: commit a lockfile; CI runs `npm audit` / `pip-audit` and blocks high-severity dependencies.
|
|
110
115
|
- **Traceable builds**: release artifacts are built by CI from tagged source, no hand-uploaded unknown binaries.
|
|
111
116
|
- **No remote scripts in postinstall**: don't execute code freshly pulled from the network at install time.
|
package/.agent/SEC-SPEC_zh.md
CHANGED
|
@@ -88,8 +88,8 @@ Agent 侧约定(同时写进 SKILL-SPEC 的用法):
|
|
|
88
88
|
|
|
89
89
|
## 5. 供应链(凡分发即适用)
|
|
90
90
|
|
|
91
|
-
-
|
|
92
|
-
- **签名发布材料**:release pipeline
|
|
91
|
+
- **完整性校验,强制且无跳过**:二进制自更新必须**在进程内**验证 `checksums.txt` 的 Sigstore 签名(验证器内置工具二进制,Go 用 `sigstore-go`、Python 冻结二进制内用 `sigstore`,**不外挂 cosign**、不依赖用户环境),再用它校验归档 SHA256。签名缺失/验不过/checksum 不符一律**失败关闭**,没有"验不了就放行"的降级;对外返回 `E_INTEGRITY`(非重试)。checksum 只能证明字节与 checksum 文件一致,签名才能证明 checksum 文件来自发布者。
|
|
92
|
+
- **签名发布材料**:release pipeline 由 tagged GitHub Actions release workflow 用 Sigstore/Cosign keyless 模式以 `--new-bundle-format` 签署 `checksums.txt`(产出 Sigstore protobuf bundle),与进程内验证器对齐。验证时绑定到预期仓库 workflow 身份(锚定 `^…$`)和 GitHub OIDC issuer;TUF 信任根从库内嵌 root 引导,不 TOFU。
|
|
93
93
|
- **依赖锁定 + 审计**:提交 lockfile;CI 跑 `npm audit` / `pip-audit` 一类,高危依赖阻断。
|
|
94
94
|
- **构建可追溯**:发布产物由 CI 从打了 tag 的源码构建,不手工上传不明二进制。
|
|
95
95
|
- **不在 postinstall 跑远程脚本**:安装期不执行从网络现拉的代码。
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,22 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.0.7] - 2026-06-16
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- npm `optionalDependencies` platform-package pins now match the package version. The previous release bumped the top-level version but left the pins at the prior version, so `npm install` resolved a stale platform binary (the new wrapper with the old binary). The publish workflow now rewrites `optionalDependencies` from the package version before `npm publish`, so the pins can no longer drift from the single source of truth.
|
|
13
|
+
|
|
14
|
+
## [1.0.6] - 2026-06-16
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- `update` now verifies the release Sigstore signature on `checksums.txt` **in-process** (embedded `sigstore-go`, bootstrapped from the embedded TUF trust root) instead of shelling out to an external `cosign`. Verification is mandatory and fail-closed: a missing signature bundle, a signature that does not verify against this repo's tagged release-workflow identity, or a checksum mismatch all refuse the update — there is no skip path. Releases are now signed with `cosign sign-blob --new-bundle-format`.
|
|
19
|
+
|
|
20
|
+
### Security
|
|
21
|
+
|
|
22
|
+
- Release-integrity failures (missing/invalid signature or checksum mismatch) now return the non-retryable `E_INTEGRITY` error code (exit 1) instead of a retryable network code, so an agent treats a possible supply-chain issue as a hard stop rather than retrying.
|
|
23
|
+
|
|
8
24
|
## [1.0.5] - 2026-06-16
|
|
9
25
|
|
|
10
26
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fateforge/archery-cli",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Archery SQL audit CLI for AI Agents - manage SQL workflows, queries, instances, diagnostics, and data dictionaries with a machine-readable contract",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"archery",
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
"archery-cli": "scripts/run.js"
|
|
27
27
|
},
|
|
28
28
|
"optionalDependencies": {
|
|
29
|
-
"@fateforge/archery-cli-darwin-arm64": "1.0.
|
|
30
|
-
"@fateforge/archery-cli-darwin-x64": "1.0.
|
|
31
|
-
"@fateforge/archery-cli-linux-arm64": "1.0.
|
|
32
|
-
"@fateforge/archery-cli-linux-x64": "1.0.
|
|
33
|
-
"@fateforge/archery-cli-win32-arm64": "1.0.
|
|
34
|
-
"@fateforge/archery-cli-win32-x64": "1.0.
|
|
29
|
+
"@fateforge/archery-cli-darwin-arm64": "1.0.7",
|
|
30
|
+
"@fateforge/archery-cli-darwin-x64": "1.0.7",
|
|
31
|
+
"@fateforge/archery-cli-linux-arm64": "1.0.7",
|
|
32
|
+
"@fateforge/archery-cli-linux-x64": "1.0.7",
|
|
33
|
+
"@fateforge/archery-cli-win32-arm64": "1.0.7",
|
|
34
|
+
"@fateforge/archery-cli-win32-x64": "1.0.7"
|
|
35
35
|
},
|
|
36
36
|
"files": [
|
|
37
37
|
"scripts/run.js",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: archery-cli
|
|
3
|
-
version: "1.0.
|
|
3
|
+
version: "1.0.7"
|
|
4
4
|
description: "Archery SQL audit platform CLI for managing SQL workflows, queries, instances, diagnostics. Use when the user asks about SQL审核, database operations, Archery platform management, or needs to submit/review/execute SQL against database instances."
|
|
5
5
|
license: MIT
|
|
6
6
|
user-invocable: true
|
|
7
|
-
metadata: {"requires":{"bins":["archery-cli"],"min_version":"1.0.
|
|
7
|
+
metadata: {"requires":{"bins":["archery-cli"],"min_version":"1.0.7"}}
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# archery-cli
|