@opensoha/contracts 0.1.18 → 0.1.20

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.
Files changed (49) hide show
  1. package/COMPATIBILITY.md +33 -6
  2. package/README.md +1 -0
  3. package/compat/consumer-revisions.json +5 -1
  4. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  5. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  6. package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/basic.json +5 -0
  7. package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/missing-range-fields.json +5 -0
  8. package/fixtures/openapi/AgentPrometheusQueryRequest/invalid/zero-start.json +8 -0
  9. package/fixtures/openapi/AgentPrometheusQueryRequest/valid/basic.json +8 -0
  10. package/fixtures/openapi/AgentPrometheusQueryRequest/valid/instant.json +5 -0
  11. package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/image.json +1 -0
  12. package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/missing.json +1 -0
  13. package/fixtures/openapi/ClusterAgentUpgradeInput/invalid/mutable-tag.json +1 -0
  14. package/fixtures/openapi/ClusterAgentUpgradeInput/valid/stable.json +1 -0
  15. package/fixtures/openapi/ClusterAgentUpgradeInput/valid/unprefixed.json +1 -0
  16. package/fixtures/openapi/ConnectionCheckResult/invalid/missing-health.json +1 -0
  17. package/fixtures/openapi/ConnectionCheckResult/invalid/task-id.json +1 -0
  18. package/fixtures/openapi/ConnectionCheckResult/valid/failure.json +1 -0
  19. package/fixtures/openapi/ConnectionCheckResult/valid/healthy.json +1 -0
  20. package/fixtures/openapi/KubernetesAgentCustomResourceRule/invalid/basic.json +9 -0
  21. package/fixtures/openapi/KubernetesAgentCustomResourceRule/valid/basic.json +14 -0
  22. package/fixtures/openapi/KubernetesAgentCustomResourceRule/valid/dns-names.json +1 -0
  23. package/fixtures/openapi/KubernetesClusterRegistrationRequest/invalid/basic.json +4 -0
  24. package/fixtures/openapi/KubernetesClusterRegistrationRequest/valid/basic.json +6 -0
  25. package/fixtures/openapi/KubernetesConfigMapDataInput/invalid/basic.json +5 -0
  26. package/fixtures/openapi/KubernetesConfigMapDataInput/valid/basic.json +8 -0
  27. package/fixtures/openapi/KubernetesCronJobSuspendInput/invalid/basic.json +3 -0
  28. package/fixtures/openapi/KubernetesCronJobSuspendInput/valid/basic.json +3 -0
  29. package/fixtures/openapi/KubernetesCustomResourceAccess/invalid/basic.json +5 -0
  30. package/fixtures/openapi/KubernetesCustomResourceAccess/valid/basic.json +6 -0
  31. package/fixtures/openapi/KubernetesNamespaceCreateInput/invalid/basic.json +1 -0
  32. package/fixtures/openapi/KubernetesNamespaceCreateInput/valid/basic.json +1 -0
  33. package/fixtures/openapi/KubernetesNodeDrainInput/invalid/basic.json +3 -0
  34. package/fixtures/openapi/KubernetesNodeDrainInput/valid/basic.json +3 -0
  35. package/fixtures/openapi/KubernetesNodeSchedulabilityInput/invalid/basic.json +1 -0
  36. package/fixtures/openapi/KubernetesNodeSchedulabilityInput/valid/basic.json +3 -0
  37. package/fixtures/openapi/KubernetesSecretDataInput/invalid/basic.json +5 -0
  38. package/fixtures/openapi/KubernetesSecretDataInput/valid/basic.json +5 -0
  39. package/fixtures/openapi/UpdateBrandingSettingsRequest/invalid/dark-logo-type.json +9 -0
  40. package/fixtures/openapi/UpdateBrandingSettingsRequest/valid/dark-logos.json +10 -0
  41. package/gen/go/sohaapi/client.go +11 -3
  42. package/gen/go/sohaapi/client_test.go +26 -3
  43. package/gen/go/sohaapi/types.go +121 -23
  44. package/gen/ts/sohaapi/index.ts +208 -2
  45. package/openapi/soha-api.json +623 -4
  46. package/openapi/soha-api.yaml +317 -3
  47. package/openapi/spec_generated.go +3 -3
  48. package/package.json +1 -1
  49. package/resource/agent_access.go +23 -0
