@alienplatform/sdk 3.3.24 → 3.3.26
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/dist/dist.js +157 -2
- package/dist/worker-runtime/index.js +10528 -10263
- package/package.json +4 -4
package/dist/dist.js
CHANGED
|
@@ -6842,10 +6842,12 @@ const AwsPermissionEffectSchema = _enum(["Allow", "Deny"]);
|
|
|
6842
6842
|
const BindingConfigurationAwsBindingSpecSchema = object({
|
|
6843
6843
|
"resource": optional(object({
|
|
6844
6844
|
"condition": object({}).catchall(object({}).catchall(string())).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
6845
|
+
"notResources": optional(array(string()).describe("ARN patterns rendered as IAM `NotResource`, in place of `resources`. Its one use is a\ntag-on-create grant whose implied check AWS authorizes against no resource; the build\nrefuses it anywhere else.")),
|
|
6845
6846
|
"resources": array(string()).describe("Resource ARNs to bind to")
|
|
6846
6847
|
}).describe("AWS-specific binding specification")),
|
|
6847
6848
|
"stack": optional(object({
|
|
6848
6849
|
"condition": object({}).catchall(object({}).catchall(string())).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
6850
|
+
"notResources": optional(array(string()).describe("ARN patterns rendered as IAM `NotResource`, in place of `resources`. Its one use is a\ntag-on-create grant whose implied check AWS authorizes against no resource; the build\nrefuses it anywhere else.")),
|
|
6849
6851
|
"resources": array(string()).describe("Resource ARNs to bind to")
|
|
6850
6852
|
}).describe("AWS-specific binding specification"))
|
|
6851
6853
|
}).describe("Generic binding configuration for permissions");
|
|
@@ -8335,6 +8337,7 @@ object({
|
|
|
8335
8337
|
return array(CapacityGroupSchema.describe("Capacity group definition.\n\nA capacity group represents machines with identical hardware profiles.\nEach group becomes a separate Auto Scaling Group (AWS), Managed Instance Group (GCP),\nor VM Scale Set (Azure).")).describe("Capacity groups defining the machine pools for this cluster.\nEach group becomes a separate ASG/MIG/VMSS.");
|
|
8336
8338
|
},
|
|
8337
8339
|
"containerCidr": string().describe("Container CIDR block for internal container networking.\nAuto-generated as \"10.244.0.0/16\" if not specified.\nEach machine gets a /24 subnet from this range.").nullish(),
|
|
8340
|
+
"dynamicContainerPool": string().describe("Pool reserved for containers created after a deployment is installed.\nIf absent, the runtime uses the `general` pool when it exists.").nullish(),
|
|
8338
8341
|
"failureDomainSpread": optional(object({}).catchall(int().min(0)).describe("Requested failure-domain spread keyed by capacity group.\nEmpty preserves the existing aggregate layout.")),
|
|
8339
8342
|
"id": string().describe("Unique identifier for the container cluster.\nMust contain only alphanumeric characters, hyphens, and underscores."),
|
|
8340
8343
|
"selectedFailureDomains": optional(object({}).catchall(array(string())).describe("Concrete provider failure domains selected during setup, keyed by capacity group.\nEmpty preserves the existing aggregate layout when no spread policy is configured."))
|
|
@@ -8511,6 +8514,18 @@ const HorizonContainerHeartbeatDataSchema = object({
|
|
|
8511
8514
|
* Generated by Kubb (https://kubb.dev/).
|
|
8512
8515
|
* Do not edit manually.
|
|
8513
8516
|
*/
|
|
8517
|
+
/**
|
|
8518
|
+
* @description Image a running container reports.
|
|
8519
|
+
*/
|
|
8520
|
+
const ContainerImageIdentitySchema = object({
|
|
8521
|
+
"digest": string().describe("Registry manifest digest in `sha256:<hex>` form, when the runtime\nreports one.").nullish(),
|
|
8522
|
+
"image": string().describe("Image reference reported by the container runtime."),
|
|
8523
|
+
"name": string().describe("Container name.")
|
|
8524
|
+
}).describe("Image a running container reports.");
|
|
8525
|
+
/**
|
|
8526
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8527
|
+
* Do not edit manually.
|
|
8528
|
+
*/
|
|
8514
8529
|
const KubernetesOwnerReferenceSchema = object({
|
|
8515
8530
|
"controller": boolean(),
|
|
8516
8531
|
"kind": string(),
|
|
@@ -8522,6 +8537,9 @@ const KubernetesOwnerReferenceSchema = object({
|
|
|
8522
8537
|
* Do not edit manually.
|
|
8523
8538
|
*/
|
|
8524
8539
|
const KubernetesPodRuntimeUnitStatusSchema = object({
|
|
8540
|
+
get "containers"() {
|
|
8541
|
+
return array(ContainerImageIdentitySchema.describe("Image a running container reports.")).optional();
|
|
8542
|
+
},
|
|
8525
8543
|
get "cpu"() {
|
|
8526
8544
|
return union([MetricSampleSchema, _null()]).optional();
|
|
8527
8545
|
},
|
|
@@ -8799,6 +8817,29 @@ const ContainerPortSchema = object({ "port": int().min(0).describe("Port number"
|
|
|
8799
8817
|
* Do not edit manually.
|
|
8800
8818
|
*/
|
|
8801
8819
|
/**
|
|
8820
|
+
* @description Security profile shared by container runtimes.
|
|
8821
|
+
*/
|
|
8822
|
+
const ContainerSecurityProfileSchema = _enum(["restricted"]).describe("Security profile shared by container runtimes.");
|
|
8823
|
+
/**
|
|
8824
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8825
|
+
* Do not edit manually.
|
|
8826
|
+
*/
|
|
8827
|
+
/**
|
|
8828
|
+
* @description Container process identity and filesystem security.
|
|
8829
|
+
*/
|
|
8830
|
+
const ContainerSecuritySchema = object({
|
|
8831
|
+
get "profile"() {
|
|
8832
|
+
return ContainerSecurityProfileSchema.describe("Security profile shared by container runtimes.");
|
|
8833
|
+
},
|
|
8834
|
+
"readOnlyRootFilesystem": boolean().describe("Mount the root filesystem read-only."),
|
|
8835
|
+
"runAsGroup": int().describe("Numeric GID for the container process."),
|
|
8836
|
+
"runAsUser": int().describe("Numeric UID for the container process.")
|
|
8837
|
+
}).describe("Container process identity and filesystem security.");
|
|
8838
|
+
/**
|
|
8839
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8840
|
+
* Do not edit manually.
|
|
8841
|
+
*/
|
|
8842
|
+
/**
|
|
8802
8843
|
* @description HTTP health check configuration.
|
|
8803
8844
|
*/
|
|
8804
8845
|
const HealthCheckSchema = object({
|
|
@@ -8813,6 +8854,28 @@ const HealthCheckSchema = object({
|
|
|
8813
8854
|
* Do not edit manually.
|
|
8814
8855
|
*/
|
|
8815
8856
|
/**
|
|
8857
|
+
* @description HTTP probe used by Kubernetes for workload liveness or readiness.
|
|
8858
|
+
*/
|
|
8859
|
+
const KubernetesHttpProbeSchema = object({
|
|
8860
|
+
"path": string().describe("Absolute HTTP path served by the container."),
|
|
8861
|
+
"port": int().min(0).describe("Container port to check.")
|
|
8862
|
+
}).describe("HTTP probe used by Kubernetes for workload liveness or readiness.");
|
|
8863
|
+
/**
|
|
8864
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8865
|
+
* Do not edit manually.
|
|
8866
|
+
*/
|
|
8867
|
+
/**
|
|
8868
|
+
* @description Mounts an existing, setup-owned Kubernetes Secret into a Container pod.\nThe Secret must exist in the deployment namespace before the workload starts.
|
|
8869
|
+
*/
|
|
8870
|
+
const KubernetesSecretMountSchema = object({
|
|
8871
|
+
"mountPath": string().describe("Directory where Kubernetes mounts the Secret's keys as read-only files."),
|
|
8872
|
+
"secretName": string().describe("Name of the existing Secret in the deployment namespace.")
|
|
8873
|
+
}).describe("Mounts an existing, setup-owned Kubernetes Secret into a Container pod.\nThe Secret must exist in the deployment namespace before the workload starts.");
|
|
8874
|
+
/**
|
|
8875
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
8876
|
+
* Do not edit manually.
|
|
8877
|
+
*/
|
|
8878
|
+
/**
|
|
8816
8879
|
* @description Persistent storage configuration for stateful containers.
|
|
8817
8880
|
*/
|
|
8818
8881
|
const PersistentStorageSchema = object({
|
|
@@ -8868,6 +8931,15 @@ object({
|
|
|
8868
8931
|
return union([HealthCheckSchema, _null()]).optional();
|
|
8869
8932
|
},
|
|
8870
8933
|
"id": string().describe("Unique identifier for the container.\nMust be DNS-compatible: lowercase alphanumeric with hyphens."),
|
|
8934
|
+
get "kubernetesLivenessProbe"() {
|
|
8935
|
+
return union([KubernetesHttpProbeSchema, _null()]).optional();
|
|
8936
|
+
},
|
|
8937
|
+
get "kubernetesReadinessProbe"() {
|
|
8938
|
+
return union([KubernetesHttpProbeSchema, _null()]).optional();
|
|
8939
|
+
},
|
|
8940
|
+
get "kubernetesSecretMounts"() {
|
|
8941
|
+
return array(KubernetesSecretMountSchema.describe("Mounts an existing, setup-owned Kubernetes Secret into a Container pod.\nThe Secret must exist in the deployment namespace before the workload starts.")).describe("Existing Kubernetes Secrets mounted as read-only directories.").optional();
|
|
8942
|
+
},
|
|
8871
8943
|
get "links"() {
|
|
8872
8944
|
return array(ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.")).describe("Resource links (dependencies)");
|
|
8873
8945
|
},
|
|
@@ -8886,6 +8958,9 @@ object({
|
|
|
8886
8958
|
return array(PublicEndpointSchema.describe("Public endpoint configuration for port-backed workload resources.")).describe("Public endpoints exposed by the container.").optional();
|
|
8887
8959
|
},
|
|
8888
8960
|
"replicas": int().min(0).describe("Fixed replica count (for stateful containers or stateless without autoscaling)").nullish(),
|
|
8961
|
+
get "security"() {
|
|
8962
|
+
return union([ContainerSecuritySchema, _null()]).optional();
|
|
8963
|
+
},
|
|
8889
8964
|
"stateful": optional(boolean().describe("Whether container is stateful (gets stable ordinals, optional persistent volumes)")),
|
|
8890
8965
|
"stopGracePeriodSeconds": int().min(1).max(86400).describe("Grace period in seconds for stopping replicas during updates, drains, and deletes.\n\nWhen omitted, the runtime backend applies its default. Valid values are\n1 second through 24 hours.").nullish()
|
|
8891
8966
|
}).describe("Container resource for running long-running container workloads.\n\nA Container defines a deployable unit that runs on a ComputeCluster.\nThe managed container backend handles scheduling replicas across machines,\nautoscaling based on various metrics, and service discovery.\n\n## Example\n\n```rust\nuse alien_core::{Container, ContainerCode, ResourceSpec, ContainerAutoscaling, PublicEndpoint, ExposeProtocol};\n\nlet container = Container::new(\"api\".to_string())\n .cluster(\"compute\".to_string())\n .code(ContainerCode::Image {\n image: \"myapp:latest\".to_string(),\n })\n .cpu(ResourceSpec { min: \"0.5\".to_string(), desired: \"1\".to_string() })\n .memory(ResourceSpec { min: \"512Mi\".to_string(), desired: \"1Gi\".to_string() })\n .port(8080)\n .public_endpoint(PublicEndpoint {\n name: \"api\".to_string(),\n port: 8080,\n protocol: ExposeProtocol::Http,\n host_label: None,\n wildcard_subdomains: false,\n })\n .autoscaling(ContainerAutoscaling {\n min: 2,\n desired: 3,\n max: 10,\n target_cpu_percent: Some(70.0),\n target_memory_percent: None,\n target_http_in_flight_per_replica: Some(100),\n max_http_p95_latency_ms: None,\n })\n .permissions(\"container-execution\".to_string())\n .build();\n```");
|
|
@@ -9240,6 +9315,32 @@ const DomainSettingsSchema = object({
|
|
|
9240
9315
|
* Generated by Kubb (https://kubb.dev/).
|
|
9241
9316
|
* Do not edit manually.
|
|
9242
9317
|
*/
|
|
9318
|
+
const DynamicContainerHealthCheckSchema = object({
|
|
9319
|
+
"path": string(),
|
|
9320
|
+
"port": int().min(0)
|
|
9321
|
+
});
|
|
9322
|
+
/**
|
|
9323
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
9324
|
+
* Do not edit manually.
|
|
9325
|
+
*/
|
|
9326
|
+
const DynamicContainerStatusSchema = _enum([
|
|
9327
|
+
"pending",
|
|
9328
|
+
"running",
|
|
9329
|
+
"failing",
|
|
9330
|
+
"stopped"
|
|
9331
|
+
]);
|
|
9332
|
+
object({
|
|
9333
|
+
"generation": int().min(0),
|
|
9334
|
+
"message": string().nullish(),
|
|
9335
|
+
"name": string(),
|
|
9336
|
+
get "status"() {
|
|
9337
|
+
return DynamicContainerStatusSchema;
|
|
9338
|
+
}
|
|
9339
|
+
}).describe("What the Operator observed after applying one target generation.");
|
|
9340
|
+
/**
|
|
9341
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
9342
|
+
* Do not edit manually.
|
|
9343
|
+
*/
|
|
9243
9344
|
/**
|
|
9244
9345
|
* @description A single DKIM CNAME record the operator must create in DNS.
|
|
9245
9346
|
*/
|
|
@@ -10516,6 +10617,39 @@ const NetworkSettingsSchema = union([
|
|
|
10516
10617
|
* Generated by Kubb (https://kubb.dev/).
|
|
10517
10618
|
* Do not edit manually.
|
|
10518
10619
|
*/
|
|
10620
|
+
/**
|
|
10621
|
+
* @description A container image running in one observed application workload.
|
|
10622
|
+
*/
|
|
10623
|
+
const ObservedApplicationImageSchema = object({
|
|
10624
|
+
"container": string().describe("Container name within the workload."),
|
|
10625
|
+
"digest": string().describe("Registry manifest digest in `sha256:<hex>` form, when the runtime\nreports one.").nullish(),
|
|
10626
|
+
"image": string().describe("Image reference reported by the container runtime."),
|
|
10627
|
+
"workload": string().describe("Inventory identity of the workload, matching the `rawIdentity` of its\nobserved resource sample (for example `apps/v1:Deployment:shop:api`).")
|
|
10628
|
+
}).describe("A container image running in one observed application workload.");
|
|
10629
|
+
/**
|
|
10630
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
10631
|
+
* Do not edit manually.
|
|
10632
|
+
*/
|
|
10633
|
+
/**
|
|
10634
|
+
* @description Where the Operator read the application identity from.
|
|
10635
|
+
*/
|
|
10636
|
+
const ObservedApplicationSourceSchema = _enum(["kubernetes"]).describe("Where the Operator read the application identity from.");
|
|
10637
|
+
object({
|
|
10638
|
+
"chartName": string().describe("Helm chart name from the workloads' `helm.sh/chart` label. Present only\nwhen every labelled workload names the same chart.").nullish(),
|
|
10639
|
+
"chartVersion": string().describe("Helm chart version from the same label.").nullish(),
|
|
10640
|
+
"complete": boolean().describe("Whether every workload kind could be listed. When `false`, the chart\nand images describe only the workloads the Operator could read."),
|
|
10641
|
+
get "images"() {
|
|
10642
|
+
return array(ObservedApplicationImageSchema.describe("A container image running in one observed application workload.")).describe("Distinct container images running in the observed workloads.").optional();
|
|
10643
|
+
},
|
|
10644
|
+
"observedAt": datetime().describe("When the workloads were read."),
|
|
10645
|
+
get "source"() {
|
|
10646
|
+
return ObservedApplicationSourceSchema.describe("Where the Operator read the application identity from.");
|
|
10647
|
+
}
|
|
10648
|
+
}).describe("Application release the Operator observes running in its environment.\n\nThis identifies the customer's application, not the Operator: the\nOperator's own image is reported separately as [`OperatorImageReport`].");
|
|
10649
|
+
/**
|
|
10650
|
+
* Generated by Kubb (https://kubb.dev/).
|
|
10651
|
+
* Do not edit manually.
|
|
10652
|
+
*/
|
|
10519
10653
|
const RawHeartbeatSnippetFormatSchema = _enum([
|
|
10520
10654
|
"json",
|
|
10521
10655
|
"yaml",
|
|
@@ -10552,6 +10686,9 @@ const ObservedResourceSampleSchema = object({
|
|
|
10552
10686
|
get "health"() {
|
|
10553
10687
|
return ObservedHealthSchema;
|
|
10554
10688
|
},
|
|
10689
|
+
get "images"() {
|
|
10690
|
+
return array(ContainerImageIdentitySchema.describe("Image a running container reports.")).describe("Distinct container images the resource's running instances report, when\nthe provider exposes them.").optional();
|
|
10691
|
+
},
|
|
10555
10692
|
"labels": optional(object({}).catchall(string())),
|
|
10556
10693
|
get "lifecycle"() {
|
|
10557
10694
|
return ProviderLifecycleStateSchema;
|
|
@@ -10998,7 +11135,7 @@ object({
|
|
|
10998
11135
|
});
|
|
10999
11136
|
object({
|
|
11000
11137
|
"domainEgressRules": boolean().describe("Egress can be restricted to a hostname allowlist"),
|
|
11001
|
-
"egressDeny": boolean().describe("Whether a declared `deny` is actually enforced, rather than accepted and dropped"),
|
|
11138
|
+
"egressDeny": boolean().describe("Whether a declared `deny` is actually enforced, rather than accepted and dropped.\nIt covers routed traffic; the `deny` mode says where DNS still resolves."),
|
|
11002
11139
|
"enforcedLimits": boolean().describe("The platform enforces the declared cpu, memory and disk ceilings"),
|
|
11003
11140
|
"files": boolean().describe("Files can be moved in and out of a sandbox"),
|
|
11004
11141
|
"jobs": boolean().describe("A command can be started, polled and cancelled across separate calls, so it outlives the\none that started it. False where nothing inside the sandbox owns the process in between."),
|
|
@@ -11034,7 +11171,7 @@ _enum([
|
|
|
11034
11171
|
* @description Specifies where the sandbox\'s root filesystem comes from.
|
|
11035
11172
|
*/
|
|
11036
11173
|
const SandboxCodeSchema = union([object({
|
|
11037
|
-
"image": string().describe("Image reference (e.g. `ubuntu:24.04`, `ghcr.io/myorg/sandbox:latest`)
|
|
11174
|
+
"image": string().describe("Image reference (e.g. `ubuntu:24.04`, `ghcr.io/myorg/sandbox:latest`). AWS wants an\n`s3://` bundle; Azure takes a catalog name such as `ubuntu` or an amd64 registry\nimage, told apart by syntax. Each refuses what it cannot take while planning."),
|
|
11038
11175
|
"type": _enum(["image"])
|
|
11039
11176
|
}), object({
|
|
11040
11177
|
"src": string().describe("The source directory to build from"),
|
|
@@ -11334,6 +11471,8 @@ const StackInputDefinitionSchema = object({
|
|
|
11334
11471
|
}).describe("Stack input definition serialized into a release stack.");
|
|
11335
11472
|
union([object({ "external": string().describe("Reference to another stack by ID") }), _enum(["current"])]).describe("Reference to a stack for management permissions");
|
|
11336
11473
|
object({
|
|
11474
|
+
"dynamicContainerImageResources": optional(array(string()).describe("Released Container resources whose image repositories are approved for\ncontainers created after installation.")),
|
|
11475
|
+
"dynamicContainerRepositories": optional(array(string()).describe("Exact image repositories approved for containers created after installation.\nThe runtime API also requires an immutable SHA-256 digest.")),
|
|
11337
11476
|
"id": string().describe("Unique identifier for the stack"),
|
|
11338
11477
|
get "inputs"() {
|
|
11339
11478
|
return array(StackInputDefinitionSchema.describe("Stack input definition serialized into a release stack.")).describe("Input definitions required before setup or deployment can proceed.").optional();
|
|
@@ -11408,6 +11547,22 @@ object({
|
|
|
11408
11547
|
"versioning": optional(boolean().describe("Enables object versioning.\nDefault: `false`"))
|
|
11409
11548
|
}).describe("Represents an object storage bucket.");
|
|
11410
11549
|
lazy(() => CommandResponseSchema).describe("Command response from deployment").describe("Request to submit a command response (from deployment)");
|
|
11550
|
+
object({
|
|
11551
|
+
"cpu": string(),
|
|
11552
|
+
"deleted": boolean(),
|
|
11553
|
+
"env": optional(object({}).catchall(string())),
|
|
11554
|
+
"generation": int().min(0),
|
|
11555
|
+
get "healthCheck"() {
|
|
11556
|
+
return union([DynamicContainerHealthCheckSchema, _null()]).optional();
|
|
11557
|
+
},
|
|
11558
|
+
"image": string(),
|
|
11559
|
+
"memory": string(),
|
|
11560
|
+
"name": string(),
|
|
11561
|
+
"ports": array(int().min(0)),
|
|
11562
|
+
"replicas": int().min(0),
|
|
11563
|
+
"secretEnv": optional(object({}).catchall(string())),
|
|
11564
|
+
"suspendedReason": string().describe("Stop an installed workload when its release no longer admits the image.").nullish()
|
|
11565
|
+
}).describe("One release-independent container the Operator should run in its namespace.\nThe manager sends the complete set on every sync. An empty set removes\ncontainers previously owned by this deployment.");
|
|
11411
11566
|
object({
|
|
11412
11567
|
get "bundles"() {
|
|
11413
11568
|
return array(OperationsBundleDownloadSchema.describe("One bundle the Operator needs to download to reach `targetBundleHash`.\nThe manager mints a short-lived presigned GET URL per bundle — the\nOperator never holds real cloud storage credentials, mirroring the OCI\nregistry proxy's credential-injection pattern.")).describe("Presigned downloads for every bundle in the target set. The Operator\nfetches only the ones it doesn't already have loaded at the right\nversion; already-loaded bundles are harmless to re-download.").optional();
|