@opensoha/contracts 0.1.14 → 0.1.15

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 (40) hide show
  1. package/auth/catalog_generated.go +2 -2
  2. package/auth/permission-catalog.json +105 -1
  3. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  4. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  5. package/fixtures/openapi/AISkillsSettingsEnvelope/invalid/missing-registry.json +3 -0
  6. package/fixtures/openapi/AISkillsSettingsEnvelope/valid/registry.json +13 -0
  7. package/fixtures/openapi/AlertEventStreamSignal/invalid/missing-observed-at.json +4 -0
  8. package/fixtures/openapi/AlertEventStreamSignal/valid/changed.json +9 -0
  9. package/fixtures/openapi/ComputeOverviewEnvelope/valid/partial.json +6 -0
  10. package/fixtures/openapi/ComputeTaskListEnvelope/invalid/progress-overflow.json +21 -0
  11. package/fixtures/openapi/ComputeTaskListEnvelope/valid/running.json +15 -0
  12. package/fixtures/openapi/ComputeTaskStreamEvent/invalid/missing-observed-at.json +3 -0
  13. package/fixtures/openapi/ComputeTaskStreamEvent/valid/snapshot.json +27 -0
  14. package/fixtures/openapi/KubernetesResourceGraphEnvelope/invalid/edge-without-target.json +16 -0
  15. package/fixtures/openapi/KubernetesResourceGraphEnvelope/valid/deployment.json +53 -0
  16. package/fixtures/openapi/KubernetesResourceSearchEnvelope/invalid/missing-resource.json +10 -0
  17. package/fixtures/openapi/KubernetesResourceSearchEnvelope/valid/mixed.json +29 -0
  18. package/fixtures/openapi/KubernetesResourceStreamEvent/invalid/missing-observed-at.json +5 -0
  19. package/fixtures/openapi/KubernetesResourceStreamEvent/valid/modified.json +18 -0
  20. package/fixtures/openapi/KubernetesSecurityPostureEnvelope/invalid/finding-without-severity.json +24 -0
  21. package/fixtures/openapi/KubernetesSecurityPostureEnvelope/valid/kubescape.json +34 -0
  22. package/fixtures/openapi/KubernetesService/invalid/node-port-out-of-range.json +14 -0
  23. package/fixtures/openapi/KubernetesService/valid/port-mappings.json +22 -0
  24. package/fixtures/openapi/KubernetesServiceDetail/invalid/empty-target-port.json +13 -0
  25. package/fixtures/openapi/KubernetesServiceDetail/valid/port-mappings.json +22 -0
  26. package/fixtures/openapi/OperationalPlanEnvelope/invalid/kubernetes-owner-without-manager.json +29 -0
  27. package/fixtures/openapi/OperationalPlanEnvelope/valid/kubernetes-resource-update.json +30 -0
  28. package/fixtures/openapi/WorkbenchAgentRunListEnvelope/invalid/callback-token.json +17 -0
  29. package/fixtures/openapi/WorkbenchAgentRunListEnvelope/valid/session-scoped.json +17 -0
  30. package/fixtures/openapi/WorkbenchSessionEnvelope/invalid/missing-owner.json +8 -0
  31. package/fixtures/openapi/WorkbenchSessionEnvelope/valid/current.json +17 -0
  32. package/gen/go/sohaapi/client.go +1 -1
  33. package/gen/go/sohaapi/types.go +1716 -59
  34. package/gen/go/sohaapi/types_test.go +40 -0
  35. package/gen/ts/sohaapi/index.ts +12848 -9909
  36. package/openapi/soha-api.json +11328 -5927
  37. package/openapi/soha-api.yaml +11106 -8649
  38. package/openapi/spec_generated.go +3 -3
  39. package/package.json +1 -1
  40. package/resource/models.go +197 -0
@@ -5,9 +5,9 @@ package openapi
5
5
  import _ "embed"
6
6
 
