@opensoha/contracts 0.1.19 → 0.1.21
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/auth/catalog_generated.go +2 -2
- package/auth/permission-catalog.json +81 -1
- package/compat/json-schema-ecosystem-0.1.0.json +1 -1
- package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
- package/fixtures/json-schema/network-ingest-event/invalid/proxy-runtime-negative-total.json +19 -0
- package/fixtures/json-schema/network-ingest-event/valid/proxy-runtime-sample.json +20 -0
- package/fixtures/json-schema/proxy-runtime/invalid/v2ray-connection-snapshot.json +10 -0
- package/fixtures/json-schema/proxy-runtime/valid/mihomo-observation.json +16 -0
- package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/basic.json +5 -0
- package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/missing-range-fields.json +5 -0
- package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/zero-start.json +8 -0
- package/fixtures/openapi/AgentPrometheusQueryRequest/valid/basic.json +8 -0
- package/fixtures/openapi/AgentPrometheusQueryRequest/valid/instant.json +5 -0
- package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/image.json +1 -0
- package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/missing.json +1 -0
- package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/mutable-tag.json +1 -0
- package/fixtures/openapi/ClusterAgentUpgradeInput/valid/stable.json +1 -0
- package/fixtures/openapi/ClusterAgentUpgradeInput/valid/unprefixed.json +1 -0
- package/fixtures/openapi/KubernetesAgentCustomResourceRule/invalid/basic.json +9 -0
- package/fixtures/openapi/KubernetesAgentCustomResourceRule/valid/basic.json +14 -0
- package/fixtures/openapi/KubernetesAgentCustomResourceRule/valid/dns-names.json +1 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/basic.json +4 -0
- package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/basic.json +6 -0
- package/fixtures/openapi/KubernetesConfigMapDataInput/invalid/basic.json +5 -0
- package/fixtures/openapi/KubernetesConfigMapDataInput/valid/basic.json +8 -0
- package/fixtures/openapi/KubernetesCronJobSuspendInput/invalid/basic.json +3 -0
- package/fixtures/openapi/KubernetesCronJobSuspendInput/valid/basic.json +3 -0
- package/fixtures/openapi/KubernetesCustomResourceAccess/invalid/basic.json +5 -0
- package/fixtures/openapi/KubernetesCustomResourceAccess/valid/basic.json +6 -0
- package/fixtures/openapi/KubernetesCustomResourceDefinition/invalid/empty-uid.json +1 -0
- package/fixtures/openapi/KubernetesCustomResourceDefinition/valid/deleting-definition.json +1 -0
- package/fixtures/openapi/KubernetesNamespaceCreateInput/invalid/basic.json +1 -0
- package/fixtures/openapi/KubernetesNamespaceCreateInput/valid/basic.json +1 -0
- package/fixtures/openapi/KubernetesNodeDrainInput/invalid/basic.json +3 -0
- package/fixtures/openapi/KubernetesNodeDrainInput/valid/basic.json +3 -0
- package/fixtures/openapi/KubernetesNodeSchedulabilityInput/invalid/basic.json +1 -0
- package/fixtures/openapi/KubernetesNodeSchedulabilityInput/valid/basic.json +3 -0
- package/fixtures/openapi/KubernetesResourceUpdatePlanRequest/valid/range-kind.json +5 -0
- package/fixtures/openapi/KubernetesResourceYaml/valid/range-kind.json +5 -0
- package/fixtures/openapi/KubernetesSecretDataInput/invalid/basic.json +5 -0
- package/fixtures/openapi/KubernetesSecretDataInput/valid/basic.json +5 -0
- package/fixtures/openapi/NetworkProxyConfigurationInput/invalid/empty-content.json +1 -0
- package/fixtures/openapi/NetworkProxyConfigurationInput/valid/enabled.json +1 -0
- package/fixtures/openapi/NetworkProxyInstanceInput/invalid/unknown-engine.json +1 -0
- package/fixtures/openapi/NetworkProxyInstanceInput/valid/mihomo.json +1 -0
- package/gen/go/sohaapi/client.go +1 -1
- package/gen/go/sohaapi/client_test.go +25 -0
- package/gen/go/sohaapi/types.go +122 -24
- package/gen/ts/sohaapi/index.ts +266 -1
- package/go.mod +4 -4
- package/go.sum +4 -4
- package/network/README.md +12 -0
- package/network/network-ingest-event.schema.json +21 -3
- package/network/network-runtime-protocol.schema.json +2 -2
- package/network/proxy-runtime.schema.json +113 -0
- package/network/schema.go +7 -0
- package/openapi/soha-api.json +938 -4
- package/openapi/soha-api.yaml +389 -3
- package/openapi/spec_generated.go +3 -3
- package/package.json +2 -1
- package/resource/agent_access.go +23 -0
- package/resource/models.go +2 -0
package/openapi/soha-api.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
openapi: 3.1.0
|
|
2
2
|
info:
|
|
3
3
|
title: Soha API
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.21
|
|
5
5
|
description: >
|
|
6
6
|
Public OpenSoha core API contract. This first contract focuses on stable
|
|
7
7
|
cross-repository boundaries: auth, health, runner-facing control-plane
|
|
@@ -34594,6 +34594,99 @@ components:
|
|
|
34594
34594
|
type: boolean
|
|
34595
34595
|
usesInformerCache:
|
|
34596
34596
|
type: boolean
|
|
34597
|
+
customResourceRules:
|
|
34598
|
+
type: array
|
|
34599
|
+
maxItems: 50
|
|
34600
|
+
items:
|
|
34601
|
+
$ref: "#/components/schemas/KubernetesAgentCustomResourceRule"
|
|
34602
|
+
additionalProperties: false
|
|
34603
|
+
KubernetesCustomResourceAccess:
|
|
34604
|
+
type: object
|
|
34605
|
+
required: [allowedActions]
|
|
34606
|
+
properties:
|
|
34607
|
+
allowedActions:
|
|
34608
|
+
type: array
|
|
34609
|
+
items:
|
|
34610
|
+
type: string
|
|
34611
|
+
enum: [list, view, create, update, delete]
|
|
34612
|
+
x-enum-varnames: [CustomResourceAccessList, CustomResourceAccessView, CustomResourceAccessCreate, CustomResourceAccessUpdate, CustomResourceAccessDelete]
|
|
34613
|
+
additionalProperties: false
|
|
34614
|
+
KubernetesCustomResourceAccessEnvelope:
|
|
34615
|
+
type: object
|
|
34616
|
+
required: [data]
|
|
34617
|
+
properties:
|
|
34618
|
+
data: { $ref: "#/components/schemas/KubernetesCustomResourceAccess" }
|
|
34619
|
+
additionalProperties: false
|
|
34620
|
+
KubernetesClusterRegistrationRequest:
|
|
34621
|
+
type: object
|
|
34622
|
+
properties:
|
|
34623
|
+
id: { type: string }
|
|
34624
|
+
name: { type: string }
|
|
34625
|
+
region: { type: string }
|
|
34626
|
+
environment: { type: string }
|
|
34627
|
+
labels: { type: object, additionalProperties: { type: string } }
|
|
34628
|
+
connectionMode: { $ref: "#/components/schemas/KubernetesConnectionMode" }
|
|
34629
|
+
kubeconfig: { type: string }
|
|
34630
|
+
context: { type: string }
|
|
34631
|
+
agentEndpoint: { type: string }
|
|
34632
|
+
agentToken: { type: string, writeOnly: true }
|
|
34633
|
+
prometheusBaseUrl: { type: string }
|
|
34634
|
+
prometheusBearerToken: { type: string, writeOnly: true }
|
|
34635
|
+
prometheusClusterLabel: { type: string }
|
|
34636
|
+
grafanaBaseUrl: { type: string }
|
|
34637
|
+
prometheusTransport: { $ref: "#/components/schemas/KubernetesPrometheusTransport" }
|
|
34638
|
+
agentCustomResourceRules:
|
|
34639
|
+
type: array
|
|
34640
|
+
maxItems: 50
|
|
34641
|
+
items: { $ref: "#/components/schemas/KubernetesAgentCustomResourceRule" }
|
|
34642
|
+
additionalProperties: false
|
|
34643
|
+
KubernetesAgentCustomResourceRule:
|
|
34644
|
+
type: object
|
|
34645
|
+
required: [apiGroup, resources, verbs]
|
|
34646
|
+
properties:
|
|
34647
|
+
apiGroup: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$', maxLength: 253 }
|
|
34648
|
+
resources:
|
|
34649
|
+
type: array
|
|
34650
|
+
minItems: 1
|
|
34651
|
+
maxItems: 50
|
|
34652
|
+
uniqueItems: true
|
|
34653
|
+
items: { type: string, pattern: '^[a-z]([a-z0-9-]*[a-z0-9])?$', maxLength: 63 }
|
|
34654
|
+
verbs:
|
|
34655
|
+
type: array
|
|
34656
|
+
minItems: 1
|
|
34657
|
+
uniqueItems: true
|
|
34658
|
+
items:
|
|
34659
|
+
type: string
|
|
34660
|
+
enum: [get, list, watch, create, update, patch, delete]
|
|
34661
|
+
x-enum-varnames: [KubernetesAgentCustomResourceRuleVerbsGet, KubernetesAgentCustomResourceRuleVerbsList, KubernetesAgentCustomResourceRuleVerbsWatch, KubernetesAgentCustomResourceRuleVerbsCreate, KubernetesAgentCustomResourceRuleVerbsUpdate, KubernetesAgentCustomResourceRuleVerbsPatch, KubernetesAgentCustomResourceRuleVerbsDelete]
|
|
34662
|
+
namespaces:
|
|
34663
|
+
description: Explicit namespaces; omitted or empty grants cluster-wide access to the named resources only.
|
|
34664
|
+
type: array
|
|
34665
|
+
maxItems: 50
|
|
34666
|
+
uniqueItems: true
|
|
34667
|
+
items: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$', maxLength: 63 }
|
|
34668
|
+
additionalProperties: false
|
|
34669
|
+
KubernetesPrometheusTransport:
|
|
34670
|
+
type: string
|
|
34671
|
+
enum: [direct, agent]
|
|
34672
|
+
default: direct
|
|
34673
|
+
AgentPrometheusQueryRequest:
|
|
34674
|
+
type: object
|
|
34675
|
+
required: [endpoint, query, kind]
|
|
34676
|
+
properties:
|
|
34677
|
+
endpoint: { type: string, maxLength: 2048 }
|
|
34678
|
+
query: { type: string, minLength: 1, maxLength: 16384 }
|
|
34679
|
+
kind: { type: string, enum: [instant, range] }
|
|
34680
|
+
start: { type: integer, format: int64, minimum: 1 }
|
|
34681
|
+
end: { type: integer, format: int64, minimum: 1 }
|
|
34682
|
+
step: { type: integer, minimum: 1 }
|
|
34683
|
+
if:
|
|
34684
|
+
properties:
|
|
34685
|
+
kind: { const: range }
|
|
34686
|
+
required: [kind]
|
|
34687
|
+
then:
|
|
34688
|
+
required: [start, end, step]
|
|
34689
|
+
description: Range queries require start, end and step. The runtime also enforces end greater than start, a maximum 24-hour range and at most 11000 intervals.
|
|
34597
34690
|
additionalProperties: false
|
|
34598
34691
|
KubernetesPrometheusDetail:
|
|
34599
34692
|
type: object
|
|
@@ -34607,6 +34700,8 @@ components:
|
|
|
34607
34700
|
type: string
|
|
34608
34701
|
hasBearerToken:
|
|
34609
34702
|
type: boolean
|
|
34703
|
+
transport:
|
|
34704
|
+
$ref: "#/components/schemas/KubernetesPrometheusTransport"
|
|
34610
34705
|
additionalProperties: false
|
|
34611
34706
|
KubernetesMonitoringDetail:
|
|
34612
34707
|
type: object
|
|
@@ -35872,6 +35967,128 @@ components:
|
|
|
35872
35967
|
items:
|
|
35873
35968
|
$ref: "#/components/schemas/KubernetesConfigMap"
|
|
35874
35969
|
additionalProperties: false
|
|
35970
|
+
KubernetesNamespaceInput:
|
|
35971
|
+
type: object
|
|
35972
|
+
properties:
|
|
35973
|
+
name: &a2
|
|
35974
|
+
type: string
|
|
35975
|
+
labels: &a1
|
|
35976
|
+
$ref: "#/components/schemas/KubernetesStringMap"
|
|
35977
|
+
annotations: *a1
|
|
35978
|
+
additionalProperties: false
|
|
35979
|
+
KubernetesNamespaceCreateInput:
|
|
35980
|
+
type: object
|
|
35981
|
+
required: [name]
|
|
35982
|
+
properties:
|
|
35983
|
+
name:
|
|
35984
|
+
type: string
|
|
35985
|
+
minLength: 1
|
|
35986
|
+
pattern: "\\S"
|
|
35987
|
+
labels: *a1
|
|
35988
|
+
annotations: *a1
|
|
35989
|
+
additionalProperties: false
|
|
35990
|
+
KubernetesNamespaceEnvelope:
|
|
35991
|
+
type: object
|
|
35992
|
+
required:
|
|
35993
|
+
- data
|
|
35994
|
+
properties:
|
|
35995
|
+
data:
|
|
35996
|
+
$ref: "#/components/schemas/KubernetesNamespace"
|
|
35997
|
+
additionalProperties: false
|
|
35998
|
+
KubernetesNodeUpdateInput:
|
|
35999
|
+
type: object
|
|
36000
|
+
properties:
|
|
36001
|
+
labels: *a1
|
|
36002
|
+
taints:
|
|
36003
|
+
type: array
|
|
36004
|
+
items:
|
|
36005
|
+
$ref: "#/components/schemas/KubernetesNodeTaint"
|
|
36006
|
+
additionalProperties: false
|
|
36007
|
+
KubernetesNodeSchedulabilityInput:
|
|
36008
|
+
type: object
|
|
36009
|
+
required:
|
|
36010
|
+
- unschedulable
|
|
36011
|
+
properties:
|
|
36012
|
+
unschedulable:
|
|
36013
|
+
type: boolean
|
|
36014
|
+
additionalProperties: false
|
|
36015
|
+
KubernetesNodeDrainInput:
|
|
36016
|
+
type: object
|
|
36017
|
+
properties:
|
|
36018
|
+
force:
|
|
36019
|
+
type: boolean
|
|
36020
|
+
deleteEmptyDirData:
|
|
36021
|
+
type: boolean
|
|
36022
|
+
timeoutSeconds:
|
|
36023
|
+
type: integer
|
|
36024
|
+
minimum: 30
|
|
36025
|
+
maximum: 1800
|
|
36026
|
+
default: 300
|
|
36027
|
+
additionalProperties: false
|
|
36028
|
+
KubernetesResourceYamlInput:
|
|
36029
|
+
type: object
|
|
36030
|
+
required: [content]
|
|
36031
|
+
properties:
|
|
36032
|
+
content: {type: string, minLength: 1}
|
|
36033
|
+
additionalProperties: false
|
|
36034
|
+
KubernetesConfigMapDataInput:
|
|
36035
|
+
type: object
|
|
36036
|
+
properties:
|
|
36037
|
+
data: *a1
|
|
36038
|
+
binaryData: *a1
|
|
36039
|
+
additionalProperties: false
|
|
36040
|
+
KubernetesSecretDataInput:
|
|
36041
|
+
description: Data values are plain text. The response detail returns Kubernetes Base64-encoded values.
|
|
36042
|
+
type: object
|
|
36043
|
+
properties:
|
|
36044
|
+
data: *a1
|
|
36045
|
+
additionalProperties: false
|
|
36046
|
+
KubernetesCronJobSuspendInput:
|
|
36047
|
+
type: object
|
|
36048
|
+
required:
|
|
36049
|
+
- suspend
|
|
36050
|
+
properties:
|
|
36051
|
+
suspend:
|
|
36052
|
+
type: boolean
|
|
36053
|
+
additionalProperties: false
|
|
36054
|
+
KubernetesSecretDetail:
|
|
36055
|
+
type: object
|
|
36056
|
+
required:
|
|
36057
|
+
- name
|
|
36058
|
+
- namespace
|
|
36059
|
+
- immutable
|
|
36060
|
+
- ageSeconds
|
|
36061
|
+
- type
|
|
36062
|
+
properties:
|
|
36063
|
+
name:
|
|
36064
|
+
type: string
|
|
36065
|
+
namespace:
|
|
36066
|
+
type: string
|
|
36067
|
+
labels:
|
|
36068
|
+
$ref: "#/components/schemas/KubernetesStringMap"
|
|
36069
|
+
annotations:
|
|
36070
|
+
$ref: "#/components/schemas/KubernetesStringMap"
|
|
36071
|
+
data:
|
|
36072
|
+
$ref: "#/components/schemas/KubernetesStringMap"
|
|
36073
|
+
description: Secret data values encoded with standard Base64. Requires secret-data.view.
|
|
36074
|
+
immutable:
|
|
36075
|
+
type: boolean
|
|
36076
|
+
createdAt:
|
|
36077
|
+
type: string
|
|
36078
|
+
ageSeconds:
|
|
36079
|
+
type: integer
|
|
36080
|
+
format: int64
|
|
36081
|
+
minimum: 0
|
|
36082
|
+
type: *a2
|
|
36083
|
+
additionalProperties: false
|
|
36084
|
+
KubernetesSecretDetailEnvelope:
|
|
36085
|
+
type: object
|
|
36086
|
+
required:
|
|
36087
|
+
- data
|
|
36088
|
+
properties:
|
|
36089
|
+
data:
|
|
36090
|
+
$ref: "#/components/schemas/KubernetesSecretDetail"
|
|
36091
|
+
additionalProperties: false
|
|
35875
36092
|
KubernetesConfigMapDetail:
|
|
35876
36093
|
type: object
|
|
35877
36094
|
required: [name, namespace, immutable, ageSeconds]
|
|
@@ -37592,6 +37809,8 @@ components:
|
|
|
37592
37809
|
type: object
|
|
37593
37810
|
required: [name, group, scope, kind, plural, ageSeconds]
|
|
37594
37811
|
properties:
|
|
37812
|
+
uid: { type: string, minLength: 1, maxLength: 128 }
|
|
37813
|
+
deletingAt: { type: string, format: date-time }
|
|
37595
37814
|
name: { type: string }
|
|
37596
37815
|
group: { type: string }
|
|
37597
37816
|
scope: { type: string }
|
|
@@ -38203,6 +38422,47 @@ components:
|
|
|
38203
38422
|
data:
|
|
38204
38423
|
$ref: "#/components/schemas/PlatformOperationSummary"
|
|
38205
38424
|
additionalProperties: false
|
|
38425
|
+
ClusterAgentUpgradeInput:
|
|
38426
|
+
type: object
|
|
38427
|
+
additionalProperties: false
|
|
38428
|
+
required: [version]
|
|
38429
|
+
properties:
|
|
38430
|
+
version:
|
|
38431
|
+
type: string
|
|
38432
|
+
maxLength: 64
|
|
38433
|
+
pattern: '^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'
|
|
38434
|
+
description: Explicit stable official Agent version, such as v0.1.7. Registry and container identity cannot be overridden.
|
|
38435
|
+
ClusterAgentUpgradeStatus:
|
|
38436
|
+
type: object
|
|
38437
|
+
additionalProperties: false
|
|
38438
|
+
required: [version, image, recommendedVersion, rolloutStatus, message, canUpgrade]
|
|
38439
|
+
properties:
|
|
38440
|
+
version: {type: string, description: Version reported by the currently connected Agent process.}
|
|
38441
|
+
image: {type: string, description: Desired image of the standard Agent Deployment.}
|
|
38442
|
+
recommendedVersion: {type: string, description: Agent version bundled with this Core release.}
|
|
38443
|
+
rolloutStatus: {type: string}
|
|
38444
|
+
message: {type: string}
|
|
38445
|
+
canUpgrade: {type: boolean}
|
|
38446
|
+
upgradeDisabledReason: {type: string}
|
|
38447
|
+
ClusterAgentUpgradeStatusEnvelope:
|
|
38448
|
+
type: object
|
|
38449
|
+
required: [data]
|
|
38450
|
+
properties:
|
|
38451
|
+
data:
|
|
38452
|
+
$ref: "#/components/schemas/ClusterAgentUpgradeStatus"
|
|
38453
|
+
ClusterAgentUpgradeResult:
|
|
38454
|
+
type: object
|
|
38455
|
+
additionalProperties: false
|
|
38456
|
+
required: [previousImage, targetImage]
|
|
38457
|
+
properties:
|
|
38458
|
+
previousImage: {type: string}
|
|
38459
|
+
targetImage: {type: string}
|
|
38460
|
+
ClusterAgentUpgradeResultEnvelope:
|
|
38461
|
+
type: object
|
|
38462
|
+
required: [data]
|
|
38463
|
+
properties:
|
|
38464
|
+
data:
|
|
38465
|
+
$ref: "#/components/schemas/ClusterAgentUpgradeResult"
|
|
38206
38466
|
AgentInstallation:
|
|
38207
38467
|
type: object
|
|
38208
38468
|
required: [clusterId, manifestUrl, command, expiresAt]
|
|
@@ -40744,6 +41004,7 @@ components:
|
|
|
40744
41004
|
action:
|
|
40745
41005
|
type: string
|
|
40746
41006
|
enum: [create]
|
|
41007
|
+
x-enum-varnames: [Create]
|
|
40747
41008
|
additionalProperties: false
|
|
40748
41009
|
KubernetesResourceCreateScopeDecision:
|
|
40749
41010
|
type: object
|
|
@@ -46365,16 +46626,141 @@ components:
|
|
|
46365
46626
|
maxItems: 200
|
|
46366
46627
|
items: { $ref: "#/components/schemas/NetworkSiteProfileBinding" }
|
|
46367
46628
|
additionalProperties: false
|
|
46629
|
+
NetworkProxyEngine:
|
|
46630
|
+
type: string
|
|
46631
|
+
enum: [mihomo, sing-box, v2ray]
|
|
46632
|
+
x-enum-varnames: [NetworkProxyEngineMihomo, NetworkProxyEngineSingBox, NetworkProxyEngineV2Ray]
|
|
46633
|
+
NetworkProxyInstanceInput:
|
|
46634
|
+
type: object
|
|
46635
|
+
required: [id, name, engine]
|
|
46636
|
+
properties:
|
|
46637
|
+
id: { type: string, minLength: 1, maxLength: 128, pattern: '^[A-Za-z0-9][A-Za-z0-9._:-]*$' }
|
|
46638
|
+
name: { type: string, minLength: 1, maxLength: 128 }
|
|
46639
|
+
engine: { $ref: "#/components/schemas/NetworkProxyEngine" }
|
|
46640
|
+
host: { type: string, maxLength: 128 }
|
|
46641
|
+
additionalProperties: false
|
|
46642
|
+
NetworkProxyInstanceStatus:
|
|
46643
|
+
type: string
|
|
46644
|
+
enum: [unregistered, online, degraded, offline, disabled]
|
|
46645
|
+
x-enum-varnames: [NetworkProxyInstanceStatusUnregistered, NetworkProxyInstanceStatusOnline, NetworkProxyInstanceStatusDegraded, NetworkProxyInstanceStatusOffline, NetworkProxyInstanceStatusDisabled]
|
|
46646
|
+
NetworkProxyCapability:
|
|
46647
|
+
type: string
|
|
46648
|
+
enum: [traffic, connections, close_connection]
|
|
46649
|
+
x-enum-varnames: [NetworkProxyCapabilityTraffic, NetworkProxyCapabilityConnections, NetworkProxyCapabilityCloseConnection]
|
|
46650
|
+
NetworkProxyInstance:
|
|
46651
|
+
type: object
|
|
46652
|
+
required: [id, name, engine, enabled, status, capabilities, desiredRevision, observedRevision, createdAt, updatedAt]
|
|
46653
|
+
properties:
|
|
46654
|
+
id: { type: string, minLength: 1, maxLength: 128 }
|
|
46655
|
+
name: { type: string, minLength: 1, maxLength: 128 }
|
|
46656
|
+
engine: { $ref: "#/components/schemas/NetworkProxyEngine" }
|
|
46657
|
+
enabled: { type: boolean }
|
|
46658
|
+
host: { type: string, maxLength: 128 }
|
|
46659
|
+
engineVersion: { type: string, maxLength: 64 }
|
|
46660
|
+
status: { $ref: "#/components/schemas/NetworkProxyInstanceStatus" }
|
|
46661
|
+
capabilities:
|
|
46662
|
+
type: array
|
|
46663
|
+
maxItems: 3
|
|
46664
|
+
uniqueItems: true
|
|
46665
|
+
items: { $ref: "#/components/schemas/NetworkProxyCapability" }
|
|
46666
|
+
desiredRevision: { type: integer, format: int64, minimum: 0 }
|
|
46667
|
+
observedRevision: { type: integer, format: int64, minimum: 0 }
|
|
46668
|
+
lastSeenAt: { type: string, format: date-time }
|
|
46669
|
+
lastSampleAt: { type: string, format: date-time }
|
|
46670
|
+
reasonCode: { type: string, maxLength: 128 }
|
|
46671
|
+
createdAt: { type: string, format: date-time }
|
|
46672
|
+
updatedAt: { type: string, format: date-time }
|
|
46673
|
+
additionalProperties: false
|
|
46674
|
+
NetworkProxyInstanceEnvelope:
|
|
46675
|
+
type: object
|
|
46676
|
+
required: [data]
|
|
46677
|
+
properties:
|
|
46678
|
+
data: { $ref: "#/components/schemas/NetworkProxyInstance" }
|
|
46679
|
+
additionalProperties: false
|
|
46680
|
+
NetworkProxyInstanceListEnvelope:
|
|
46681
|
+
type: object
|
|
46682
|
+
required: [items]
|
|
46683
|
+
properties:
|
|
46684
|
+
items:
|
|
46685
|
+
type: array
|
|
46686
|
+
maxItems: 200
|
|
46687
|
+
items: { $ref: "#/components/schemas/NetworkProxyInstance" }
|
|
46688
|
+
additionalProperties: false
|
|
46689
|
+
NetworkProxyConfigurationInput:
|
|
46690
|
+
type: object
|
|
46691
|
+
required: [expectedRevision, enabled, content]
|
|
46692
|
+
properties:
|
|
46693
|
+
expectedRevision: { type: integer, format: int64, minimum: 0 }
|
|
46694
|
+
enabled: { type: boolean }
|
|
46695
|
+
content: { type: string, minLength: 1, maxLength: 1048576, format: password, writeOnly: true }
|
|
46696
|
+
additionalProperties: false
|
|
46697
|
+
NetworkProxyTrafficSample:
|
|
46698
|
+
type: object
|
|
46699
|
+
required: [observedAt, uploadTotal, downloadTotal, uploadBytesPerSecond, downloadBytesPerSecond]
|
|
46700
|
+
properties:
|
|
46701
|
+
observedAt: { type: string, format: date-time }
|
|
46702
|
+
uploadTotal: { type: integer, format: int64, minimum: 0 }
|
|
46703
|
+
downloadTotal: { type: integer, format: int64, minimum: 0 }
|
|
46704
|
+
uploadBytesPerSecond: { type: number, minimum: 0 }
|
|
46705
|
+
downloadBytesPerSecond: { type: number, minimum: 0 }
|
|
46706
|
+
activeConnections: { type: integer, minimum: 0 }
|
|
46707
|
+
additionalProperties: false
|
|
46708
|
+
NetworkProxyTrafficEnvelope:
|
|
46709
|
+
type: object
|
|
46710
|
+
required: [instanceId, supported, samples]
|
|
46711
|
+
properties:
|
|
46712
|
+
instanceId: { type: string, minLength: 1, maxLength: 128 }
|
|
46713
|
+
supported: { type: boolean }
|
|
46714
|
+
samples:
|
|
46715
|
+
type: array
|
|
46716
|
+
maxItems: 1440
|
|
46717
|
+
items: { $ref: "#/components/schemas/NetworkProxyTrafficSample" }
|
|
46718
|
+
additionalProperties: false
|
|
46719
|
+
NetworkProxyConnection:
|
|
46720
|
+
type: object
|
|
46721
|
+
required: [id, destination, network, uploadBytes, downloadBytes]
|
|
46722
|
+
properties:
|
|
46723
|
+
id: { type: string, minLength: 1, maxLength: 128 }
|
|
46724
|
+
destination: { type: string, minLength: 1, maxLength: 253 }
|
|
46725
|
+
network:
|
|
46726
|
+
type: string
|
|
46727
|
+
enum: [tcp, udp, other]
|
|
46728
|
+
x-enum-varnames: [NetworkProxyConnectionNetworkTCP, NetworkProxyConnectionNetworkUDP, NetworkProxyConnectionNetworkOther]
|
|
46729
|
+
uploadBytes: { type: integer, format: int64, minimum: 0 }
|
|
46730
|
+
downloadBytes: { type: integer, format: int64, minimum: 0 }
|
|
46731
|
+
startedAt: { type: string, format: date-time }
|
|
46732
|
+
additionalProperties: false
|
|
46733
|
+
NetworkProxyConnectionsEnvelope:
|
|
46734
|
+
type: object
|
|
46735
|
+
required: [instanceId, state, connections]
|
|
46736
|
+
properties:
|
|
46737
|
+
instanceId: { type: string, minLength: 1, maxLength: 128 }
|
|
46738
|
+
state: { type: string, enum: [available, unsupported, unavailable] }
|
|
46739
|
+
observedAt: { type: string, format: date-time }
|
|
46740
|
+
connections:
|
|
46741
|
+
type: array
|
|
46742
|
+
maxItems: 200
|
|
46743
|
+
items: { $ref: "#/components/schemas/NetworkProxyConnection" }
|
|
46744
|
+
additionalProperties: false
|
|
46745
|
+
NetworkProxyCloseCommandEnvelope:
|
|
46746
|
+
type: object
|
|
46747
|
+
required: [commandId, status, expiresAt]
|
|
46748
|
+
properties:
|
|
46749
|
+
commandId: { type: string, minLength: 1, maxLength: 128 }
|
|
46750
|
+
status: { type: string, enum: [pending, closed, not-found, failed, expired] }
|
|
46751
|
+
expiresAt: { type: string, format: date-time }
|
|
46752
|
+
additionalProperties: false
|
|
46368
46753
|
NetworkRuntimeKind:
|
|
46369
46754
|
type: string
|
|
46370
|
-
enum: [endpoint, gateway, nas]
|
|
46371
|
-
x-enum-varnames: [NetworkRuntimeKindEndpoint, NetworkRuntimeKindGateway, NetworkRuntimeKindNAS]
|
|
46755
|
+
enum: [endpoint, gateway, nas, proxy]
|
|
46756
|
+
x-enum-varnames: [NetworkRuntimeKindEndpoint, NetworkRuntimeKindGateway, NetworkRuntimeKindNAS, NetworkRuntimeKindProxy]
|
|
46372
46757
|
NetworkRuntimeEnrollmentStatus:
|
|
46373
46758
|
type: string
|
|
46374
46759
|
enum: [pending, consumed, revoked]
|
|
46375
46760
|
x-enum-varnames: [NetworkRuntimeEnrollmentStatusPending, NetworkRuntimeEnrollmentStatusConsumed, NetworkRuntimeEnrollmentStatusRevoked]
|
|
46376
46761
|
NetworkRuntimeEnrollmentInput:
|
|
46377
46762
|
type: object
|
|
46763
|
+
description: For proxy runtimes, runtimeId identifies an existing proxy instance and deviceId and subjectId must equal runtimeId.
|
|
46378
46764
|
required: [runtimeId, runtimeKind, deviceId, subjectId]
|
|
46379
46765
|
properties:
|
|
46380
46766
|
runtimeId: { type: string, minLength: 1, maxLength: 128 }
|
|
@@ -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.21"
|
|
9
|
+
YAMLSHA256 = "4f6a18c89a70f8ce91f27eb8d52eb49a7f5e4db38dc7de27eaa0efceac1c33fe"
|
|
10
|
+
JSONSHA256 = "5e3ba8e83879359042b4df47658cb2df7e67a7bcc941ab2507155a1555c93d25"
|
|
11
11
|
)
|
|
12
12
|
|
|
13
13
|
//go:embed soha-api.yaml
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@opensoha/contracts",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared OpenSoha API, agent, MCP, skill, event, and auth contracts.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
"./network/network-runtime-protocol.schema.json": "./network/network-runtime-protocol.schema.json",
|
|
66
66
|
"./network/network-ingest-event.schema.json": "./network/network-ingest-event.schema.json",
|
|
67
67
|
"./network/network-radius-accounting.schema.json": "./network/network-radius-accounting.schema.json",
|
|
68
|
+
"./network/proxy-runtime.schema.json": "./network/proxy-runtime.schema.json",
|
|
68
69
|
"./knowledge/knowledge-base.schema.json": "./knowledge/knowledge-base.schema.json",
|
|
69
70
|
"./knowledge/knowledge-source.schema.json": "./knowledge/knowledge-source.schema.json",
|
|
70
71
|
"./knowledge/knowledge-search.schema.json": "./knowledge/knowledge-search.schema.json",
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
package resource
|
|
2
|
+
|
|
3
|
+
// CustomResourceAccessRequest checks the Agent's own Kubernetes identity.
|
|
4
|
+
type CustomResourceAccessRequest struct {
|
|
5
|
+
Definition CRDResourceDefinition `json:"definition"`
|
|
6
|
+
Namespace string `json:"namespace"`
|
|
7
|
+
Name string `json:"name,omitempty"`
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
type CustomResourceAccess struct {
|
|
11
|
+
AllowedActions []string `json:"allowedActions"`
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// PrometheusQuery carries a bounded query for an already configured endpoint.
|
|
15
|
+
// Endpoint must match the Agent configuration; it is never a proxy destination.
|
|
16
|
+
type PrometheusQuery struct {
|
|
17
|
+
Endpoint string `json:"endpoint"`
|
|
18
|
+
Query string `json:"query"`
|
|
19
|
+
Kind string `json:"kind"`
|
|
20
|
+
Start int64 `json:"start,omitempty"`
|
|
21
|
+
End int64 `json:"end,omitempty"`
|
|
22
|
+
Step int64 `json:"step,omitempty"`
|
|
23
|
+
}
|
package/resource/models.go
CHANGED
|
@@ -1084,6 +1084,8 @@ type StorageClassDetailView struct {
|
|
|
1084
1084
|
}
|
|
1085
1085
|
|
|
1086
1086
|
type CRDView struct {
|
|
1087
|
+
UID string `json:"uid,omitempty"`
|
|
1088
|
+
DeletingAt string `json:"deletingAt,omitempty"`
|
|
1087
1089
|
Name string `json:"name"`
|
|
1088
1090
|
Group string `json:"group"`
|
|
1089
1091
|
Scope string `json:"scope"`
|