fix(pages): 收紧部署包与 Agent 同步边界

完成 V2 Phase 0 安全与一致性前置:统一真实归档限额、流式拉取、候选裁剪、保留上传删除语义及 Pages 路由引用锁。
This commit is contained in:
deqiying
2026-07-19 16:42:45 +08:00
parent f386674464
commit 4e8ec23264
47 changed files with 4005 additions and 759 deletions
+6
View File
@@ -1,3 +1,6 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
// Package protocol defines the communication protocol between OpenFlare server, agent, and relay components.
package protocol
@@ -218,4 +221,7 @@ type PagesProjectLatestHashResponse struct {
ProjectID uint `json:"project_id"`
DeploymentID uint `json:"deployment_id"`
Hash string `json:"hash"`
PackageSize int64 `json:"package_size"`
FileCount int `json:"file_count"`
TotalSize int64 `json:"total_size"`
}
+15
View File
@@ -1,3 +1,6 @@
// Copyright 2026 Arctel.net
// SPDX-License-Identifier: Apache-2.0
package protocol
import (
@@ -47,6 +50,18 @@ func TestAgentProtocolJSONTags(t *testing.T) {
"AccessToken": "agent_token",
},
},
{
name: "PagesProjectLatestHashResponse",
value: PagesProjectLatestHashResponse{},
expected: map[string]string{
"ProjectID": "project_id",
"DeploymentID": "deployment_id",
"Hash": "hash",
"PackageSize": "package_size",
"FileCount": "file_count",
"TotalSize": "total_size",
},
},
}
for _, tc := range cases {