@opensoha/contracts 0.1.11 → 0.1.13

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 (22) hide show
  1. package/compat/json-schema-ecosystem-0.1.0.json +1 -1
  2. package/compat/openapi-loose-boundaries-0.1.0.json +1 -1
  3. package/fixtures/openapi/DockerHostAgentCredentialsEnvelope/invalid/missing-runtime-token.json +9 -0
  4. package/fixtures/openapi/DockerHostAgentCredentialsEnvelope/valid/credentials.json +10 -0
  5. package/fixtures/openapi/DockerHostAgentEnrollmentRequest/invalid/short-token.json +4 -0
  6. package/fixtures/openapi/DockerHostAgentEnrollmentRequest/valid/enrollment.json +4 -0
  7. package/fixtures/openapi/KubernetesWorkloadSnapshotEnvelope/invalid/missing-content.json +8 -0
  8. package/fixtures/openapi/KubernetesWorkloadSnapshotEnvelope/valid/job.json +14 -0
  9. package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/cronjob-missing-schedule.json +8 -0
  10. package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/invalid/workload-cronjob-missing-schedule.json +8 -0
  11. package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/cronjob.json +9 -0
  12. package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/job-zero-values.json +11 -0
  13. package/fixtures/openapi/KubernetesWorkloadSnapshotRequest/valid/workload-cronjob.json +9 -0
  14. package/gen/go/sohaapi/client.go +10 -1
  15. package/gen/go/sohaapi/client_test.go +29 -0
  16. package/gen/go/sohaapi/types.go +156 -0
  17. package/gen/go/sohaapi/types_test.go +17 -0
  18. package/gen/ts/sohaapi/index.ts +182 -0
  19. package/openapi/soha-api.json +413 -2
  20. package/openapi/soha-api.yaml +245 -2
  21. package/openapi/spec_generated.go +3 -3
  22. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.11",
