@opensoha/contracts 0.1.5 → 0.1.7

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 (74) hide show
  1. package/COMPATIBILITY.md +13 -0
  2. package/README.md +6 -0
  3. package/auth/catalog_generated.go +17 -0
  4. package/auth/catalog_test.go +53 -0
  5. package/auth/permission-catalog.json +11097 -0
  6. package/auth/permission-catalog.schema.json +74 -0
  7. package/capabilities/cluster-capability-matrix.schema.json +30 -1
  8. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  9. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  10. package/examples/gateway-manifest/minimal.json +6 -6
  11. package/examples/openapi/agent-run-tool-call-request.json +1 -1
  12. package/examples/openapi/agent-tool-call-result-envelope.json +1 -1
  13. package/examples/openapi/gateway-manifest-envelope.json +4 -4
  14. package/examples/openapi/tool-invocation-request.json +1 -1
  15. package/examples/openapi/tool-invocation-result-envelope.json +1 -1
  16. package/examples/plugin-manifest/skill-pack.json +2 -2
  17. package/examples/skill-manifest/k8s-sre.json +2 -2
  18. package/examples/token-claims/service-account.json +1 -1
  19. package/fixtures/json-schema/cluster-capability-matrix/valid/runtime-parity.json +3 -0
  20. package/fixtures/json-schema/gateway-manifest/valid/minimal.json +4 -4
  21. package/fixtures/json-schema/permission-catalog/invalid/missing-action.json +18 -0
  22. package/fixtures/json-schema/permission-catalog/valid/minimal.json +19 -0
  23. package/fixtures/json-schema/skill-manifest/valid/minimal.json +2 -2
  24. package/fixtures/json-schema/token-claims/valid/service-account.json +1 -1
  25. package/fixtures/openapi/AIGatewayManifestEnvelope/valid/minimal.json +1 -1
  26. package/fixtures/openapi/AccessRoleInput/invalid/missing-permissions.json +4 -0
  27. package/fixtures/openapi/AccessRoleInput/valid/granular-vm-operator.json +10 -0
  28. package/fixtures/openapi/AgentInstallationEnvelope/invalid/missing-command.json +7 -0
  29. package/fixtures/openapi/AgentInstallationEnvelope/valid/minimal.json +8 -0
  30. package/fixtures/openapi/ApplicationInput/invalid/missing-key.json +4 -0
  31. package/fixtures/openapi/ApplicationInput/valid/minimal.json +5 -0
  32. package/fixtures/openapi/AuthorizationDecision/invalid/missing-reason.json +7 -0
  33. package/fixtures/openapi/AuthorizationDecision/valid/deny-vm-delete.json +16 -0
  34. package/fixtures/openapi/HelmReleaseImportRequest/invalid/empty-releases.json +10 -0
  35. package/fixtures/openapi/HelmReleaseImportRequest/valid/managed.json +14 -0
  36. package/fixtures/openapi/HelmReleaseImportResultEnvelope/invalid/missing-mode.json +20 -0
  37. package/fixtures/openapi/HelmReleaseImportResultEnvelope/valid/created.json +35 -0
  38. package/fixtures/openapi/KubernetesImportCandidateListEnvelope/invalid/unknown-kind.json +14 -0
  39. package/fixtures/openapi/KubernetesImportCandidateListEnvelope/valid/grouped.json +31 -0
  40. package/fixtures/openapi/KubernetesServiceImportRequest/invalid/unsupported-mode.json +15 -0
  41. package/fixtures/openapi/KubernetesServiceImportRequest/valid/managed.json +15 -0
  42. package/fixtures/openapi/KubernetesServiceImportRequest/valid/observe-only.json +15 -0
  43. package/fixtures/openapi/KubernetesServiceImportResultEnvelope/invalid/missing-mode.json +20 -0
  44. package/fixtures/openapi/KubernetesServiceImportResultEnvelope/valid/created.json +37 -0
  45. package/fixtures/openapi/MCPCapabilityListEnvelope/invalid/missing-scopes.json +1 -1
  46. package/fixtures/openapi/MCPCapabilityListEnvelope/valid/minimal.json +1 -1
  47. package/fixtures/openapi/ObservabilityDashboardImportResultEnvelope/invalid/missing-dashboard.json +7 -0
  48. package/fixtures/openapi/ObservabilityDashboardImportResultEnvelope/valid/imported.json +36 -0
  49. package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/invalid/missing-data-source.json +3 -0
  50. package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/invalid/missing-json.json +3 -0
  51. package/fixtures/openapi/ObservabilityGrafanaDashboardImportInput/valid/classic.json +4 -0
  52. package/fixtures/openapi/ObservabilityMetricDataSourceListEnvelope/invalid/missing-name.json +7 -0
  53. package/fixtures/openapi/ObservabilityMetricDataSourceListEnvelope/valid/list.json +8 -0
  54. package/fixtures/openapi/PermissionCatalogEnvelope/invalid/invalid-hash.json +8 -0
  55. package/fixtures/openapi/PermissionCatalogEnvelope/valid/minimal.json +22 -0
  56. package/fixtures/openapi/PersonalAccessTokenInput/invalid/extra-field.json +1 -1
  57. package/fixtures/openapi/PersonalAccessTokenInput/valid/create.json +1 -1
  58. package/fixtures/openapi/RegistryConnectionInput/invalid/missing-type.json +4 -0
  59. package/fixtures/openapi/RegistryConnectionInput/valid/harbor.json +9 -0
  60. package/fixtures/openapi/RegistryConnectionListEnvelope/invalid/exposed-secret.json +18 -0
  61. package/fixtures/openapi/RegistryConnectionListEnvelope/valid/configured.json +19 -0
  62. package/fixtures/openapi/SoftwarePackage/invalid/unsafe-software-package.json +15 -0
  63. package/fixtures/openapi/SoftwarePackage/valid/software-package.json +17 -0
  64. package/fixtures/openapi/SoftwarePackageURLImportRequest/invalid/software-package-url-import-request.json +9 -0
  65. package/fixtures/openapi/SoftwarePackageURLImportRequest/valid/software-package-url-import-request.json +12 -0
  66. package/fixtures/openapi/SoftwareStorage/invalid/software-storage.json +6 -0
  67. package/fixtures/openapi/SoftwareStorage/valid/software-storage.json +22 -0
  68. package/gen/go/sohaapi/client.go +1 -1
  69. package/gen/go/sohaapi/types.go +906 -3
  70. package/gen/ts/sohaapi/index.ts +1603 -71
  71. package/openapi/soha-api.json +2910 -3
  72. package/openapi/soha-api.yaml +1759 -165
  73. package/openapi/spec_generated.go +3 -3
  74. package/package.json +7 -3