@@ -1,7 +1,7 @@
1
1
  openapi: 3.1.0
2
2
  info:
3
3
  title: Soha API
4
- version: 0.1.18
4
+ version: 0.1.20
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
@@ -2163,6 +2163,7 @@ paths:
2163
2163
  delete:
2164
2164
  tags: [Applications]
2165
2165
  operationId: deleteApplication
2166
+ description: Deletes the application and its owned configuration and history. Does not uninstall cluster workloads. Unfinished delivery tasks or external references prevent deletion.
2166
2167
  parameters:
2167
2168
  - $ref: "#/components/parameters/ApplicationID"
2168
2169
  responses:
@@ -2176,6 +2177,8 @@ paths:
2176
2177
  $ref: "#/components/responses/Error"
2177
2178
  "404":
2178
2179
  $ref: "#/components/responses/Error"
2180
+ "409":
2181
+ $ref: "#/components/responses/Error"
2179
2182
  /applications/{applicationID}/detail:
2180
2183
  get:
2181
2184
  tags: [Applications, Delivery]
@@ -5456,8 +5459,13 @@ paths:
5456
5459
  parameters:
5457
5460
  - { name: connectionID, in: path, required: true, schema: { type: string } }
5458
5461
  responses:
5462
+ "200":
5463
+ description: Completed synchronous connection check. Each request probes the connection and returns its current health; no task or task log is created.
5464
+ content:
5465
+ application/json:
5466
+ schema: { $ref: "#/components/schemas/ConnectionCheckResultEnvelope" }
5459
5467
  "202":
5460
- description: Completed connection-test operation.
5468
+ description: Legacy response for a completed connection check, retained for older servers. Read the operation result directly.
5461
5469
  content:
5462
5470
  application/json:
5463
5471
  schema: { $ref: "#/components/schemas/VirtualizationOperationEnvelope" }
@@ -10296,6 +10304,7 @@ paths:
10296
10304
  post:
10297
10305
  tags: [Docker]
10298
10306
  operationId: queryDockerProjectLogs
10307
+ description: Requires docker.services.logs. Reads bounded logs directly from the runtime without submitting an operation.
10299
10308
  parameters:
10300
10309
  - $ref: "#/components/parameters/DockerProjectID"
10301
10310
  requestBody:
@@ -10325,6 +10334,7 @@ paths:
10325
10334
  post:
10326
10335
  tags: [Docker]
10327
10336
  operationId: issueDockerProjectLogStreamTicket
10337
+ description: Requires docker.services.logs. The same permission is rechecked when opening the stream.
10328
10338
  parameters:
10329
10339
  - $ref: "#/components/parameters/DockerProjectID"
10330
10340
  requestBody:
@@ -13681,8 +13691,14 @@ paths:
13681
13691
  schema:
13682
13692
  $ref: "#/components/schemas/ComputeProviderReadRequest"
13683
13693
  responses:
13694
+ "200":
13695
+ description: Completed synchronous health check. Each request probes the connection and returns its current health; no task or task log is created. Idempotency-Key is accepted for request compatibility but does not replay an earlier check.
13696
+ content:
13697
+ application/json:
13698
+ schema:
13699
+ $ref: "#/components/schemas/ConnectionCheckResultEnvelope"
13684
13700
  "202":
13685
- description: Health check accepted as a source-domain task. The request never returns the Provider raw response.
13701
+ description: Legacy health-check response retained for older servers. The task contains the completed result, never the Provider raw response.
13686
13702
  content:
13687
13703
  application/json:
13688
13704
  schema:
@@ -13773,6 +13789,10 @@ paths:
13773
13789
  post:
13774
13790
  tags: [Compute]
13775
13791
  operationId: executeComputeResourceAction
13792
+ description: >-
13793
+ Enqueue a supported resource mutation. Container service actions are start,
13794
+ stop and restart. Log reads use the direct project log query API; action
13795
+ logs is rejected without creating a task.
13776
13796
  parameters:
