@alienplatform/sdk 3.3.23 → 3.3.25
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 +162 -1
- 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."))
|
|
@@ -8413,6 +8416,12 @@ const ToolchainConfigSchema = union([
|
|
|
8413
8416
|
"binaryName": string().describe("Name of the compiled binary (defaults to package.json name if not specified)").nullish(),
|
|
8414
8417
|
"type": _enum(["typescript"])
|
|
8415
8418
|
}),
|
|
8419
|
+
object({
|
|
8420
|
+
"command": array(string()).describe("Process argv used to start the application"),
|
|
8421
|
+
"package": string().describe("Workspace package to install (omit for a single-package project)").nullish(),
|
|
8422
|
+
"pythonVersion": string().describe("Python version used by the runtime image (defaults to 3.12)").nullish(),
|
|
8423
|
+
"type": _enum(["python"])
|
|
8424
|
+
}),
|
|
8416
8425
|
object({
|
|
8417
8426
|
"buildArgs": object({}).catchall(string()).describe("Build arguments for docker build").nullish(),
|
|
8418
8427
|
"dockerfile": string().describe("Dockerfile path relative to src (default: \"Dockerfile\")").nullish(),
|
|
@@ -8505,6 +8514,18 @@ const HorizonContainerHeartbeatDataSchema = object({
|
|
|
8505
8514
|
* Generated by Kubb (https://kubb.dev/).
|
|
8506
8515
|
* Do not edit manually.
|
|
8507
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
|
+
*/
|
|
8508
8529
|
const KubernetesOwnerReferenceSchema = object({
|
|
8509
8530
|
"controller": boolean(),
|
|
8510
8531
|
"kind": string(),
|
|
@@ -8516,6 +8537,9 @@ const KubernetesOwnerReferenceSchema = object({
|
|
|
8516
8537
|
* Do not edit manually.
|
|
8517
8538
|
*/
|
|
8518
8539
|
const KubernetesPodRuntimeUnitStatusSchema = object({
|
|
8540
|
+
get "containers"() {
|
|
8541
|
+
return array(ContainerImageIdentitySchema.describe("Image a running container reports.")).optional();
|
|
8542
|
+
},
|
|
8519
8543
|
get "cpu"() {
|
|
8520
8544
|
return union([MetricSampleSchema, _null()]).optional();
|
|
8521
8545
|
},
|
|
@@ -8793,6 +8817,29 @@ const ContainerPortSchema = object({ "port": int().min(0).describe("Port number"
|
|
|
8793
8817
|
* Do not edit manually.
|
|
8794
8818
|
*/
|
|
8795
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
|
+
/**
|
|
8796
8843
|
* @description HTTP health check configuration.
|
|
8797
8844
|
*/
|
|
8798
8845
|
const HealthCheckSchema = object({
|
|
@@ -8807,6 +8854,28 @@ const HealthCheckSchema = object({
|
|
|
8807
8854
|
* Do not edit manually.
|
|
8808
8855
|
*/
|
|
8809
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
|
+
/**
|
|
8810
8879
|
* @description Persistent storage configuration for stateful containers.
|
|
8811
8880
|
*/
|
|
8812
8881
|
const PersistentStorageSchema = object({
|
|
@@ -8862,6 +8931,15 @@ object({
|
|
|
8862
8931
|
return union([HealthCheckSchema, _null()]).optional();
|
|
8863
8932
|
},
|
|
8864
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
|
+
},
|
|
8865
8943
|
get "links"() {
|
|
8866
8944
|
return array(ResourceRefSchema.describe("Reference to a resource by its stable id and resource type.")).describe("Resource links (dependencies)");
|
|
8867
8945
|
},
|
|
@@ -8880,6 +8958,9 @@ object({
|
|
|
8880
8958
|
return array(PublicEndpointSchema.describe("Public endpoint configuration for port-backed workload resources.")).describe("Public endpoints exposed by the container.").optional();
|
|
8881
8959
|
},
|
|
8882
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
|
+
},
|
|
8883
8964
|
"stateful": optional(boolean().describe("Whether container is stateful (gets stable ordinals, optional persistent volumes)")),
|
|
8884
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()
|
|
8885
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```");
|
|
@@ -9234,6 +9315,32 @@ const DomainSettingsSchema = object({
|
|
|
9234
9315
|
* Generated by Kubb (https://kubb.dev/).
|
|
9235
9316
|
* Do not edit manually.
|
|
9236
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
|
+
*/
|
|
9237
9344
|
/**
|
|
9238
9345
|
* @description A single DKIM CNAME record the operator must create in DNS.
|
|
9239
9346
|
*/
|
|
@@ -10510,6 +10617,39 @@ const NetworkSettingsSchema = union([
|
|
|
10510
10617
|
* Generated by Kubb (https://kubb.dev/).
|
|
10511
10618
|
* Do not edit manually.
|
|
10512
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
|
+
*/
|
|
10513
10653
|
const RawHeartbeatSnippetFormatSchema = _enum([
|
|
10514
10654
|
"json",
|
|
10515
10655
|
"yaml",
|
|
@@ -10546,6 +10686,9 @@ const ObservedResourceSampleSchema = object({
|
|
|
10546
10686
|
get "health"() {
|
|
10547
10687
|
return ObservedHealthSchema;
|
|
10548
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
|
+
},
|
|
10549
10692
|
"labels": optional(object({}).catchall(string())),
|
|
10550
10693
|
get "lifecycle"() {
|
|
10551
10694
|
return ProviderLifecycleStateSchema;
|
|
@@ -10992,7 +11135,7 @@ object({
|
|
|
10992
11135
|
});
|
|
10993
11136
|
object({
|
|
10994
11137
|
"domainEgressRules": boolean().describe("Egress can be restricted to a hostname allowlist"),
|
|
10995
|
-
"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."),
|
|
10996
11139
|
"enforcedLimits": boolean().describe("The platform enforces the declared cpu, memory and disk ceilings"),
|
|
10997
11140
|
"files": boolean().describe("Files can be moved in and out of a sandbox"),
|
|
10998
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."),
|
|
@@ -11328,6 +11471,8 @@ const StackInputDefinitionSchema = object({
|
|
|
11328
11471
|
}).describe("Stack input definition serialized into a release stack.");
|
|
11329
11472
|
union([object({ "external": string().describe("Reference to another stack by ID") }), _enum(["current"])]).describe("Reference to a stack for management permissions");
|
|
11330
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.")),
|
|
11331
11476
|
"id": string().describe("Unique identifier for the stack"),
|
|
11332
11477
|
get "inputs"() {
|
|
11333
11478
|
return array(StackInputDefinitionSchema.describe("Stack input definition serialized into a release stack.")).describe("Input definitions required before setup or deployment can proceed.").optional();
|
|
@@ -11402,6 +11547,22 @@ object({
|
|
|
11402
11547
|
"versioning": optional(boolean().describe("Enables object versioning.\nDefault: `false`"))
|
|
11403
11548
|
}).describe("Represents an object storage bucket.");
|
|
11404
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.");
|
|
11405
11566
|
object({
|
|
11406
11567
|
get "bundles"() {
|
|
11407
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();
|