@@ -0,0 +1,15 @@
1
+ {
2
+ "clusterId": "cluster-prod",
3
+ "namespace": "payments",
4
+ "applicationKey": "payments",
5
+ "applicationName": "Payments",
6
+ "environmentKey": "prod",
7
+ "environmentName": "Production",
8
+ "ownershipMode": "observe_only",
9
+ "workloads": [
10
+ {
11
+ "workloadKind": "Deployment",
12
+ "workloadName": "payments-api"
13
+ }
14
+ ]
15
+ }
@@ -0,0 +1,20 @@
1
+ {
2
+ "data": {
3
+ "application": {
4
+ "id": "app-1",
5
+ "key": "payments",
6
+ "name": "Payments",
7
+ "created": false
8
+ },
9
+ "environment": {
10
+ "id": "env-1",
11
+ "key": "prod",
12
+ "name": "Production",
13
+ "created": false
14
+ },
15
+ "applicationEnvironmentId": "app-env-1",
16
+ "applicationEnvironmentCreated": false,
17
+ "services": [],
18
+ "targets": []
19
+ }
20
+ }
@@ -0,0 +1,37 @@
1
+ {
2
+ "data": {
3
+ "application": {
4
+ "id": "app-1",
5
+ "key": "payments",
6
+ "name": "Payments",
7
+ "created": true
8
+ },
9
+ "environment": {
10
+ "id": "env-1",
11
+ "key": "prod",
12
+ "name": "Production",
13
+ "created": false
14
+ },
15
+ "applicationEnvironmentId": "app-env-1",
16
+ "applicationEnvironmentCreated": true,
17
+ "ownershipMode": "observe_only",
18
+ "services": [
19
+ {
20
+ "id": "service-1",
21
+ "key": "k8s-deployment-payments-api",
22
+ "name": "payments-api",
23
+ "workloadKind": "Deployment",
24
+ "workloadName": "payments-api",
25
+ "created": true
26
+ }
27
+ ],
28
+ "targets": [
29
+ {
30
+ "id": "target-1",
31
+ "workloadKind": "Deployment",
32
+ "workloadName": "payments-api",
33
+ "created": true
34
+ }
35
+ ]
36
+ }
37
+ }
@@ -2,7 +2,7 @@
2
2
  "items": [
3
3
  {
4
4
  "adapterID": "builtin",
5
- "name": "k8s.list_pods",
5
+ "name": "k8s.pods.list",
6
6
  "description": "List pods."
7
7
  }
8
8
  ]