13777
13797
  - $ref: "#/components/parameters/ComputeDomain"
13778
13798
  - $ref: "#/components/parameters/ComputeResourceKind"
@@ -13952,6 +13972,11 @@ paths:
13952
13972
  post:
13953
13973
  tags: [Compute]
13954
13974
  operationId: retryComputeTask
13975
+ description: >-
13976
+ Retry an asynchronous operation when its returned state permits it.
13977
+ Historical connection_test, port_reserve and service_action logs records
13978
+ remain readable but cannot be requeued; use their direct check, metadata
13979
+ or log query APIs instead.
13955
13980
  parameters:
13956
13981
  - $ref: "#/components/parameters/ComputeTaskDomain"
13957
13982
  - $ref: "#/components/parameters/ComputeTaskID"
@@ -13969,6 +13994,8 @@ paths:
13969
13994
  application/json:
13970
13995
  schema:
13971
13996
  $ref: "#/components/schemas/ComputeTaskEnvelope"
13997
+ "400":
13998
+ $ref: "#/components/responses/ComputeError"
13972
13999
  "403":
13973
14000
  $ref: "#/components/responses/ComputeError"
13974
14001
  "404":
@@ -23379,6 +23406,25 @@ components:
23379
23406
  type: array
23380
23407
  items: { $ref: "#/components/schemas/ComputeResourceRef" }
23381
23408
  additionalProperties: false
23409
+ ConnectionCheckResult:
23410
+ type: object
23411
+ description: Current connection health from a synchronous probe. This result is not a task and has no task identifier or lifecycle actions.
23412
+ required: [healthy, status, checkedAt]
23413
+ properties:
23414
+ healthy: { type: boolean }
23415
+ status: { type: string }
23416
+ message: { type: string }
23417
+ reason: { type: string }
23418
+ nextAction: { type: string }
23419
+ httpStatus: { type: integer }
23420
+ checkedAt: { type: string, format: date-time }
23421
+ additionalProperties: false
23422
+ ConnectionCheckResultEnvelope:
23423
+ type: object
23424
+ required: [data]
23425
+ properties:
23426
+ data: { $ref: "#/components/schemas/ConnectionCheckResult" }
23427
+ additionalProperties: false
23382
23428
  ComputeTaskView:
23383
23429
  type: object
23384
23430
  required: [id, domain, sourceType, sourceId, kind, category, normalizedStatus, rawStatus, resources, attemptCount, cancelable, retryable, availableActions, createdAt]
@@ -25309,6 +25355,12 @@ components:
25309
25355
  loginLogoUrl: { type: string }
25310
25356
  expandedLogoUrl: { type: string }
25311
25357
  collapsedLogoUrl: { type: string }
25358
+ darkExpandedLogoUrl:
25359
+ type: string
25360
+ description: Optional dark-theme expanded logo. Empty or absent uses expandedLogoUrl.
25361
+ darkCollapsedLogoUrl:
25362
+ type: string
25363
+ description: Optional dark-theme compact logo. Empty or absent uses collapsedLogoUrl.
25312
25364
  faviconUrl: { type: string }
25313
25365
  additionalProperties: false
25314
25366
  BrandingSettingsEnvelope:
@@ -25328,6 +25380,12 @@ components:
25328
25380
  loginLogoUrl: { type: string }
25329
25381
  expandedLogoUrl: { type: string }
25330
25382
  collapsedLogoUrl: { type: string }
25383
+ darkExpandedLogoUrl:
25384
+ type: string
25385
+ description: Optional dark-theme expanded logo. Empty or absent clears the override.
25386
+ darkCollapsedLogoUrl:
25387
+ type: string
25388
+ description: Optional dark-theme compact logo. Empty or absent clears the override.
25331
25389
  faviconUrl: { type: string }
25332
25390
  additionalProperties: false
25333
25391
  BrandingAssetUpload:
@@ -34536,6 +34594,11 @@ components:
34536
34594
  type: boolean
34537
34595
  usesInformerCache:
34538
34596
  type: boolean
