@opensoha/contracts 0.1.21 → 0.1.22
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/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/types.go +39 -0
- package/gen/go/sohaapi/types_test.go +30 -0
- package/openapi/soha-api.json +1 -1
- package/openapi/soha-api.yaml +1 -1
- package/openapi/spec_generated.go +3 -3
- package/package.json +1 -1
package/gen/go/sohaapi/client.go
CHANGED
package/gen/go/sohaapi/types.go
CHANGED
|
@@ -6749,6 +6749,27 @@ func (e NetworkPolicyPath) Valid() bool {
|
|
|
6749
6749
|
}
|
|
6750
6750
|
}
|
|
6751
6751
|
|
|
6752
|
+
// Defines values for NetworkProxyEngine.
|
|
6753
|
+
const (
|
|
6754
|
+
NetworkProxyEngineMihomo NetworkProxyEngine = "mihomo"
|
|
6755
|
+
NetworkProxyEngineSingBox NetworkProxyEngine = "sing-box"
|
|
6756
|
+
NetworkProxyEngineV2Ray NetworkProxyEngine = "v2ray"
|
|
6757
|
+
)
|
|
6758
|
+
|
|
6759
|
+
// Valid indicates whether the value is a known member of the NetworkProxyEngine enum.
|
|
6760
|
+
func (e NetworkProxyEngine) Valid() bool {
|
|
6761
|
+
switch e {
|
|
6762
|
+
case NetworkProxyEngineMihomo:
|
|
6763
|
+
return true
|
|
6764
|
+
case NetworkProxyEngineSingBox:
|
|
6765
|
+
return true
|
|
6766
|
+
case NetworkProxyEngineV2Ray:
|
|
6767
|
+
return true
|
|
6768
|
+
default:
|
|
6769
|
+
return false
|
|
6770
|
+
}
|
|
6771
|
+
}
|
|
6772
|
+
|
|
6752
6773
|
// Defines values for NetworkResourceKind.
|
|
6753
6774
|
const (
|
|
6754
6775
|
NetworkResourceKindCIDR NetworkResourceKind = "cidr"
|
|
@@ -23027,6 +23048,16 @@ type NetworkPolicySubjects struct {
|
|
|
23027
23048
|
Users []string `json:"users"`
|
|
23028
23049
|
}
|
|
23029
23050
|
|
|
23051
|
+
// NetworkProxyConfigurationInput defines model for NetworkProxyConfigurationInput.
|
|
23052
|
+
type NetworkProxyConfigurationInput struct {
|
|
23053
|
+
Content string `json:"content,omitempty"`
|
|
23054
|
+
Enabled bool `json:"enabled"`
|
|
23055
|
+
ExpectedRevision int64 `json:"expectedRevision"`
|
|
23056
|
+
}
|
|
23057
|
+
|
|
23058
|
+
// NetworkProxyEngine defines model for NetworkProxyEngine.
|
|
23059
|
+
type NetworkProxyEngine string
|
|
23060
|
+
|
|
23030
23061
|
// NetworkProxyFlowSummary defines model for NetworkProxyFlowSummary.
|
|
23031
23062
|
type NetworkProxyFlowSummary struct {
|
|
23032
23063
|
ActiveConnections int64 `json:"activeConnections"`
|
|
@@ -23041,6 +23072,14 @@ type NetworkProxyFlowSummary struct {
|
|
|
23041
23072
|
UploadBytes int64 `json:"uploadBytes"`
|
|
23042
23073
|
}
|
|
23043
23074
|
|
|
23075
|
+
// NetworkProxyInstanceInput defines model for NetworkProxyInstanceInput.
|
|
23076
|
+
type NetworkProxyInstanceInput struct {
|
|
23077
|
+
Engine NetworkProxyEngine `json:"engine"`
|
|
23078
|
+
Host string `json:"host,omitempty"`
|
|
23079
|
+
ID string `json:"id"`
|
|
23080
|
+
Name string `json:"name"`
|
|
23081
|
+
}
|
|
23082
|
+
|
|
23044
23083
|
// NetworkResource defines model for NetworkResource.
|
|
23045
23084
|
type NetworkResource struct {
|
|
23046
23085
|
CreatedAt time.Time `json:"createdAt"`
|
|
@@ -5,6 +5,36 @@ import (
|
|
|
5
5
|
"testing"
|
|
6
6
|
)
|
|
7
7
|
|
|
8
|
+
func TestNetworkProxyInputsRemainInGoSDK(t *testing.T) {
|
|
9
|
+
for _, input := range []struct {
|
|
10
|
+
raw string
|
|
11
|
+
value any
|
|
12
|
+
}{
|
|
13
|
+
{`{"id":"proxy-a","name":"Proxy A","engine":"mihomo","host":"host-a"}`, &NetworkProxyInstanceInput{}},
|
|
14
|
+
{`{"expectedRevision":3,"enabled":false,"content":"mode: rule"}`, &NetworkProxyConfigurationInput{}},
|
|
15
|
+
} {
|
|
16
|
+
if err := json.Unmarshal([]byte(input.raw), input.value); err != nil {
|
|
17
|
+
t.Fatal(err)
|
|
18
|
+
}
|
|
19
|
+
encoded, err := json.Marshal(input.value)
|
|
20
|
+
if err != nil {
|
|
21
|
+
t.Fatal(err)
|
|
22
|
+
}
|
|
23
|
+
var before, after map[string]any
|
|
24
|
+
if err := json.Unmarshal([]byte(input.raw), &before); err != nil {
|
|
25
|
+
t.Fatal(err)
|
|
26
|
+
}
|
|
27
|
+
if err := json.Unmarshal(encoded, &after); err != nil {
|
|
28
|
+
t.Fatal(err)
|
|
29
|
+
}
|
|
30
|
+
for name, value := range before {
|
|
31
|
+
if after[name] != value {
|
|
32
|
+
t.Fatalf("%s changed during round trip: %s", name, encoded)
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
8
38
|
func TestToolInvocationResultPreservesAbsentVersion(t *testing.T) {
|
|
9
39
|
for _, input := range []string{
|
|
10
40
|
`{"toolName":"legacy","riskLevel":"read","requiresApproval":false,"result":"success"}`,
|
package/openapi/soha-api.json
CHANGED
|
@@ -61730,7 +61730,7 @@
|
|
|
61730
61730
|
"info": {
|
|
61731
61731
|
"description": "Public OpenSoha core API contract. This first contract focuses on stable cross-repository boundaries: auth, health, runner-facing control-plane callbacks, AI Gateway, and MCP capability discovery.\n",
|
|
61732
61732
|
"title": "Soha API",
|
|
61733
|
-
"version": "0.1.
|
|
61733
|
+
"version": "0.1.22"
|
|
61734
61734
|
},
|
|
61735
61735
|
"openapi": "3.1.0",
|
|
61736
61736
|
"paths": {
|
package/openapi/soha-api.yaml
CHANGED
|
@@ -5,9 +5,9 @@ package openapi
|
|
|
5
5
|
import _ "embed"
|
|
6
6
|
|
|
7
7
|
const (
|
|
8
|
-
Version = "0.1.
|
|
9
|
-
YAMLSHA256 = "
|
|
10
|
-
JSONSHA256 = "
|
|
8
|
+
Version = "0.1.22"
|
|
9
|
+
YAMLSHA256 = "5b0140f7820051bcbce9d2b2c0cd875b087a308f71dfdf1701d9052942c464ff"
|
|
10
|
+
JSONSHA256 = "e120a0bb9308d25baac4778d8535b11ea29bb5558ce2eebe35bde87c1c2f2724"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
//go:embed soha-api.yaml
|