@@ -2,7 +2,7 @@
2
2
  "items": [
3
3
  {
4
4
  "adapterID": "builtin",
5
- "name": "k8s.list_pods",
5
+ "name": "k8s.pods.list",
6
6
  "description": "List pods.",
7
7
  "scopes": ["k8s:read"]
8
8
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "data": {
3
+ "warnings": [],
4
+ "importedPanelCount": 1,
5
+ "skippedPanelCount": 0
6
+ }
7
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "data": {
3
+ "dashboard": {
4
+ "id": "dashboard:8b9f35ba-6870-4f34-b45f-6f601d8b8c35",
5
+ "name": "Kubernetes Overview",
6
+ "source": "grafana",
7
+ "sourceSchemaVersion": 39,
8
+ "tags": ["kubernetes"],
9
+ "panels": [
10
+ {
11
+ "id": "1",
12
+ "title": "CPU",
13
+ "type": "timeseries",
14
+ "layout": { "x": 0, "y": 0, "w": 12, "h": 8 },
15
+ "targets": [
16
+ {
17
+ "refId": "A",
18
+ "expression": "sum(rate(container_cpu_usage_seconds_total[5m]))"
19
+ }
20
+ ],
21
+ "queryable": true
22
+ }
23
+ ],
24
+ "createdAt": "2026-08-08T08:00:00Z",
25
+ "updatedAt": "2026-08-08T08:00:00Z"
26
+ },
27
+ "warnings": [
28
+ {
29
+ "code": "datasource_rebound",
30
+ "message": "Grafana data-source references will use the default enabled Prometheus source."
31
+ }
32
+ ],
33
+ "importedPanelCount": 1,
34
+ "skippedPanelCount": 0
35
+ }
36
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "json": "{\"title\":\"Kubernetes Overview\",\"panels\":[]}"
3
+ }
@@ -0,0 +1,3 @@
1
+ {
2
+ "dataSourceId": "prometheus-main"
3
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "json": "{\"title\":\"Kubernetes Overview\",\"schemaVersion\":39,\"tags\":[\"kubernetes\"],\"panels\":[{\"id\":1,\"title\":\"CPU\",\"type\":\"timeseries\",\"gridPos\":{\"x\":0,\"y\":0,\"w\":12,\"h\":8},\"targets\":[{\"refId\":\"A\",\"expr\":\"sum(rate(container_cpu_usage_seconds_total[5m]))\"}]}]}",
3
+ "dataSourceId": "prometheus-main"
4
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "prometheus-main"
5
+ }
6
+ ]
7
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "prometheus-main",
5
+ "name": "Production Prometheus"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "data": {
3
+ "schemaVersion": "authorization.opensoha.io/v1",
4
+ "catalogVersion": "1.0.0",
5
+ "contentHash": "not-a-hash",
6
+ "permissions": []
7
+ }
8
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "data": {
3
+ "schemaVersion": "authorization.opensoha.io/v1",
4
+ "catalogVersion": "1.0.0",
5
+ "contentHash": "sha256:0000000000000000000000000000000000000000000000000000000000000000",
6
+ "permissions": [
7
+ {
8
+ "key": "virtualization.vms.resize",
9
+ "domain": "virtualization",
10
+ "resource": "vms",
11
+ "action": "resize",
12
+ "displayName": "Resize virtual machines",
13
+ "riskLevel": "mutate",
14
+ "scopeKinds": ["workspace", "resource"],
15
+ "approvalPolicy": "never",
16
+ "status": "active",
17
+ "assignable": true,
18
+ "legacyAliases": ["virtualization.vms.manage"]
19
+ }
20
+ ]
21
+ }
22
+ }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "CLI token",
3
3
  "scopes": ["ai:read"],
4
- "permissionKeys": ["ai.gateway.tools.read"],
4
+ "permissionKeys": ["ai.gateway.view"],
5
5
  "plainTextValue": "should-not-be-accepted"
6
6
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "CLI token",
3
3
  "scopes": ["ai:read"],