34597
+ customResourceRules:
34598
+ type: array
34599
+ maxItems: 50
34600
+ items:
34601
+ $ref: "#/components/schemas/KubernetesAgentCustomResourceRule"
34539
34602
  additionalProperties: false
34540
34603
  KubernetesPrometheusDetail:
34541
34604
  type: object
@@ -34549,6 +34612,8 @@ components:
34549
34612
  type: string
34550
34613
  hasBearerToken:
34551
34614
  type: boolean
34615
+ transport:
34616
+ $ref: "#/components/schemas/KubernetesPrometheusTransport"
34552
34617
  additionalProperties: false
34553
34618
  KubernetesMonitoringDetail:
34554
34619
  type: object
@@ -40686,6 +40751,7 @@ components:
40686
40751
  action:
40687
40752
  type: string
40688
40753
  enum: [create]
40754
+ x-enum-varnames: [Create]
40689
40755
  additionalProperties: false
40690
40756
  KubernetesResourceCreateScopeDecision:
40691
40757
  type: object
@@ -46864,3 +46930,251 @@ components:
46864
46930
  properties:
46865
46931
  data: { $ref: "#/components/schemas/NetworkPolicyPreviewResult" }
46866
46932
  additionalProperties: false
46933
+ KubernetesCustomResourceAccess:
46934
+ type: object
46935
+ required: [allowedActions]
46936
+ properties:
46937
+ allowedActions:
46938
+ type: array
46939
+ items: { type: string, enum: [list, view, create, update, delete] }
46940
+ additionalProperties: false
46941
+ KubernetesCustomResourceAccessEnvelope:
46942
+ type: object
46943
+ required: [data]
46944
+ properties:
46945
+ data: { $ref: "#/components/schemas/KubernetesCustomResourceAccess" }
46946
+ additionalProperties: false
46947
+ KubernetesClusterRegistrationRequest:
46948
+ type: object
46949
+ properties:
46950
+ id: { type: string }
46951
+ name: { type: string }
46952
+ region: { type: string }
46953
+ environment: { type: string }
46954
+ labels: { type: object, additionalProperties: { type: string } }
46955
+ connectionMode: { $ref: "#/components/schemas/KubernetesConnectionMode" }
46956
+ kubeconfig: { type: string }
46957
+ context: { type: string }
46958
+ agentEndpoint: { type: string }
46959
+ agentToken: { type: string, writeOnly: true }
46960
+ prometheusBaseUrl: { type: string }
46961
+ prometheusBearerToken: { type: string, writeOnly: true }
46962
+ prometheusClusterLabel: { type: string }
46963
+ grafanaBaseUrl: { type: string }
46964
+ prometheusTransport: { $ref: "#/components/schemas/KubernetesPrometheusTransport" }
46965
+ agentCustomResourceRules:
46966
+ type: array
46967
+ maxItems: 50
46968
+ items: { $ref: "#/components/schemas/KubernetesAgentCustomResourceRule" }
46969
+ additionalProperties: false
46970
+ KubernetesAgentCustomResourceRule:
46971
+ type: object
46972
+ required: [apiGroup, resources, verbs]
46973
+ properties:
46974
+ apiGroup: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$', maxLength: 253 }
46975
+ resources:
46976
+ type: array
46977
+ minItems: 1
46978
+ maxItems: 50
46979
+ uniqueItems: true
46980
+ items: { type: string, pattern: '^[a-z]([a-z0-9-]*[a-z0-9])?$', maxLength: 63 }
46981
+ verbs:
46982
+ type: array
46983
+ minItems: 1
46984
+ uniqueItems: true
46985
+ items:
46986
+ type: string
46987
+ enum: [get, list, watch, create, update, patch, delete]
46988
+ x-enum-varnames: [KubernetesAgentCustomResourceRuleVerbsGet, KubernetesAgentCustomResourceRuleVerbsList, KubernetesAgentCustomResourceRuleVerbsWatch, KubernetesAgentCustomResourceRuleVerbsCreate, KubernetesAgentCustomResourceRuleVerbsUpdate, KubernetesAgentCustomResourceRuleVerbsPatch, KubernetesAgentCustomResourceRuleVerbsDelete]
46989
+ namespaces:
46990
+ description: Explicit namespaces; omitted or empty grants cluster-wide access to the named resources only.
46991
+ type: array
46992
+ maxItems: 50
46993
+ uniqueItems: true
46994
+ items: { type: string, pattern: '^[a-z0-9]([a-z0-9-]*[a-z0-9])?$', maxLength: 63 }
46995
+ additionalProperties: false
46996
+ KubernetesPrometheusTransport:
46997
+ type: string
46998
+ enum: [direct, agent]
46999
+ default: direct
47000
+ AgentPrometheusQueryRequest:
47001
+ type: object
47002
+ required: [endpoint, query, kind]
47003
+ properties:
47004
+ endpoint: { type: string, maxLength: 2048 }
47005
+ query: { type: string, minLength: 1, maxLength: 16384 }
47006
+ kind: { type: string, enum: [instant, range] }
47007
+ start: { type: integer, format: int64, minimum: 1 }
47008
+ end: { type: integer, format: int64, minimum: 1 }
47009
+ step: { type: integer, minimum: 1 }
47010
+ if:
47011
+ properties:
47012
+ kind: { const: range }
47013
+ required: [kind]
47014
+ then:
47015
+ required: [start, end, step]
47016
+ 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.
47017
+ additionalProperties: false
47018
+ KubernetesNamespaceInput:
47019
+ type: object
47020
+ properties:
47021
+ name: &a2
47022
+ type: string
47023
+ labels: &a1
47024
+ $ref: "#/components/schemas/KubernetesStringMap"
47025
+ annotations: *a1
47026
+ additionalProperties: false
47027
+ KubernetesNamespaceCreateInput:
47028
+ type: object
47029
+ required: [name]
47030
+ properties:
47031
+ name:
47032
+ type: string
47033
+ minLength: 1
47034
+ pattern: "\\S"
47035
+ labels: *a1
47036
+ annotations: *a1
47037
+ additionalProperties: false
47038
+ KubernetesNamespaceEnvelope:
47039
+ type: object
47040
+ required:
47041
+ - data
47042
+ properties:
47043
+ data:
47044
+ $ref: "#/components/schemas/KubernetesNamespace"
47045
+ additionalProperties: false
47046
+ KubernetesNodeUpdateInput:
47047
+ type: object
47048
+ properties:
47049
+ labels: *a1
47050
+ taints:
47051
+ type: array
47052
+ items:
47053
+ $ref: "#/components/schemas/KubernetesNodeTaint"
47054
+ additionalProperties: false
47055
+ KubernetesNodeSchedulabilityInput:
47056
+ type: object
47057
+ required:
47058
+ - unschedulable
47059
+ properties:
47060
+ unschedulable:
47061
+ type: boolean
47062
+ additionalProperties: false
47063
+ KubernetesNodeDrainInput:
47064
+ type: object
47065
+ properties:
47066
+ force:
47067
+ type: boolean
47068
+ deleteEmptyDirData:
47069
+ type: boolean
47070
+ timeoutSeconds:
47071
+ type: integer
47072
+ minimum: 30
47073
+ maximum: 1800
47074
+ default: 300
47075
+ additionalProperties: false
47076
+ KubernetesResourceYamlInput:
47077
+ type: object
47078
+ required: [content]
47079
+ properties:
47080
+ content: {type: string, minLength: 1}
47081
+ additionalProperties: false
47082
+ KubernetesConfigMapDataInput:
47083
+ type: object
47084
+ properties:
47085
+ data: *a1
47086
+ binaryData: *a1
47087
+ additionalProperties: false
47088
+ KubernetesSecretDataInput:
47089
+ description: Data values are plain text. The response detail returns Kubernetes Base64-encoded values.
47090
+ type: object
47091
+ properties:
47092
+ data: *a1
47093
+ additionalProperties: false
47094
+ KubernetesCronJobSuspendInput:
47095
+ type: object
47096
+ required:
47097
+ - suspend
47098
+ properties:
47099
+ suspend:
47100
+ type: boolean
47101
+ additionalProperties: false
47102
+ KubernetesSecretDetail:
47103
+ type: object
47104
+ required:
47105
+ - name
47106
+ - namespace
47107
+ - immutable
47108
+ - ageSeconds
47109
+ - type
47110
+ properties:
47111
+ name:
47112
+ type: string
47113
+ namespace:
47114
+ type: string
47115
+ labels:
47116
+ $ref: "#/components/schemas/KubernetesStringMap"
47117
+ annotations:
47118
+ $ref: "#/components/schemas/KubernetesStringMap"
47119
+ data:
47120
+ $ref: "#/components/schemas/KubernetesStringMap"
47121
+ description: Secret data values encoded with standard Base64. Requires secret-data.view.
47122
+ immutable:
47123
+ type: boolean
47124
+ createdAt:
47125
+ type: string
47126
+ ageSeconds:
47127
+ type: integer
47128
+ format: int64
47129
+ minimum: 0
47130
+ type: *a2
47131
+ additionalProperties: false
47132
+ KubernetesSecretDetailEnvelope:
47133
+ type: object
47134
+ required:
47135
+ - data
47136
+ properties:
47137
+ data:
47138
+ $ref: "#/components/schemas/KubernetesSecretDetail"
47139
+ additionalProperties: false
47140
+ ClusterAgentUpgradeInput:
47141
+ type: object
47142
+ additionalProperties: false
47143
+ required: [version]
47144
+ properties:
47145
+ version:
47146
+ type: string
47147
+ maxLength: 64
47148
+ pattern: '^v?(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)$'
47149
+ description: Explicit stable official Agent version, such as v0.1.7. Registry and container identity cannot be overridden.
47150
+ ClusterAgentUpgradeStatus:
47151
+ type: object
47152
+ additionalProperties: false
47153
+ required: [version, image, recommendedVersion, rolloutStatus, message, canUpgrade]
47154
+ properties:
47155
+ version: {type: string, description: Version reported by the currently connected Agent process.}
47156
+ image: {type: string, description: Desired image of the standard Agent Deployment.}
47157
+ recommendedVersion: {type: string, description: Agent version bundled with this Core release.}
47158
+ rolloutStatus: {type: string}
47159
+ message: {type: string}
47160
+ canUpgrade: {type: boolean}
47161
+ upgradeDisabledReason: {type: string}
47162
+ ClusterAgentUpgradeStatusEnvelope:
47163
+ type: object
47164
+ required: [data]
47165
+ properties:
47166
+ data:
47167
+ $ref: "#/components/schemas/ClusterAgentUpgradeStatus"
47168
+ ClusterAgentUpgradeResult:
47169
+ type: object
47170
+ additionalProperties: false
47171
+ required: [previousImage, targetImage]
47172
+ properties:
47173
+ previousImage: {type: string}
47174
+ targetImage: {type: string}
47175
+ ClusterAgentUpgradeResultEnvelope:
47176
+ type: object
47177
+ required: [data]
47178
+ properties:
47179
+ data:
47180
+ $ref: "#/components/schemas/ClusterAgentUpgradeResult"
@@ -5,9 +5,9 @@ package openapi
5
5
  import _ "embed"
6
6
 
7
7
  const (
8
- Version = "0.1.18"
9
- YAMLSHA256 = "d614ce858924d94da353c7a9380971a3e80964f3e6c865e8b27108e859500cf4"
10
- JSONSHA256 = "a98ea9ad99b6f044ce14e42f37b90b42e28347d53e37c727a04210b076aba960"
8
+ Version = "0.1.20"
9
+ YAMLSHA256 = "cbf0b3c1f47da982289c43ccdc76c5eb9e2c8d064aebfe92aa23e4b179ea136b"
10
+ JSONSHA256 = "6862030a09d680756adc6bff8cc1e6bf81318704bf957027f22e1b7655bb471e"
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.18",
3
+ "version": "0.1.20",
4
4
  "private": false,
5
5
  "description": "Shared OpenSoha API, agent, MCP, skill, event, and auth contracts.",
6
6
  "license": "Apache-2.0",
@@ -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
+ }