7
7
  const (
8
- Version = "0.1.14"
9
- YAMLSHA256 = "231a8b25b830df7c602c1356494502235ca8c00f23a4aea56c87c0fd79438663"
10
- JSONSHA256 = "35983758f2bf5d2b4c2e918ee32f34f384218d882edf42d86c310f2820e2a82f"
8
+ Version = "0.1.15"
9
+ YAMLSHA256 = "5de407feba0f68943fbd03103e78da8124177014a400fe483e1d9986312fb247"
10
+ JSONSHA256 = "be2e066a7fd4eec74f5c2d240860fdb7a343ff9a3fb25456982ecaea7eb355c3"
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.14",
3
+ "version": "0.1.15",
4
4
  "private": false,
5
5
  "description": "Shared OpenSoha API, agent, MCP, skill, event, and auth contracts.",
6
6
  "license": "Apache-2.0",
@@ -6,6 +6,87 @@ const (
6
6
  StorageRelationLimit = 200
7
7
  )
8
8
 
9
+ type ResourceScopeMode string
10
+
11
+ const (
12
+ ResourceScopeModeCluster ResourceScopeMode = "cluster"
13
+ ResourceScopeModeNamespace ResourceScopeMode = "namespace"
14
+ )
15
+
16
+ type ResourceRef struct {
17
+ ClusterID string `json:"clusterId"`
18
+ APIVersion string `json:"apiVersion"`
19
+ Kind string `json:"kind"`
20
+ Name string `json:"name"`
21
+ Namespace string `json:"namespace,omitempty"`
22
+ ScopeMode ResourceScopeMode `json:"scopeMode"`
23
+ UID string `json:"uid,omitempty"`
24
+ }
25
+
26
+ type ResourceSearchItem struct {
27
+ Resource ResourceRef `json:"resource"`
28
+ Status string `json:"status,omitempty"`
29
+ }
30
+
31
+ type ResourceSearchResult struct {
32
+ Items []ResourceSearchItem `json:"items"`
33
+ Truncated bool `json:"truncated"`
34
+ }
35
+
36
+ type ResourceStreamEvent struct {
37
+ Type string `json:"type"`
38
+ ClusterID string `json:"clusterId"`
39
+ ObservedAt string `json:"observedAt"`
40
+ Source string `json:"source,omitempty"`
41
+ Resource *ResourceRef `json:"resource,omitempty"`
42
+ ResourceVersion string `json:"resourceVersion,omitempty"`
43
+ CacheStatus string `json:"cacheStatus,omitempty"`
44
+ Message string `json:"message,omitempty"`
45
+ ResyncRequired bool `json:"resyncRequired,omitempty"`
46
+ }
47
+
48
+ type ResourceGraphNode struct {
49
+ ID string `json:"id"`
50
+ Resource ResourceRef `json:"resource"`
51
+ Status string `json:"status,omitempty"`
52
+ Health string `json:"health,omitempty"`
53
+ }
54
+
55
+ type ResourceGraphEdge struct {
56
+ ID string `json:"id"`
57
+ SourceID string `json:"sourceId"`
58
+ TargetID string `json:"targetId"`
59
+ Relation string `json:"relation"`
60
+ }
61
+
62
+ type ResourceEvidence struct {
63
+ ID string `json:"id"`
64
+ Type string `json:"type"`
65
+ Severity string `json:"severity"`
66
+ Summary string `json:"summary"`
67
+ ObservedAt string `json:"observedAt"`
68
+ ResourceID string `json:"resourceId,omitempty"`
69
+ SourceRef string `json:"sourceRef,omitempty"`
70
+ }
71
+
72
+ type ResourceGraph struct {
73
+ ClusterID string `json:"clusterId"`
74
+ Namespace string `json:"namespace,omitempty"`
75
+ GeneratedAt string `json:"generatedAt"`
76
+ RootID string `json:"rootId,omitempty"`
77
+ Nodes []ResourceGraphNode `json:"nodes"`
78
+ Edges []ResourceGraphEdge `json:"edges"`
79
+ Evidence []ResourceEvidence `json:"evidence"`
80
+ Warnings []string `json:"warnings"`
81
+ }
82
+
83
+ type ResourceSearchInput struct {
84
+ Query string
85
+ Namespace string
86
+ Kinds []string
87
+ Limit int
88
+ }
89
+
9
90
  type NamespaceView struct {
10
91
  Name string `json:"name"`
11
92
  Status string `json:"status"`
@@ -255,6 +336,98 @@ type ResourceYAMLView struct {
255
336
  Content string `json:"content"`
256
337
  }
257
338
 
339
+ type ResourceUpdatePlanRequest struct {
340
+ Namespace string `json:"namespace,omitempty"`
341
+ Kind string `json:"kind"`
342
+ Name string `json:"name"`
343
+ Content string `json:"content"`
344
+ }
345
+
346
+ type ManagedFieldOwner struct {
347
+ Manager string `json:"manager"`
348
+ Operation string `json:"operation"`
349
+ APIVersion string `json:"apiVersion"`
350
+ Time string `json:"time,omitempty"`
351
+ Fields []string `json:"fields"`
352
+ }
353
+
354
+ type FieldConflict struct {
355
+ Field string `json:"field"`
356
+ Manager string `json:"manager,omitempty"`
357
+ Message string `json:"message"`
358
+ }
359
+
360
+ type ResourceUpdateAnalysis struct {
361
+ FieldManager string `json:"fieldManager"`
362
+ ChangedFields []string `json:"changedFields"`
363
+ Owners []ManagedFieldOwner `json:"owners"`
364
+ Conflicts []FieldConflict `json:"conflicts"`
365
+ }
366
+
367
+ type SecuritySeverityCounts struct {
368
+ Critical int64 `json:"critical"`
369
+ High int64 `json:"high"`
370
+ Medium int64 `json:"medium"`
371
+ Low int64 `json:"low"`
372
+ Unknown int64 `json:"unknown"`
373
+ }
374
+
375
+ type SecurityFinding struct {
376
+ ID string `json:"id"`
377
+ Category string `json:"category"`
378
+ Severity string `json:"severity"`
379
+ Title string `json:"title"`
380
+ Status string `json:"status"`
381
+ ControlID string `json:"controlId,omitempty"`
382
+ Message string `json:"message,omitempty"`
383
+ Remediation string `json:"remediation,omitempty"`
384
+ ObservedAt string `json:"observedAt,omitempty"`
385
+ Resource *ResourceRef `json:"resource,omitempty"`
386
+ }
387
+
388
+ type SecurityPosture struct {
389
+ ClusterID string `json:"clusterId"`
390
+ Provider string `json:"provider"`
391
+ Status string `json:"status"`
392
+ GeneratedAt string `json:"generatedAt"`
393
+ Message string `json:"message,omitempty"`
394
+ Counts SecuritySeverityCounts `json:"counts"`
395
+ Findings []SecurityFinding `json:"findings"`
396
+ Warnings []string `json:"warnings"`
397
+ }
398
+
399
+ type AccessReviewSubject struct {
400
+ Kind string `json:"kind"`
401
+ Name string `json:"name"`
402
+ Namespace string `json:"namespace,omitempty"`
403
+ }
404
+
405
+ type AccessReviewCheck struct {
406
+ Verb string `json:"verb"`
407
+ Group string `json:"group,omitempty"`
408
+ Resource string `json:"resource"`
409
+ Namespace string `json:"namespace,omitempty"`
410
+ Name string `json:"name,omitempty"`
411
+ }
412
+
413
+ type SubjectAccessReviewInput struct {
414
+ Subject AccessReviewSubject `json:"subject"`
415
+ Checks []AccessReviewCheck `json:"checks"`
416
+ }
417
+
418
+ type AccessReviewDecision struct {
419
+ Check AccessReviewCheck `json:"check"`
420
+ Allowed bool `json:"allowed"`
421
+ Denied bool `json:"denied"`
422
+ Reason string `json:"reason,omitempty"`
423
+ EvaluationError string `json:"evaluationError,omitempty"`
424
+ }
425
+
426
+ type SubjectAccessReviewResult struct {
427
+ Subject AccessReviewSubject `json:"subject"`
428
+ Decisions []AccessReviewDecision `json:"decisions"`
429
+ }
430
+
258
431
  type DeploymentView struct {
259
432
  Name string `json:"name"`
260
433
  Namespace string `json:"namespace"`
@@ -438,12 +611,21 @@ type CronJobDetailView struct {
438
611
  AllowedActions []string `json:"allowedActions,omitempty"`
439
612
  }
440
613
 
614
+ type ServicePortView struct {
615
+ Name string `json:"name,omitempty"`
616
+ Protocol string `json:"protocol"`
617
+ TargetPort string `json:"targetPort"`
618
+ Port int32 `json:"port"`
619
+ NodePort int32 `json:"nodePort,omitempty"`
620
+ }
621
+
441
622
  type ServiceView struct {
442
623
  Name string `json:"name"`
443
624
  Namespace string `json:"namespace"`
444
625
  Type string `json:"type"`
445
626
  ClusterIP string `json:"clusterIp,omitempty"`
446
627
  Ports []string `json:"ports,omitempty"`
628
+ PortMappings []ServicePortView `json:"portMappings,omitempty"`
447
629
  Selector map[string]string `json:"selector,omitempty"`
448
630
  AgeSeconds int64 `json:"ageSeconds"`
449
631
  AllowedActions []string `json:"allowedActions,omitempty"`
@@ -465,6 +647,7 @@ type ServiceDetailView struct {
465
647
  Type string `json:"type"`
466
648
  ClusterIP string `json:"clusterIp,omitempty"`
467
649
  Ports []string `json:"ports,omitempty"`
650
+ PortMappings []ServicePortView `json:"portMappings,omitempty"`
468
651
  Selector map[string]string `json:"selector,omitempty"`
469
652
  Labels map[string]string `json:"labels,omitempty"`
470
653
  Annotations map[string]string `json:"annotations,omitempty"`
@@ -976,6 +1159,20 @@ type HelmReleaseHistoryView struct {
976
1159
  AllowedActions []string `json:"allowedActions,omitempty"`
977
1160
  }
978
1161
 
1162
+ type HelmReleaseManifestView struct {
1163
+ Name string `json:"name"`
1164
+ Namespace string `json:"namespace"`
1165
+ Revision string `json:"revision"`
1166
+ Content string `json:"content"`
1167
+ Digest string `json:"digest"`
1168
+ }
1169
+
1170
+ type HelmReleaseRollbackInput struct {
1171
+ Revision int `json:"revision"`
1172
+ Wait bool `json:"wait"`
1173
+ TimeoutSeconds int `json:"timeoutSeconds"`
1174
+ }
1175
+
979
1176
  type HelmValuesView struct {
980
1177
  Name string `json:"name"`
981
1178
  Namespace string `json:"namespace"`