4
- "permissionKeys": ["ai.gateway.tools.read"],
4
+ "permissionKeys": ["ai.gateway.view"],
5
5
  "metadata": {
6
6
  "createdFrom": "fixture"
7
7
  },
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "Harbor Production",
3
+ "endpoint": "https://harbor.example.com"
4
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "name": "Harbor Production",
3
+ "registryType": "harbor",
4
+ "endpoint": "https://harbor.example.com",
5
+ "namespace": "delivery",
6
+ "username": "robot$delivery",
7
+ "secret": "fixture-only-token",
8
+ "insecure": false
9
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "registry-harbor-production",
5
+ "name": "Harbor Production",
6
+ "registryType": "harbor",
7
+ "endpoint": "https://harbor.example.com",
8
+ "secret": "must-not-be-returned",
9
+ "insecure": false,
10
+ "metadata": {
11
+ "secretConfigured": true,
12
+ "secretStorage": "encrypted"
13
+ },
14
+ "createdAt": "2026-08-08T08:00:00Z",
15
+ "updatedAt": "2026-08-08T08:00:00Z"
16
+ }
17
+ ]
18
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "items": [
3
+ {
4
+ "id": "registry-harbor-production",
5
+ "name": "Harbor Production",
6
+ "registryType": "harbor",
7
+ "endpoint": "https://harbor.example.com",
8
+ "namespace": "delivery",
9
+ "username": "robot$delivery",
10
+ "insecure": false,
11
+ "metadata": {
12
+ "secretConfigured": true,
13
+ "secretStorage": "encrypted"
14
+ },
15
+ "createdAt": "2026-08-08T08:00:00Z",
16
+ "updatedAt": "2026-08-08T08:00:00Z"
17
+ }
18
+ ]
19
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "id": "pkg-01j9z3m4w8n2",
3
+ "softwareId": "../soha-cli",
4
+ "name": "Soha CLI",
5
+ "publisher": "OpenSoha",
6
+ "version": "0.1.0",
7
+ "platform": "darwin",
8
+ "arch": "arm64",
9
+ "fileName": "../soha-cli.pkg",
10
+ "sizeBytes": 0,
11
+ "sha256": "invalid",
12
+ "downloadPath": "https://untrusted.example.com/installer",
13
+ "createdAt": "2026-08-08T00:00:00Z",
14
+ "updatedAt": "2026-08-08T00:00:00Z"
15
+ }
@@ -0,0 +1,17 @@
1
+ {
2
+ "id": "pkg-01j9z3m4w8n2",
3
+ "softwareId": "soha-cli",
4
+ "name": "Soha CLI",
5
+ "description": "Command-line client for Soha.",
6
+ "publisher": "OpenSoha",
7
+ "category": "Developer Tools",
8
+ "version": "0.1.0",
9
+ "platform": "darwin",
10
+ "arch": "arm64",
11
+ "fileName": "soha-cli-0.1.0-darwin-arm64.pkg",
12
+ "sizeBytes": 1048576,
13
+ "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
14
+ "downloadPath": "/api/v1/software/packages/pkg-01j9z3m4w8n2/download",
15
+ "createdAt": "2026-08-08T00:00:00Z",
16
+ "updatedAt": "2026-08-08T00:00:00Z"
17
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "softwareId": "soha-desktop",
3
+ "name": "Soha Desktop",
4
+ "publisher": "OpenSoha",
5
+ "version": "0.2.0",
6
+ "platform": "darwin",
7
+ "arch": "arm64",
8
+ "url": "http://127.0.0.1/private.dmg"
9
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "softwareId": "soha-desktop",
3
+ "name": "Soha Desktop",
4
+ "description": "Desktop client for Soha.",
5
+ "publisher": "OpenSoha",
6
+ "category": "Developer Tools",
7
+ "version": "0.2.0",
8
+ "platform": "darwin",
9
+ "arch": "arm64",
10
+ "url": "https://downloads.opensoha.dev/soha-desktop-0.2.0-arm64.dmg",
11
+ "fileName": "soha-desktop-0.2.0-arm64.dmg"
12
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "backend": "filesystem",
3
+ "objectCount": -1,
4
+ "totalBytes": -1,
5
+ "items": []
6
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "backend": "filesystem",
3
+ "objectCount": 1,
4
+ "totalBytes": 1048576,
5
+ "items": [
6
+ {
7
+ "id": "pkg-01j9z3m4w8n2",
8
+ "softwareId": "soha-cli",
9
+ "name": "Soha CLI",
10
+ "publisher": "OpenSoha",
11
+ "version": "0.1.0",
12
+ "platform": "darwin",
13
+ "arch": "arm64",
14
+ "fileName": "soha-cli-0.1.0-darwin-arm64.pkg",
15
+ "sizeBytes": 1048576,
16
+ "sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
17
+ "downloadPath": "/api/v1/software/packages/pkg-01j9z3m4w8n2/download",
18
+ "createdAt": "2026-08-08T00:00:00Z",
19
+ "updatedAt": "2026-08-08T00:00:00Z"
20
+ }
21
+ ]
22
+ }
@@ -14,7 +14,7 @@ import (
14
14
  "time"
15
15
  )
16
16
 
17
- const defaultUserAgent = "opensoha-contracts/0.1.5"
17
+ const defaultUserAgent = "opensoha-contracts/0.1.7"
18
18
 
19
19
  type Client struct {
20
20
  BaseURL string