2
+ "version": "0.1.13",
3
3
  "schemas": {
4
4
  "plugins/plugin-manifest.schema.json": {
5
5
  "rootRequired": ["id", "name", "publisher", "type", "version"],
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.1.11",
2
+ "version": "0.1.13",
3
3
  "generatedFrom": "openapi/soha-api.yaml",
4
4
  "entries": [
5
5
  {
@@ -0,0 +1,9 @@
1
+ {
2
+ "data": {
3
+ "hostId": "runtime-host-01",
4
+ "operationId": "host-sync-01",
5
+ "agentId": "docker-agent-01",
6
+ "agentBearerToken": "agent-secret-012345678901234567890",
7
+ "issuedAt": "2026-08-14T10:15:00Z"
8
+ }
9
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "data": {
3
+ "hostId": "runtime-host-01",
4
+ "operationId": "host-sync-01",
5
+ "agentId": "docker-agent-01",
6
+ "agentBearerToken": "agent-secret-012345678901234567890",
7
+ "runtimeBearerToken": "runtime-secret-012345678901234567",
8
+ "issuedAt": "2026-08-14T10:15:00Z"
9
+ }
10
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "agentId": "docker-agent-01",
3
+ "enrollmentToken": "too-short"
4
+ }
@@ -0,0 +1,4 @@
1
+ {
2
+ "agentId": "docker-agent-01",
3
+ "enrollmentToken": "enrollment-secret-0123456789012345"
4
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "data": {
3
+ "sourceUid": "a17fd246-9f85-4a1f-8bb0-c6c1f844b17e",
4
+ "selectedContainer": "worker",
5
+ "containers": [],
6
+ "warnings": []
7
+ }
8
+ }
@@ -0,0 +1,14 @@
1
+ {
2
+ "data": {
3
+ "content": "apiVersion: batch/v1\nkind: Job\nmetadata:\n name: report\n",
4
+ "sourceUid": "a17fd246-9f85-4a1f-8bb0-c6c1f844b17e",
5
+ "selectedContainer": "worker",
6
+ "containers": [
7
+ {
8
+ "name": "worker",
9
+ "image": "registry.example.com/report:2026.08"
10
+ }
11
+ ],
12
+ "warnings": []
13
+ }
14
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "namespace": "default",
3
+ "sourceKind": "Deployment",
4
+ "sourceName": "reports",
5
+ "targetKind": "CronJob",
6
+ "targetName": "reports-schedule",
7
+ "restartPolicy": "Never"
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "namespace": "default",
3
+ "sourceKind": "StatefulSet",
4
+ "sourceName": "indexer",
5
+ "targetKind": "WorkloadCronJob",
6
+ "targetName": "indexer-schedule",
7
+ "restartPolicy": "OnFailure"
8
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "namespace": "default",
3
+ "sourceKind": "Deployment",
4
+ "sourceName": "reports",
5
+ "targetKind": "CronJob",
6
+ "targetName": "reports-schedule",
7
+ "restartPolicy": "Never",
8
+ "schedule": "0 * * * *"
9
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "namespace": "default",
3
+ "sourceKind": "DaemonSet",
4
+ "sourceName": "collector",
5
+ "targetKind": "Job",
6
+ "targetName": "collector-once",
7
+ "restartPolicy": "Never",
8
+ "parallelism": 0,
9
+ "completions": 0,
10
+ "activeDeadlineSeconds": 0
11
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "namespace": "default",
3
+ "sourceKind": "StatefulSet",
4
+ "sourceName": "indexer",
5
+ "targetKind": "WorkloadCronJob",
6
+ "targetName": "indexer-schedule",
7
+ "restartPolicy": "OnFailure",
8
+ "schedule": "*/15 * * * *"
9
+ }
@@ -14,7 +14,7 @@ import (
14
14
  "time"
15
15
  )
16
16
 
17
- const defaultUserAgent = "opensoha-contracts/0.1.11"
17
+ const defaultUserAgent = "opensoha-contracts/0.1.13"
18
18
 
19
19
  type Client struct {
20
20
  BaseURL string
@@ -404,6 +404,15 @@ func (c *Client) ClaimDockerOperation(ctx context.Context, req DockerOperationCl
404
404
  return out.Data, nil
405
405
  }
406
406
 
407
+ func (c *Client) ExchangeDockerHostAgentEnrollment(ctx context.Context, operationID string, req DockerHostAgentEnrollmentRequest) (DockerHostAgentCredentials, error) {
408
+ var out DockerHostAgentCredentialsEnvelope
409
+ path := "/docker/agent-installations/" + url.PathEscape(strings.TrimSpace(operationID)) + "/enroll"
410
+ if err := c.doJSON(ctx, http.MethodPost, path, false, req, &out); err != nil {
411
+ return DockerHostAgentCredentials{}, err
412
+ }
413
+ return out.Data, nil
414
+ }
415
+
407
416
  func (c *Client) GetDockerOperationRunnerStatus(ctx context.Context, operationID string) (DockerOperation, error) {
408
417
  var out DockerOperationEnvelope
409
418
  path := "/docker/operations/" + url.PathEscape(strings.TrimSpace(operationID)) + "/runner-status"
@@ -143,6 +143,35 @@ func TestRunnerClaimClientsAcceptNoContent(t *testing.T) {
143
143
  }
144
144
  }
145
145
 
146
+ func TestExchangeDockerHostAgentEnrollmentIsPublicAndReturnsCredentials(t *testing.T) {
147
+ issuedAt := time.Now().UTC().Truncate(time.Second)
148
+ client := newTestClient(t, func(w http.ResponseWriter, r *http.Request) {
149
+ assertPublicRequest(t, r, http.MethodPost, "/api/v1/docker/agent-installations/operation-1/enroll")
150
+ request := decodeJSONRequestBody[DockerHostAgentEnrollmentRequest](t, r)
151
+ if request.AgentID != "host-1" || request.EnrollmentToken != "enrollment-secret-0123456789012345" {
152
+ t.Fatalf("enrollment request = %#v", request)
153
+ }
154
+ w.Header().Set("Cache-Control", "no-store")
155
+ w.WriteHeader(http.StatusCreated)
156
+ writeJSON(t, w, map[string]any{"data": map[string]any{
157
+ "hostId": "host-1", "operationId": "operation-1", "agentId": "host-1",
158
+ "agentBearerToken": "agent-secret-012345678901234567890",
159
+ "runtimeBearerToken": "runtime-secret-012345678901234567",
160
+ "issuedAt": issuedAt,
161
+ }})
162
+ })
163
+
164
+ credentials, err := client.ExchangeDockerHostAgentEnrollment(context.Background(), "operation-1", DockerHostAgentEnrollmentRequest{
165
+ AgentID: "host-1", EnrollmentToken: "enrollment-secret-0123456789012345",
166
+ })
167
+ if err != nil {
168
+ t.Fatalf("exchange enrollment: %v", err)
169
+ }
170
+ if credentials.HostID != "host-1" || credentials.OperationID != "operation-1" || credentials.RuntimeBearerToken == "" || credentials.AgentBearerToken == "" {
171
+ t.Fatalf("credentials = %#v", credentials)
172
+ }
173
+ }
174
+
146
175
  func TestRedeemSecretLeaseSendsRunnerBindingHeaders(t *testing.T) {
147
176
  client := newTestClient(t, func(w http.ResponseWriter, r *http.Request) {
148
177
  assertCommonRequest(t, r, http.MethodPost, "/api/v1/runner/secret-leases/lease%2Fone/redeem")
@@ -2713,6 +2713,66 @@ func (e KubernetesWorkloadImportInputWorkloadKind) Valid() bool {
2713
2713
  }
2714
2714
  }
2715
2715
 
2716
+ // Defines values for KubernetesWorkloadSnapshotRestartPolicy.
2717
+ const (
2718
+ KubernetesWorkloadSnapshotRestartPolicyNever KubernetesWorkloadSnapshotRestartPolicy = "Never"
2719
+ KubernetesWorkloadSnapshotRestartPolicyOnFailure KubernetesWorkloadSnapshotRestartPolicy = "OnFailure"
2720
+ )
2721
+
2722
+ // Valid indicates whether the value is a known member of the KubernetesWorkloadSnapshotRestartPolicy enum.
2723
+ func (e KubernetesWorkloadSnapshotRestartPolicy) Valid() bool {
2724
+ switch e {
2725
+ case KubernetesWorkloadSnapshotRestartPolicyNever:
2726
+ return true
2727
+ case KubernetesWorkloadSnapshotRestartPolicyOnFailure:
2728
+ return true
2729
+ default:
2730
+ return false
2731
+ }
2732
+ }
2733
+
2734
+ // Defines values for KubernetesWorkloadSnapshotSourceKind.
2735
+ const (
2736
+ KubernetesWorkloadSnapshotSourceKindDaemonSet KubernetesWorkloadSnapshotSourceKind = "DaemonSet"
2737
+ KubernetesWorkloadSnapshotSourceKindDeployment KubernetesWorkloadSnapshotSourceKind = "Deployment"
2738
+ KubernetesWorkloadSnapshotSourceKindStatefulSet KubernetesWorkloadSnapshotSourceKind = "StatefulSet"
2739
+ )
2740
+
2741
+ // Valid indicates whether the value is a known member of the KubernetesWorkloadSnapshotSourceKind enum.
2742
+ func (e KubernetesWorkloadSnapshotSourceKind) Valid() bool {
2743
+ switch e {
2744
+ case KubernetesWorkloadSnapshotSourceKindDaemonSet:
2745
+ return true
2746
+ case KubernetesWorkloadSnapshotSourceKindDeployment:
2747
+ return true
2748
+ case KubernetesWorkloadSnapshotSourceKindStatefulSet:
2749
+ return true
2750
+ default:
2751
+ return false
2752
+ }
2753
+ }
2754
+
2755
+ // Defines values for KubernetesWorkloadSnapshotTargetKind.
2756
+ const (
2757
+ KubernetesWorkloadSnapshotTargetKindCronJob KubernetesWorkloadSnapshotTargetKind = "CronJob"
2758
+ KubernetesWorkloadSnapshotTargetKindJob KubernetesWorkloadSnapshotTargetKind = "Job"
2759
+ KubernetesWorkloadSnapshotTargetKindWorkloadCronJob KubernetesWorkloadSnapshotTargetKind = "WorkloadCronJob"
2760
+ )
2761
+
2762
+ // Valid indicates whether the value is a known member of the KubernetesWorkloadSnapshotTargetKind enum.
2763
+ func (e KubernetesWorkloadSnapshotTargetKind) Valid() bool {
2764
+ switch e {
2765
+ case KubernetesWorkloadSnapshotTargetKindCronJob:
2766
+ return true
2767
+ case KubernetesWorkloadSnapshotTargetKindJob:
2768
+ return true
2769
+ case KubernetesWorkloadSnapshotTargetKindWorkloadCronJob:
2770
+ return true
2771
+ default:
2772
+ return false
2773
+ }
2774
+ }
2775
+
2716
2776
  // Defines values for LLMCallLogCacheStatus.
2717
2777
  const (
2718
2778
  LLMCallLogCacheStatusBypass LLMCallLogCacheStatus = "bypass"
@@ -9758,6 +9818,32 @@ type DockerGitBuildInput struct {
9758
9818
  RepositoryURL string `json:"repositoryUrl"`
9759
9819
  }
9760
9820
 
9821
+ // DockerHostAgentCredentials defines model for DockerHostAgentCredentials.
9822
+ type DockerHostAgentCredentials struct {
9823
+ // AgentBearerToken Credential for the Agent's local HTTP API, returned only by the successful enrollment response.
9824
+ AgentBearerToken string `json:"agentBearerToken"`
9825
+ AgentID string `json:"agentId"`
9826
+ HostID string `json:"hostId"`
9827
+ IssuedAt time.Time `json:"issuedAt"`
9828
+ OperationID string `json:"operationId"`
9829
+
9830
+ // RuntimeBearerToken Revocable credential restricted to Docker operations for this host.
9831
+ RuntimeBearerToken string `json:"runtimeBearerToken"`
9832
+ }
9833
+
9834
+ // DockerHostAgentCredentialsEnvelope defines model for DockerHostAgentCredentialsEnvelope.
9835
+ type DockerHostAgentCredentialsEnvelope struct {
9836
+ Data DockerHostAgentCredentials `json:"data"`
9837
+ }
9838
+
9839
+ // DockerHostAgentEnrollmentRequest defines model for DockerHostAgentEnrollmentRequest.
9840
+ type DockerHostAgentEnrollmentRequest struct {
9841
+ AgentID string `json:"agentId"`
9842
+
9843
+ // EnrollmentToken Short-lived one-time secret delivered only inside the installer.
9844
+ EnrollmentToken string `json:"enrollmentToken"`
9845
+ }
9846
+
9761
9847
  // DockerHostAgentInstallation defines model for DockerHostAgentInstallation.
9762
9848
  type DockerHostAgentInstallation struct {
9763
9849
  Command string `json:"command"`
@@ -13957,6 +14043,70 @@ type KubernetesWorkloadRelation struct {
13957
14043
  Relation string `json:"relation,omitempty"`
13958
14044
  }
13959
14045
 
14046
+ // KubernetesWorkloadSnapshot defines model for KubernetesWorkloadSnapshot.
14047
+ type KubernetesWorkloadSnapshot struct {
14048
+ Containers []KubernetesWorkloadSnapshotContainer `json:"containers"`
14049
+
14050
+ // Content Generated native batch/v1 Job or CronJob YAML, or workloads.soha.io/v1alpha1 WorkloadCronJob YAML whose selected container image follows the source workload, ready for the existing resource-creation preflight.
14051
+ Content string `json:"content"`
14052
+ SelectedContainer string `json:"selectedContainer"`
14053
+ SourceUID string `json:"sourceUid"`
14054
+ Warnings []string `json:"warnings"`
14055
+ }
14056
+
14057
+ // KubernetesWorkloadSnapshotContainer defines model for KubernetesWorkloadSnapshotContainer.
14058
+ type KubernetesWorkloadSnapshotContainer struct {
14059
+ Image string `json:"image"`
14060
+ Name string `json:"name"`
14061
+ }
14062
+
14063
+ // KubernetesWorkloadSnapshotEnvelope defines model for KubernetesWorkloadSnapshotEnvelope.
14064
+ type KubernetesWorkloadSnapshotEnvelope struct {
14065
+ Data KubernetesWorkloadSnapshot `json:"data"`
14066
+ }
14067
+
14068
+ // KubernetesWorkloadSnapshotRequest defines model for KubernetesWorkloadSnapshotRequest.
14069
+ type KubernetesWorkloadSnapshotRequest struct {
14070
+ // ActiveDeadlineSeconds Zero leaves the Kubernetes default unchanged.
14071
+ ActiveDeadlineSeconds int `json:"activeDeadlineSeconds,omitempty"`
14072
+ Annotations map[string]string `json:"annotations,omitempty"`
14073
+ Args []string `json:"args,omitempty"`
14074
+ BackoffLimit int `json:"backoffLimit,omitempty"`
14075
+ Command []string `json:"command,omitempty"`
14076
+
14077
+ // Completions Zero leaves the Kubernetes default unchanged.
14078
+ Completions int `json:"completions,omitempty"`
14079
+ Description string `json:"description,omitempty"`
14080
+ Labels map[string]string `json:"labels,omitempty"`
14081
+
14082
+ // Namespace Namespace shared by the source workload and generated target because referenced Secrets, ConfigMaps, ServiceAccounts, and PVCs are namespace-scoped.
14083
+ Namespace string `json:"namespace"`
14084
+
14085
+ // Parallelism Zero leaves the Kubernetes default unchanged.
14086
+ Parallelism int `json:"parallelism,omitempty"`
14087
+ RestartPolicy KubernetesWorkloadSnapshotRestartPolicy `json:"restartPolicy"`
14088
+
14089
+ // Schedule Required when targetKind is CronJob or WorkloadCronJob.
14090
+ Schedule string `json:"schedule,omitempty"`
14091
+
14092
+ // SourceContainer Regular container to retain. When omitted, the first regular container is selected.
14093
+ SourceContainer string `json:"sourceContainer,omitempty"`
14094
+ SourceKind KubernetesWorkloadSnapshotSourceKind `json:"sourceKind"`
14095
+ SourceName string `json:"sourceName"`
14096
+ Suspend bool `json:"suspend,omitempty"`
14097
+ TargetKind KubernetesWorkloadSnapshotTargetKind `json:"targetKind"`
14098
+ TargetName string `json:"targetName"`
14099
+ }
14100
+
14101
+ // KubernetesWorkloadSnapshotRestartPolicy defines model for KubernetesWorkloadSnapshotRestartPolicy.
14102
+ type KubernetesWorkloadSnapshotRestartPolicy string
14103
+
14104
+ // KubernetesWorkloadSnapshotSourceKind defines model for KubernetesWorkloadSnapshotSourceKind.
14105
+ type KubernetesWorkloadSnapshotSourceKind string
14106
+
14107
+ // KubernetesWorkloadSnapshotTargetKind defines model for KubernetesWorkloadSnapshotTargetKind.
14108
+ type KubernetesWorkloadSnapshotTargetKind string
14109
+
13960
14110
  // LLMCallLog defines model for LLMCallLog.
13961
14111
  type LLMCallLog struct {
13962
14112
  ActorID string `json:"actorId,omitempty"`
@@ -21427,6 +21577,9 @@ type PreflightKubernetesResourceCreateJSONRequestBody = KubernetesResourceCreate
21427
21577
  // DecideKubernetesResourceCreateScopeJSONRequestBody defines body for DecideKubernetesResourceCreateScope for application/json ContentType.
21428
21578
  type DecideKubernetesResourceCreateScopeJSONRequestBody = KubernetesResourceCreateScopeDecisionRequest
21429
21579
 
21580
+ // GenerateKubernetesWorkloadSnapshotJSONRequestBody defines body for GenerateKubernetesWorkloadSnapshot for application/json ContentType.
21581
+ type GenerateKubernetesWorkloadSnapshotJSONRequestBody = KubernetesWorkloadSnapshotRequest
21582
+
21430
21583
  // RecordCompanionInteractionJSONRequestBody defines body for RecordCompanionInteraction for application/json ContentType.
21431
21584
  type RecordCompanionInteractionJSONRequestBody = CompanionInteractionRequest
21432
21585
 
@@ -21526,6 +21679,9 @@ type TriggerManifestSourceWebhookJSONRequestBody = ManifestSyncWebhookInput
21526
21679
  // CreateDeliveryPlanJSONRequestBody defines body for CreateDeliveryPlan for application/json ContentType.
21527
21680
  type CreateDeliveryPlanJSONRequestBody = DeliveryPlanInput
21528
21681
 
21682
+ // ExchangeDockerHostAgentEnrollmentJSONRequestBody defines body for ExchangeDockerHostAgentEnrollment for application/json ContentType.
21683
+ type ExchangeDockerHostAgentEnrollmentJSONRequestBody = DockerHostAgentEnrollmentRequest
21684
+
21529
21685
  // StartDockerContainerJSONRequestBody defines body for StartDockerContainer for application/json ContentType.
21530
21686
  type StartDockerContainerJSONRequestBody = DockerContainerStartInput
21531
21687
 
@@ -0,0 +1,17 @@
1
+ package sohaapi
2
+
3
+ import "testing"
4
+
5
+ func TestKubernetesWorkloadSnapshotRequestGeneratedShape(t *testing.T) {
6
+ request := KubernetesWorkloadSnapshotRequest{
7
+ Namespace: "default",
8
+ SourceKind: KubernetesWorkloadSnapshotSourceKindDeployment,
9
+ SourceName: "reports",
10
+ TargetKind: KubernetesWorkloadSnapshotTargetKindCronJob,
11
+ TargetName: "reports-schedule",
12
+ RestartPolicy: KubernetesWorkloadSnapshotRestartPolicyNever,
13
+ }
14
+ if request.Namespace != "default" {
15
+ t.Fatalf("namespace = %q, want default", request.Namespace)
16
+ }
17
+ }
@@ -2065,6 +2065,22 @@ export interface paths {
2065
2065
  patch?: never;
2066
2066
  trace?: never;
2067
2067
  };
2068
+ "/docker/agent-installations/{operationID}/enroll": {
2069
+ parameters: {
2070
+ query?: never;
2071
+ header?: never;
2072
+ path?: never;
2073
+ cookie?: never;
2074
+ };
2075
+ get?: never;
2076
+ put?: never;
2077
+ post: operations["exchangeDockerHostAgentEnrollment"];
2078
+ delete?: never;
2079
+ options?: never;
2080
+ head?: never;
2081
+ patch?: never;
2082
+ trace?: never;
2083
+ };
2068
2084
  "/docker/hosts/quick-create/plan": {
2069
2085
  parameters: {
2070
2086
  query?: never;
@@ -4546,6 +4562,22 @@ export interface paths {
4546
4562
  patch?: never;
4547
4563
  trace?: never;
4548
4564
  };
4565
+ "/clusters/{clusterID}/resource-creation/workload-snapshot": {
4566
+ parameters: {
4567
+ query?: never;
4568
+ header?: never;
4569
+ path?: never;
4570
+ cookie?: never;
4571
+ };
4572
+ get?: never;
4573
+ put?: never;
4574
+ post: operations["generateKubernetesWorkloadSnapshot"];
4575
+ delete?: never;
4576
+ options?: never;
4577
+ head?: never;
4578
+ patch?: never;
4579
+ trace?: never;
4580
+ };
4549
4581
  "/clusters/{clusterID}/resource-creation/preflight": {
4550
4582
  parameters: {
4551
4583
  query?: never;
@@ -15240,6 +15272,34 @@ export interface components {
15240
15272
  DockerHostAgentInstallationEnvelope: {
15241
15273
  data: components["schemas"]["DockerHostAgentInstallation"];
15242
15274
  };
15275
+ DockerHostAgentEnrollmentRequest: {
15276
+ agentId: string;
15277
+ /**
15278
+ * Format: password
15279
+ * @description Short-lived one-time secret delivered only inside the installer.
15280
+ */
15281
+ enrollmentToken: string;
15282
+ };
15283
+ DockerHostAgentCredentials: {
15284
+ hostId: string;
15285
+ operationId: string;
15286
+ agentId: string;
15287
+ /**
15288
+ * Format: password
15289
+ * @description Credential for the Agent's local HTTP API, returned only by the successful enrollment response.
15290
+ */
15291
+ agentBearerToken: string;
15292
+ /**
15293
+ * Format: password
15294
+ * @description Revocable credential restricted to Docker operations for this host.
15295
+ */
15296
+ runtimeBearerToken: string;
15297
+ /** Format: date-time */
15298
+ issuedAt: string;
15299
+ };
15300
+ DockerHostAgentCredentialsEnvelope: {
15301
+ data: components["schemas"]["DockerHostAgentCredentials"];
15302
+ };
15243
15303
  /** @enum {string} */
15244
15304
  ObservabilityProviderSignal: "logs" | "metrics" | "traces" | "profiles";
15245
15305
  /** @enum {string} */
@@ -15910,6 +15970,57 @@ export interface components {
15910
15970
  status?: components["schemas"]["LogStreamStatus"];
15911
15971
  } & (unknown & unknown);
15912
15972
  /** @enum {string} */
15973
+ KubernetesWorkloadSnapshotSourceKind: "Deployment" | "StatefulSet" | "DaemonSet";
15974
+ /** @enum {string} */
15975
+ KubernetesWorkloadSnapshotTargetKind: "Job" | "CronJob" | "WorkloadCronJob";
15976
+ /** @enum {string} */
15977
+ KubernetesWorkloadSnapshotRestartPolicy: "Never" | "OnFailure";
15978
+ KubernetesWorkloadSnapshotRequest: {
15979
+ /** @description Namespace shared by the source workload and generated target because referenced Secrets, ConfigMaps, ServiceAccounts, and PVCs are namespace-scoped. */
15980
+ namespace: string;
15981
+ sourceKind: components["schemas"]["KubernetesWorkloadSnapshotSourceKind"];
15982
+ sourceName: string;
15983
+ /** @description Regular container to retain. When omitted, the first regular container is selected. */
15984
+ sourceContainer?: string;
15985
+ targetKind: components["schemas"]["KubernetesWorkloadSnapshotTargetKind"];
15986
+ targetName: string;
15987
+ description?: string;
15988
+ labels?: {
15989
+ [key: string]: string;
15990
+ };
15991
+ annotations?: {
15992
+ [key: string]: string;
15993
+ };
15994
+ command?: string[];
15995
+ args?: string[];
15996
+ restartPolicy: components["schemas"]["KubernetesWorkloadSnapshotRestartPolicy"];
15997
+ /** @description Zero leaves the Kubernetes default unchanged. */
15998
+ parallelism?: number;
15999
+ /** @description Zero leaves the Kubernetes default unchanged. */
16000
+ completions?: number;
16001
+ backoffLimit?: number;
16002
+ /** @description Zero leaves the Kubernetes default unchanged. */
16003
+ activeDeadlineSeconds?: number;
16004
+ /** @description Required when targetKind is CronJob or WorkloadCronJob. */
16005
+ schedule?: string;
16006
+ suspend?: boolean;
16007
+ };
16008
+ KubernetesWorkloadSnapshotContainer: {
16009
+ name: string;
16010
+ image: string;
16011
+ };
16012
+ KubernetesWorkloadSnapshot: {
16013
+ /** @description Generated native batch/v1 Job or CronJob YAML, or workloads.soha.io/v1alpha1 WorkloadCronJob YAML whose selected container image follows the source workload, ready for the existing resource-creation preflight. */
16014
+ content: string;
16015
+ sourceUid: string;
16016
+ selectedContainer: string;
16017
+ containers: components["schemas"]["KubernetesWorkloadSnapshotContainer"][];
16018
+ warnings: string[];
16019
+ };
16020
+ KubernetesWorkloadSnapshotEnvelope: {
16021
+ data: components["schemas"]["KubernetesWorkloadSnapshot"];
16022
+ };
16023
+ /** @enum {string} */
15913
16024
  KubernetesResourceCreateSource: "list" | "global_yaml" | "form";
15914
16025
  /** @enum {string} */
15915
16026
  KubernetesResourceScopeMode: "namespace" | "cluster";
@@ -19162,6 +19273,9 @@ export type AgentInstallation = components['schemas']['AgentInstallation'];
19162
19273
  export type AgentInstallationEnvelope = components['schemas']['AgentInstallationEnvelope'];
19163
19274
  export type DockerHostAgentInstallation = components['schemas']['DockerHostAgentInstallation'];
19164
19275
  export type DockerHostAgentInstallationEnvelope = components['schemas']['DockerHostAgentInstallationEnvelope'];
19276
+ export type DockerHostAgentEnrollmentRequest = components['schemas']['DockerHostAgentEnrollmentRequest'];
19277
+ export type DockerHostAgentCredentials = components['schemas']['DockerHostAgentCredentials'];
19278
+ export type DockerHostAgentCredentialsEnvelope = components['schemas']['DockerHostAgentCredentialsEnvelope'];
19165
19279
  export type ObservabilityProviderSignal = components['schemas']['ObservabilityProviderSignal'];
19166
19280
  export type ObservabilityProviderRuntimeMode = components['schemas']['ObservabilityProviderRuntimeMode'];
19167
19281
  export type ObservabilityProviderStatus = components['schemas']['ObservabilityProviderStatus'];
@@ -19262,6 +19376,13 @@ export type LogPage = components['schemas']['LogPage'];
19262
19376
  export type LogPageEnvelope = components['schemas']['LogPageEnvelope'];
19263
19377
  export type LogStreamStatus = components['schemas']['LogStreamStatus'];
19264
19378
  export type LogStreamEvent = components['schemas']['LogStreamEvent'];
19379
+ export type KubernetesWorkloadSnapshotSourceKind = components['schemas']['KubernetesWorkloadSnapshotSourceKind'];
19380
+ export type KubernetesWorkloadSnapshotTargetKind = components['schemas']['KubernetesWorkloadSnapshotTargetKind'];
19381
+ export type KubernetesWorkloadSnapshotRestartPolicy = components['schemas']['KubernetesWorkloadSnapshotRestartPolicy'];
19382
+ export type KubernetesWorkloadSnapshotRequest = components['schemas']['KubernetesWorkloadSnapshotRequest'];
19383
+ export type KubernetesWorkloadSnapshotContainer = components['schemas']['KubernetesWorkloadSnapshotContainer'];
19384
+ export type KubernetesWorkloadSnapshot = components['schemas']['KubernetesWorkloadSnapshot'];
19385
+ export type KubernetesWorkloadSnapshotEnvelope = components['schemas']['KubernetesWorkloadSnapshotEnvelope'];
19265
19386
  export type KubernetesResourceCreateSource = components['schemas']['KubernetesResourceCreateSource'];
19266
19387
  export type KubernetesResourceScopeMode = components['schemas']['KubernetesResourceScopeMode'];
19267
19388
  export type KubernetesResourceAction = components['schemas']['KubernetesResourceAction'];
@@ -23776,6 +23897,38 @@ export interface operations {
23776
23897
  410: components["responses"]["Error"];
23777
23898
  };
23778
23899
  };
23900
+ exchangeDockerHostAgentEnrollment: {
23901
+ parameters: {
23902
+ query?: never;
23903
+ header?: never;
23904
+ path: {
23905
+ operationID: components["parameters"]["OperationID"];
23906
+ };
23907
+ cookie?: never;
23908
+ };
23909
+ requestBody: {
23910
+ content: {
23911
+ "application/json": components["schemas"]["DockerHostAgentEnrollmentRequest"];
23912
+ };
23913
+ };
23914
+ responses: {
23915
+ /** @description One-time host-bound Agent and control-plane credentials. The enrollment token is atomically consumed by a successful response. */
23916
+ 201: {
23917
+ headers: {
23918
+ /** @description Prevents credential responses from being cached. */
23919
+ "Cache-Control"?: "no-store";
23920
+ [name: string]: unknown;
23921
+ };
23922
+ content: {
23923
+ "application/json": components["schemas"]["DockerHostAgentCredentialsEnvelope"];
23924
+ };
23925
+ };
23926
+ 400: components["responses"]["Error"];
23927
+ 404: components["responses"]["Error"];
23928
+ 409: components["responses"]["Error"];
23929
+ 410: components["responses"]["Error"];
23930
+ };
23931
+ };
23779
23932
  planDockerHostQuickCreate: {
23780
23933
  parameters: {
23781
23934
  query?: never;
@@ -28160,6 +28313,35 @@ export interface operations {
28160
28313
  404: components["responses"]["Error"];
28161
28314
  };
28162
28315
  };
28316
+ generateKubernetesWorkloadSnapshot: {
28317
+ parameters: {
28318
+ query?: never;
28319
+ header?: never;
28320
+ path: {
28321
+ clusterID: components["parameters"]["ClusterID"];
28322
+ };
28323
+ cookie?: never;
28324
+ };
28325
+ requestBody: {
28326
+ content: {
28327
+ "application/json": components["schemas"]["KubernetesWorkloadSnapshotRequest"];
28328
+ };
28329
+ };
28330
+ responses: {
28331
+ /** @description A native Job or CronJob manifest, or a workloads.soha.io/v1alpha1 WorkloadCronJob manifest, generated from a same-namespace workload Pod template. This operation does not create resources. */
28332
+ 200: {
28333
+ headers: {
28334
+ [name: string]: unknown;
28335
+ };
28336
+ content: {
28337
+ "application/json": components["schemas"]["KubernetesWorkloadSnapshotEnvelope"];
28338
+ };
28339
+ };
28340
+ 400: components["responses"]["Error"];
28341
+ 403: components["responses"]["Error"];
28342
+ 404: components["responses"]["Error"];
28343
+ };
28344
+ };
28163
28345
  preflightKubernetesResourceCreate: {
28164
28346
  parameters: {
28165
28347
  query?: never;