feat: list all product releases and document client upgrades
Co-Authored-By: Craft Agent <agents-noreply@craft.do>
This commit is contained in:
@@ -86,6 +86,7 @@ func buildIntegrationKit(language, mode string) integrationKitResponse {
|
||||
Mode: mode,
|
||||
ModeLabel: modeLabel,
|
||||
Endpoints: []kitAPI{
|
||||
{Method: "POST", Path: "/api/v1/portal/snapshot", Purpose: "提交 instance_id、secret,查询已发布版本、客户 ID 与下载权限"},
|
||||
{Method: "POST", Path: "/api/v1/activation/instances/{instance_id}", Purpose: "首次激活,提交 license_key、secret 和 Idempotency-Key"},
|
||||
{Method: "POST", Path: "/api/v1/instances/{instance_id}/heartbeat", Purpose: "刷新已签名运行租约,提交 secret、client_time 和 Idempotency-Key"},
|
||||
{Method: "POST", Path: "/api/v1/customers/{customer_id}/releases/{release_id}/download", Purpose: "以实例凭据下载当前有权访问的发布包"},
|
||||
@@ -100,7 +101,7 @@ func buildIntegrationKit(language, mode string) integrationKitResponse {
|
||||
},
|
||||
Protocol: string(protocol),
|
||||
Upgrade: string(upgrade),
|
||||
Prompt: integrationPrompt(label, modeLabel) + "\n\n" + languageRequirements(language) + "\n\n必须阅读接入包 protocol.md、upgrade.md 与 openapi.json。签名规范化不是 JSON:固定顺序 key=value、LF 连接、UTF-8、无末尾换行;签名是 DER ECDSA 的无填充标准 Base64。先通过包内随机测试公钥的 license-v2 和 lease-v2 验签向量,再连接部署环境。测试公钥不得在生产中信任。\n\n客户端升级:当前仅可复用已授权发布包下载,尚未实现客户端版本检查或签名升级清单。先按 upgrade.md 的第一阶段完成受控人工升级;自动升级必须等待第二阶段升级元数据、独立发布信任根和灰度策略落地。",
|
||||
Prompt: integrationPrompt(label, modeLabel) + "\n\n" + languageRequirements(language) + "\n\n必须阅读接入包 protocol.md、upgrade.md 与 openapi.json。签名规范化不是 JSON:固定顺序 key=value、LF 连接、UTF-8、无末尾换行;签名是 DER ECDSA 的无填充标准 Base64。先通过包内随机测试公钥的 license-v2 和 lease-v2 验签向量,再连接部署环境。测试公钥不得在生产中信任。\n\n客户端升级:实现 UpdateClient.listReleases(page)、selectUpdate、downloadRelease、verifyPackage 和可注入 Installer。通过 POST /api/v1/portal/snapshot 提交 instance_id、secret,读取 data.customer.id、data.releases 与 meta 分页,再调用实例认证下载接口。按 upgrade.md 完成版本比较、用户确认、同源流式下载、长度/摘要/独立签名验证、安装与失败回退,保留授权状态。门户不是签名升级清单;平台/架构匹配、灰度及回报未实现,禁止伪造 API 或自动执行未验证包。",
|
||||
TestVector: kitVector{
|
||||
Version: "lease-v2", InstanceID: "11111111-2222-3333-4444-555555555555", State: "active",
|
||||
ServerTime: "2026-10-09T03:00:00Z", EntitlementExpiresAt: "2027-10-09T03:00:00Z", LeaseExpiresAt: "2026-10-23T03:00:00Z",
|
||||
|
||||
Reference in New Issue
Block a user