feat: add deployment foundation and cross-device handoff

This commit is contained in:
2026-09-25 08:49:19 +08:00
parent 8ccb8b7c15
commit e965b0943d
77 changed files with 8018 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
package cli
import (
"encoding/json"
"testing"
)
func TestPreflightDoesNotAuthorizeInstallation(t *testing.T) {
code, out, diagnostics := run([]string{"preflight"}, "")
var response struct {
ProtocolVersion int `json:"protocolVersion"`
Mode string `json:"mode"`
Proposal struct {
Executable bool `json:"executable"`
Blockers []string `json:"blockers"`
} `json:"proposal"`
}
if code != 0 || json.Unmarshal([]byte(out), &response) != nil || response.ProtocolVersion != 1 || response.Mode != "local-environment-proposal" || response.Proposal.Executable || len(response.Proposal.Blockers) == 0 {
t.Fatalf("unsafe report: %s %s", out, diagnostics)
}
}