@alienplatform/core 1.0.1 → 1.3.4

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 (169) hide show
  1. package/.turbo/turbo-build.log +30 -0
  2. package/LICENSE.md +105 -0
  3. package/dist/index.d.ts +2343 -2321
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +16 -6
  6. package/dist/index.js.map +1 -1
  7. package/dist/stack.js +264 -262
  8. package/dist/stack.js.map +1 -1
  9. package/dist/tests/index.d.ts +2 -1
  10. package/dist/tests/index.d.ts.map +1 -1
  11. package/kubb.config.ts +1 -0
  12. package/package.json +17 -10
  13. package/src/artifact-registry.ts +12 -0
  14. package/src/function.ts +5 -6
  15. package/src/generated/index.ts +0 -2
  16. package/src/generated/schemas/agentStatus.json +1 -1
  17. package/src/generated/schemas/alienError.json +1 -1
  18. package/src/generated/schemas/alienEvent.json +1 -1
  19. package/src/generated/schemas/artifactRegistry.json +1 -1
  20. package/src/generated/schemas/azureManagementConfig.json +1 -1
  21. package/src/generated/schemas/commandState.json +1 -1
  22. package/src/generated/schemas/createCommandRequest.json +1 -1
  23. package/src/generated/schemas/deploymentStatus.json +1 -1
  24. package/src/generated/schemas/devStatus.json +1 -1
  25. package/src/generated/schemas/envelope.json +1 -1
  26. package/src/generated/schemas/eventChange.json +1 -1
  27. package/src/generated/schemas/eventState.json +1 -1
  28. package/src/generated/schemas/function.json +1 -1
  29. package/src/generated/schemas/functionOutputs.json +1 -1
  30. package/src/generated/schemas/functionTrigger.json +1 -1
  31. package/src/generated/schemas/leaseInfo.json +1 -1
  32. package/src/generated/schemas/leaseResponse.json +1 -1
  33. package/src/generated/schemas/managementConfig.json +1 -1
  34. package/src/generated/schemas/managementPermissions.json +1 -1
  35. package/src/generated/schemas/permissionsConfig.json +1 -1
  36. package/src/generated/schemas/remoteStackManagement.json +1 -1
  37. package/src/generated/schemas/remoteStackManagementOutputs.json +1 -1
  38. package/src/generated/schemas/resourceEntry.json +1 -1
  39. package/src/generated/schemas/resourceLifecycle.json +1 -1
  40. package/src/generated/schemas/stack.json +1 -1
  41. package/src/generated/schemas/stackResourceState.json +1 -1
  42. package/src/generated/schemas/stackSettings.json +1 -1
  43. package/src/generated/schemas/stackState.json +1 -1
  44. package/src/generated/schemas/updatesMode.json +1 -1
  45. package/src/generated/zod/agent-status-schema.ts +6 -5
  46. package/src/generated/zod/alien-error-schema.ts +5 -4
  47. package/src/generated/zod/alien-event-schema.ts +6 -6
  48. package/src/generated/zod/artifact-registry-outputs-schema.ts +3 -3
  49. package/src/generated/zod/artifact-registry-schema.ts +3 -2
  50. package/src/generated/zod/aws-custom-certificate-config-schema.ts +1 -1
  51. package/src/generated/zod/aws-management-config-schema.ts +1 -1
  52. package/src/generated/zod/aws-platform-permission-schema.ts +3 -3
  53. package/src/generated/zod/azure-custom-certificate-config-schema.ts +1 -1
  54. package/src/generated/zod/azure-management-config-schema.ts +5 -3
  55. package/src/generated/zod/azure-platform-permission-schema.ts +3 -3
  56. package/src/generated/zod/base-resource-outputs-schema.ts +2 -2
  57. package/src/generated/zod/base-resource-schema.ts +2 -2
  58. package/src/generated/zod/binding-configuration-aws-binding-spec-schema.ts +7 -7
  59. package/src/generated/zod/binding-configuration-azure-binding-spec-schema.ts +5 -5
  60. package/src/generated/zod/binding-configuration-gcp-binding-spec-schema.ts +7 -7
  61. package/src/generated/zod/body-spec-schema.ts +4 -4
  62. package/src/generated/zod/build-config-schema.ts +5 -5
  63. package/src/generated/zod/build-outputs-schema.ts +1 -1
  64. package/src/generated/zod/build-schema.ts +5 -5
  65. package/src/generated/zod/build-status-schema.ts +1 -1
  66. package/src/generated/zod/command-response-schema.ts +3 -3
  67. package/src/generated/zod/command-state-schema.ts +3 -3
  68. package/src/generated/zod/command-status-response-schema.ts +4 -4
  69. package/src/generated/zod/compute-type-schema.ts +1 -1
  70. package/src/generated/zod/container-autoscaling-schema.ts +5 -5
  71. package/src/generated/zod/container-code-schema.ts +2 -2
  72. package/src/generated/zod/container-gpu-spec-schema.ts +1 -1
  73. package/src/generated/zod/container-outputs-schema.ts +5 -5
  74. package/src/generated/zod/container-port-schema.ts +2 -2
  75. package/src/generated/zod/container-schema.ts +18 -18
  76. package/src/generated/zod/container-status-schema.ts +1 -1
  77. package/src/generated/zod/create-command-request-schema.ts +6 -6
  78. package/src/generated/zod/create-command-response-schema.ts +4 -4
  79. package/src/generated/zod/custom-certificate-config-schema.ts +4 -4
  80. package/src/generated/zod/custom-domain-config-schema.ts +2 -2
  81. package/src/generated/zod/deployment-model-schema.ts +1 -1
  82. package/src/generated/zod/deployment-status-schema.ts +2 -2
  83. package/src/generated/zod/dev-resource-info-schema.ts +2 -2
  84. package/src/generated/zod/dev-status-schema.ts +4 -4
  85. package/src/generated/zod/dev-status-state-schema.ts +1 -1
  86. package/src/generated/zod/domain-settings-schema.ts +2 -2
  87. package/src/generated/zod/envelope-schema.ts +6 -6
  88. package/src/generated/zod/event-change-schema.ts +9 -9
  89. package/src/generated/zod/event-state-schema.ts +2 -2
  90. package/src/generated/zod/expose-protocol-schema.ts +1 -1
  91. package/src/generated/zod/function-code-schema.ts +2 -2
  92. package/src/generated/zod/function-outputs-schema.ts +6 -5
  93. package/src/generated/zod/function-schema.ts +13 -13
  94. package/src/generated/zod/function-trigger-schema.ts +4 -4
  95. package/src/generated/zod/gcp-condition-schema.ts +1 -1
  96. package/src/generated/zod/gcp-custom-certificate-config-schema.ts +1 -1
  97. package/src/generated/zod/gcp-management-config-schema.ts +1 -1
  98. package/src/generated/zod/gcp-platform-permission-schema.ts +3 -3
  99. package/src/generated/zod/health-check-schema.ts +6 -6
  100. package/src/generated/zod/heartbeats-mode-schema.ts +1 -1
  101. package/src/generated/zod/http-method-schema.ts +1 -1
  102. package/src/generated/zod/index.ts +0 -2
  103. package/src/generated/zod/ingress-schema.ts +1 -1
  104. package/src/generated/zod/kv-outputs-schema.ts +3 -3
  105. package/src/generated/zod/kv-schema.ts +1 -1
  106. package/src/generated/zod/lease-info-schema.ts +4 -4
  107. package/src/generated/zod/lease-request-schema.ts +3 -3
  108. package/src/generated/zod/lease-response-schema.ts +2 -2
  109. package/src/generated/zod/lifecycle-rule-schema.ts +2 -2
  110. package/src/generated/zod/load-balancer-endpoint-schema.ts +2 -2
  111. package/src/generated/zod/local-operation-schema.ts +1 -1
  112. package/src/generated/zod/management-config-schema.ts +6 -6
  113. package/src/generated/zod/management-permissions-schema.ts +3 -3
  114. package/src/generated/zod/message-payload-schema.ts +1 -1
  115. package/src/generated/zod/monitoring-config-schema.ts +6 -6
  116. package/src/generated/zod/network-settings-schema.ts +4 -4
  117. package/src/generated/zod/permission-grant-schema.ts +4 -4
  118. package/src/generated/zod/permission-profile-schema.ts +2 -2
  119. package/src/generated/zod/permission-set-reference-schema.ts +2 -2
  120. package/src/generated/zod/permission-set-schema.ts +2 -2
  121. package/src/generated/zod/permissions-config-schema.ts +3 -3
  122. package/src/generated/zod/persistent-storage-schema.ts +4 -4
  123. package/src/generated/zod/platform-permissions-schema.ts +7 -7
  124. package/src/generated/zod/platform-schema.ts +1 -1
  125. package/src/generated/zod/presigned-operation-schema.ts +1 -1
  126. package/src/generated/zod/presigned-request-backend-schema.ts +2 -2
  127. package/src/generated/zod/presigned-request-schema.ts +4 -4
  128. package/src/generated/zod/push-progress-schema.ts +1 -1
  129. package/src/generated/zod/queue-message-schema.ts +6 -6
  130. package/src/generated/zod/queue-outputs-schema.ts +2 -2
  131. package/src/generated/zod/queue-schema.ts +1 -1
  132. package/src/generated/zod/readiness-probe-schema.ts +3 -3
  133. package/src/generated/zod/release-request-schema.ts +1 -1
  134. package/src/generated/zod/remote-stack-management-outputs-schema.ts +3 -3
  135. package/src/generated/zod/remote-stack-management-schema.ts +3 -3
  136. package/src/generated/zod/replica-status-schema.ts +4 -4
  137. package/src/generated/zod/resource-entry-schema.ts +5 -5
  138. package/src/generated/zod/resource-lifecycle-schema.ts +2 -2
  139. package/src/generated/zod/resource-ref-schema.ts +2 -2
  140. package/src/generated/zod/resource-spec-schema.ts +1 -1
  141. package/src/generated/zod/resource-status-schema.ts +1 -1
  142. package/src/generated/zod/resource-type-schema.ts +1 -1
  143. package/src/generated/zod/response-handling-schema.ts +2 -2
  144. package/src/generated/zod/scheduled-event-schema.ts +2 -2
  145. package/src/generated/zod/service-account-outputs-schema.ts +1 -1
  146. package/src/generated/zod/service-account-schema.ts +2 -2
  147. package/src/generated/zod/stack-ref-schema.ts +1 -1
  148. package/src/generated/zod/stack-resource-state-schema.ts +13 -13
  149. package/src/generated/zod/stack-schema.ts +3 -3
  150. package/src/generated/zod/stack-settings-schema.ts +13 -10
  151. package/src/generated/zod/stack-state-schema.ts +3 -3
  152. package/src/generated/zod/stack-status-schema.ts +1 -1
  153. package/src/generated/zod/storage-event-schema.ts +13 -13
  154. package/src/generated/zod/storage-event-type-schema.ts +1 -1
  155. package/src/generated/zod/storage-events-schema.ts +2 -2
  156. package/src/generated/zod/storage-outputs-schema.ts +1 -1
  157. package/src/generated/zod/storage-schema.ts +4 -4
  158. package/src/generated/zod/storage-upload-schema.ts +3 -3
  159. package/src/generated/zod/submit-response-request-schema.ts +2 -2
  160. package/src/generated/zod/telemetry-mode-schema.ts +1 -1
  161. package/src/generated/zod/toolchain-config-schema.ts +5 -5
  162. package/src/generated/zod/updates-mode-schema.ts +3 -3
  163. package/src/generated/zod/upload-complete-request-schema.ts +1 -1
  164. package/src/generated/zod/upload-complete-response-schema.ts +3 -3
  165. package/src/generated/zod/vault-outputs-schema.ts +1 -1
  166. package/src/generated/zod/vault-schema.ts +1 -1
  167. package/src/index.ts +2 -2
  168. package/src/generated/schemas/imagePullCredentials.json +0 -1
  169. package/src/generated/zod/image-pull-credentials-schema.ts +0 -16
@@ -3,19 +3,19 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { PresignedOperationSchema } from "./presigned-operation-schema.js";
7
8
  import { PresignedRequestBackendSchema } from "./presigned-request-backend-schema.js";
8
- import { z } from "zod/v4";
9
9
 
10
10
  /**
11
11
  * @description A presigned request that can be serialized, stored, and executed later.\nHides implementation details for different storage backends.
12
12
  */
13
13
  export const PresignedRequestSchema = z.object({
14
- get backend(){
14
+ get "backend"(){
15
15
  return PresignedRequestBackendSchema.describe("Storage backend representation for different presigned request types")
16
16
  },
17
- "expiration": z.string().datetime().describe("When this presigned request expires"),
18
- get operation(){
17
+ "expiration": z.iso.datetime().describe("When this presigned request expires"),
18
+ get "operation"(){
19
19
  return PresignedOperationSchema.describe("The type of operation a presigned request performs")
20
20
  },
21
21
  "path": z.string().describe("The path this request operates on")
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Progress information for image push operations
@@ -3,24 +3,24 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { MessagePayloadSchema } from "./message-payload-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description Standardized queue message structure used by alien-runtime\n\nThis structure contains commonly available metadata across all platforms\nand a JSON-first payload that handles both structured data and plain text.
11
11
  */
12
12
  export const QueueMessageSchema = z.object({
13
- "attemptCount": z.int().min(0).describe("Delivery attempt count (from ApproximateReceiveCount/deliveryCount, if available)").optional().nullable(),
14
- "attributes": z.object({
13
+ "attemptCount": z.int().min(0).describe("Delivery attempt count (from ApproximateReceiveCount/deliveryCount, if available)").nullish(),
14
+ "attributes": z.optional(z.object({
15
15
 
16
- }).catchall(z.string()).describe("Message attributes/properties (flattened from messageAttributes/attributes/properties)").optional(),
16
+ }).catchall(z.string()).describe("Message attributes/properties (flattened from messageAttributes/attributes/properties)")),
17
17
  "id": z.string().describe("Unique message identifier (from messageId/ce-id)"),
18
- get payload(){
18
+ get "payload"(){
19
19
  return MessagePayloadSchema.describe("JSON-first message payload that supports both structured JSON and UTF-8 text")
20
20
  },
21
21
  "receiptHandle": z.string().describe("Platform-specific receipt handle for acknowledgment"),
22
22
  "source": z.string().describe("Source queue/topic name (derived from ARN/source/topic)"),
23
- "timestamp": z.string().datetime().describe("Message timestamp (from SentTimestamp/ce-time/enqueuedTimeUtc)")
23
+ "timestamp": z.iso.datetime().describe("Message timestamp (from SentTimestamp/ce-time/enqueuedTimeUtc)")
24
24
  }).describe("Standardized queue message structure used by alien-runtime\n\nThis structure contains commonly available metadata across all platforms\nand a JSON-first payload that handles both structured data and plain text.")
25
25
 
26
26
  export type QueueMessage = z.infer<typeof QueueMessageSchema>
@@ -3,13 +3,13 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Outputs generated by a successfully provisioned Queue.
10
10
  */
11
11
  export const QueueOutputsSchema = z.object({
12
- "identifier": z.string().describe("Platform-specific identifier or URL (e.g., SQS URL, Pub/Sub topic/subscription).").optional().nullable(),
12
+ "identifier": z.string().describe("Platform-specific identifier or URL (e.g., SQS URL, Pub/Sub topic/subscription).").nullish(),
13
13
  "queueName": z.string().describe("The name of the queue (platform-specific physical name).")
14
14
  }).describe("Outputs generated by a successfully provisioned Queue.")
15
15
 
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Represents a message queue resource with minimal, portable semantics.\nQueue integrates with platform-native services (AWS SQS, GCP Pub/Sub, Azure Service Bus).
@@ -3,17 +3,17 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { HttpMethodSchema } from "./http-method-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description Configuration for HTTP-based readiness probe.\nThis probe is executed after function provisioning/update to verify the function is ready to serve traffic.\nOnly works with functions that have Public ingress.
11
11
  */
12
12
  export const ReadinessProbeSchema = z.object({
13
- get method(){
13
+ get "method"(){
14
14
  return HttpMethodSchema.describe("HTTP method for readiness probe requests.").optional()
15
15
  },
16
- "path": z.string().describe("Path to request for the probe (e.g., \"/health\", \"/ready\").\nDefault: \"/\"").optional()
16
+ "path": z.optional(z.string().describe("Path to request for the probe (e.g., \"/health\", \"/ready\").\nDefault: \"/\""))
17
17
  }).describe("Configuration for HTTP-based readiness probe.\nThis probe is executed after function provisioning/update to verify the function is ready to serve traffic.\nOnly works with functions that have Public ingress.")
18
18
 
19
19
  export type ReadinessProbe = z.infer<typeof ReadinessProbeSchema>
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Request to release a lease
@@ -3,14 +3,14 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Resource outputs for RemoteStackManagement.\nDifferent platforms will provide different outputs based on their implementation.
10
10
  */
11
11
  export const RemoteStackManagementOutputsSchema = z.object({
12
- "accessConfiguration": z.string().describe("Platform-specific access configuration\nFor AWS: The role ARN to assume\nFor GCP: The service account email to impersonate\nFor Azure: The lighthouse registration assignment ID"),
13
- "managementResourceId": z.string().describe("Platform-specific management resource identifier\nFor AWS: The ARN of the created cross-account role\nFor GCP: The email of the created service account\nFor Azure: The resource ID of the lighthouse registration")
12
+ "accessConfiguration": z.string().describe("Platform-specific access configuration\nFor AWS: The role ARN to assume\nFor GCP: The service account email to impersonate\nFor Azure: JSON containing the target managed identity client ID and tenant ID"),
13
+ "managementResourceId": z.string().describe("Platform-specific management resource identifier\nFor AWS: The ARN of the created cross-account role\nFor GCP: The email of the created service account\nFor Azure: The resource ID of the target user-assigned managed identity")
14
14
  }).describe("Resource outputs for RemoteStackManagement.\nDifferent platforms will provide different outputs based on their implementation.")
15
15
 
16
16
  export type RemoteStackManagementOutputs = z.infer<typeof RemoteStackManagementOutputsSchema>
@@ -3,13 +3,13 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
- * @description Represents cross-account management access configuration for a stack deployed\non AWS, GCP, or Azure platforms. This resource sets up the necessary IAM/RBAC\nconfiguration to allow another cloud account to manage the stack.\n\nMaps to:\n- AWS: Cross-account IAM role with management permissions\n- GCP: Service account with management permissions and impersonation rights\n- Azure: Lighthouse registration definition and assignment\n\nThis resource is automatically created for AWS, GCP, and Azure platforms\nwhen the stack needs to be managed by another account. The management account\nand identity information comes from the platform configuration.
9
+ * @description Represents cross-account management access configuration for a stack deployed\non AWS, GCP, or Azure platforms. This resource sets up the necessary IAM/RBAC\nconfiguration to allow another cloud account to manage the stack.\n\nMaps to:\n- AWS: Cross-account IAM role with management permissions\n- GCP: Service account with management permissions and impersonation rights\n- Azure: User-assigned managed identity with federated credential and custom RBAC\n\nThis resource is automatically created for AWS, GCP, and Azure platforms\nwhen the stack needs to be managed by another account. The management account\nand identity information comes from the platform configuration.
10
10
  */
11
11
  export const RemoteStackManagementSchema = z.object({
12
12
  "id": z.string().describe("Identifier for the remote stack management. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters.")
13
- }).describe("Represents cross-account management access configuration for a stack deployed\non AWS, GCP, or Azure platforms. This resource sets up the necessary IAM/RBAC\nconfiguration to allow another cloud account to manage the stack.\n\nMaps to:\n- AWS: Cross-account IAM role with management permissions\n- GCP: Service account with management permissions and impersonation rights\n- Azure: Lighthouse registration definition and assignment\n\nThis resource is automatically created for AWS, GCP, and Azure platforms\nwhen the stack needs to be managed by another account. The management account\nand identity information comes from the platform configuration.")
13
+ }).describe("Represents cross-account management access configuration for a stack deployed\non AWS, GCP, or Azure platforms. This resource sets up the necessary IAM/RBAC\nconfiguration to allow another cloud account to manage the stack.\n\nMaps to:\n- AWS: Cross-account IAM role with management permissions\n- GCP: Service account with management permissions and impersonation rights\n- Azure: User-assigned managed identity with federated credential and custom RBAC\n\nThis resource is automatically created for AWS, GCP, and Azure platforms\nwhen the stack needs to be managed by another account. The management account\nand identity information comes from the platform configuration.")
14
14
 
15
15
  export type RemoteStackManagement = z.infer<typeof RemoteStackManagementSchema>
@@ -3,16 +3,16 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Status of a single container replica.
10
10
  */
11
11
  export const ReplicaStatusSchema = z.object({
12
- "containerIp": z.string().describe("Container IP address (for service discovery)").optional().nullable(),
12
+ "containerIp": z.string().describe("Container IP address (for service discovery)").nullish(),
13
13
  "healthy": z.boolean().describe("Whether the replica is healthy"),
14
- "machineId": z.string().describe("Machine ID the replica is running on").optional().nullable(),
15
- "ordinal": z.int().min(0).describe("Ordinal (for stateful containers)").optional().nullable(),
14
+ "machineId": z.string().describe("Machine ID the replica is running on").nullish(),
15
+ "ordinal": z.int().min(0).describe("Ordinal (for stateful containers)").nullish(),
16
16
  "replicaId": z.string().describe("Replica ID (e.g., \"api-0\", \"api-1\")")
17
17
  }).describe("Status of a single container replica.")
18
18
 
@@ -3,22 +3,22 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { BaseResourceSchema } from "./base-resource-schema.js";
7
8
  import { ResourceLifecycleSchema } from "./resource-lifecycle-schema.js";
8
9
  import { ResourceRefSchema } from "./resource-ref-schema.js";
9
- import { z } from "zod/v4";
10
10
 
11
11
  export const ResourceEntrySchema = z.object({
12
- get config(){
12
+ get "config"(){
13
13
  return BaseResourceSchema.describe("Resource that can hold any resource type in the Alien system. All resources share common 'type' and 'id' fields with additional type-specific properties.")
14
14
  },
15
- get dependencies(){
15
+ get "dependencies"(){
16
16
  return z.array(ResourceRefSchema.describe("New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.")).describe("Additional dependencies for this resource beyond those defined in the resource itself.\nThe total dependencies are: resource.get_dependencies() + this list")
17
17
  },
18
- get lifecycle(){
18
+ get "lifecycle"(){
19
19
  return ResourceLifecycleSchema.describe("Describes the lifecycle of a resource within a stack, determining how it's managed and deployed.")
20
20
  },
21
- "remoteAccess": z.boolean().describe("Enable remote bindings for this resource (BYOB use case).\nWhen true, binding params are synced to StackState's `remote_binding_params`.\nDefault: false (prevents sensitive data in synced state).").optional()
21
+ "remoteAccess": z.optional(z.boolean().describe("Enable remote bindings for this resource (BYOB use case).\nWhen true, binding params are synced to StackState's `remote_binding_params`.\nDefault: false (prevents sensitive data in synced state)."))
22
22
  })
23
23
 
24
24
  export type ResourceEntry = z.infer<typeof ResourceEntrySchema>
@@ -3,11 +3,11 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Describes the lifecycle of a resource within a stack, determining how it\'s managed and deployed.
10
10
  */
11
- export const ResourceLifecycleSchema = z.enum(["frozen", "live", "live-on-setup"]).describe("Describes the lifecycle of a resource within a stack, determining how it's managed and deployed.")
11
+ export const ResourceLifecycleSchema = z.enum(["frozen", "live"]).describe("Describes the lifecycle of a resource within a stack, determining how it's managed and deployed.")
12
12
 
13
13
  export type ResourceLifecycle = z.infer<typeof ResourceLifecycleSchema>
@@ -3,15 +3,15 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { ResourceTypeSchema } from "./resource-type-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.
11
11
  */
12
12
  export const ResourceRefSchema = z.object({
13
13
  "id": z.string(),
14
- get type(){
14
+ get "type"(){
15
15
  return ResourceTypeSchema.describe("Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.")
16
16
  }
17
17
  }).describe("New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.")
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Resource specification with min/desired values.
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Represents the high-level status of a resource during its lifecycle.
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.
@@ -3,15 +3,15 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { PresignedRequestSchema } from "./presigned-request-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description Response handling configuration for deployments
11
11
  */
12
12
  export const ResponseHandlingSchema = z.object({
13
13
  "maxInlineBytes": z.int().min(0).describe("Maximum response body size that can be submitted inline"),
14
- get storageUploadRequest(){
14
+ get "storageUploadRequest"(){
15
15
  return PresignedRequestSchema.describe("A presigned request that can be serialized, stored, and executed later.\nHides implementation details for different storage backends.")
16
16
  },
17
17
  "submitResponseUrl": z.string().describe("URL where deployments submit responses")
@@ -3,13 +3,13 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Represents a scheduled event trigger, typically from a cron job or timer.\n\nThis struct aims to provide a common representation for scheduled events\nacross different providers like AWS CloudWatch Events, Google Cloud Scheduler,\nand Azure Timer Triggers.
10
10
  */
11
11
  export const ScheduledEventSchema = z.object({
12
- "timestamp": z.string().datetime().describe("The timestamp when the event was scheduled or triggered.")
12
+ "timestamp": z.iso.datetime().describe("The timestamp when the event was scheduled or triggered.")
13
13
  }).describe("Represents a scheduled event trigger, typically from a cron job or timer.\n\nThis struct aims to provide a common representation for scheduled events\nacross different providers like AWS CloudWatch Events, Google Cloud Scheduler,\nand Azure Timer Triggers.")
14
14
 
15
15
  export type ScheduledEvent = z.infer<typeof ScheduledEventSchema>
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Outputs generated by a successfully provisioned ServiceAccount.
@@ -3,15 +3,15 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { PermissionSetSchema } from "./permission-set-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description Represents a non-human identity that can be assumed by compute services\nsuch as Lambda, Cloud Run, ECS, Container Apps, etc.\n\nMaps to:\n- AWS: IAM Role\n- GCP: Service Account\n- Azure: User-assigned Managed Identity\n\nThe ServiceAccount is automatically created from permission profiles in the stack\nand contains the resolved permission sets for both stack-level and resource-scoped access.
11
11
  */
12
12
  export const ServiceAccountSchema = z.object({
13
13
  "id": z.string().describe("Identifier for the service account. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters."),
14
- get stackPermissionSets(){
14
+ get "stackPermissionSets"(){
15
15
  return z.array(PermissionSetSchema.describe("A permission set that can be applied across different cloud platforms")).describe("Stack-level permission sets that apply to all resources in the stack.\nThese are derived from the \"*\" scope in the permission profile.\nResource-scoped permissions are handled by individual resource controllers.")
16
16
  }
17
17
  }).describe("Represents a non-human identity that can be assumed by compute services\nsuch as Lambda, Cloud Run, ECS, Container Apps, etc.\n\nMaps to:\n- AWS: IAM Role\n- GCP: Service Account\n- Azure: User-assigned Managed Identity\n\nThe ServiceAccount is automatically created from permission profiles in the stack\nand contains the resolved permission sets for both stack-level and resource-scoped access.")
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Reference to a stack for management permissions
@@ -3,42 +3,42 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { AlienErrorSchema } from "./alien-error-schema.js";
7
8
  import { BaseResourceOutputsSchema } from "./base-resource-outputs-schema.js";
8
9
  import { BaseResourceSchema } from "./base-resource-schema.js";
9
10
  import { ResourceLifecycleSchema } from "./resource-lifecycle-schema.js";
10
11
  import { ResourceRefSchema } from "./resource-ref-schema.js";
11
12
  import { ResourceStatusSchema } from "./resource-status-schema.js";
12
- import { z } from "zod/v4";
13
13
 
14
14
  /**
15
15
  * @description Represents the state of a single resource within the stack for a specific platform.
16
16
  */
17
17
  export const StackResourceStateSchema = z.object({
18
- "_internal": z.any().optional(),
19
- get config(){
18
+ "_internal": z.optional(z.any().describe("The platform-specific resource controller that manages this resource's lifecycle.\nThis is None when the resource status is Pending.\nStored as JSON to make the struct serializable and movable to alien-core.")),
19
+ get "config"(){
20
20
  return BaseResourceSchema.describe("Resource that can hold any resource type in the Alien system. All resources share common 'type' and 'id' fields with additional type-specific properties.")
21
21
  },
22
- get dependencies(){
22
+ get "dependencies"(){
23
23
  return z.array(ResourceRefSchema.describe("New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.")).describe("Complete list of dependencies for this resource, including infrastructure dependencies.\nThis preserves the full dependency information from the stack definition.").optional()
24
24
  },
25
- get error(){
25
+ get "error"(){
26
26
  return z.union([AlienErrorSchema, z.null()]).optional()
27
27
  },
28
- "isExternallyProvisioned": z.boolean().describe("True if the resource was provisioned by an external system (e.g., CloudFormation).\nDefaults to false, indicating dynamic provisioning by the executor.").optional(),
29
- "lastFailedState": z.any().optional(),
30
- get lifecycle(){
28
+ "isExternallyProvisioned": z.optional(z.boolean().describe("True if the resource was provisioned by an external system (e.g., CloudFormation).\nDefaults to false, indicating dynamic provisioning by the executor.")),
29
+ "lastFailedState": z.optional(z.any().describe("Stores the controller state that failed, used for manual retry operations.\nThis allows resuming from the exact point where the failure occurred.\nStored as JSON to make the struct serializable and movable to alien-core.")),
30
+ get "lifecycle"(){
31
31
  return z.union([ResourceLifecycleSchema, z.null()]).optional()
32
32
  },
33
- get outputs(){
33
+ get "outputs"(){
34
34
  return z.union([BaseResourceOutputsSchema, z.null()]).optional()
35
35
  },
36
- get previousConfig(){
36
+ get "previousConfig"(){
37
37
  return z.union([BaseResourceSchema, z.null()]).optional()
38
38
  },
39
- "remoteBindingParams": z.any().optional(),
40
- "retryAttempt": z.int().min(0).describe("Tracks consecutive retry attempts for the current state transition.").optional(),
41
- get status(){
39
+ "remoteBindingParams": z.optional(z.any().describe("Binding parameters for remote access.\nOnly populated when the resource has `remote_access: true` in its ResourceEntry.\nThis is the JSON serialization of the binding configuration (e.g., StorageBinding, VaultBinding).\nPopulated by controllers during provisioning using get_binding_params().")),
40
+ "retryAttempt": z.optional(z.int().min(0).describe("Tracks consecutive retry attempts for the current state transition.")),
41
+ get "status"(){
42
42
  return ResourceStatusSchema.describe("Represents the high-level status of a resource during its lifecycle.")
43
43
  },
44
44
  "type": z.string().describe("The high-level type of the resource (e.g., Function::RESOURCE_TYPE, Storage::RESOURCE_TYPE).")
@@ -3,21 +3,21 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { PermissionsConfigSchema } from "./permissions-config-schema.js";
7
8
  import { ResourceEntrySchema } from "./resource-entry-schema.js";
8
- import { z } from "zod/v4";
9
9
 
10
10
  /**
11
11
  * @description A bag of resources, unaware of any cloud.
12
12
  */
13
13
  export const StackSchema = z.object({
14
14
  "id": z.string().describe("Unique identifier for the stack"),
15
- get permissions(){
15
+ get "permissions"(){
16
16
  return PermissionsConfigSchema.describe("Combined permissions configuration that contains both profiles and management").optional()
17
17
  },
18
18
  "resources": z.object({
19
19
 
20
- }).catchall(ResourceEntrySchema).describe("Map of resource IDs to their configurations and lifecycle settings")
20
+ }).catchall(z.lazy(() => ResourceEntrySchema)).describe("Map of resource IDs to their configurations and lifecycle settings")
21
21
  }).describe("A bag of resources, unaware of any cloud.")
22
22
 
23
23
  export type Stack = z.infer<typeof StackSchema>
@@ -3,36 +3,39 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { DeploymentModelSchema } from "./deployment-model-schema.js";
7
8
  import { DomainSettingsSchema } from "./domain-settings-schema.js";
8
9
  import { HeartbeatsModeSchema } from "./heartbeats-mode-schema.js";
9
10
  import { NetworkSettingsSchema } from "./network-settings-schema.js";
10
11
  import { TelemetryModeSchema } from "./telemetry-mode-schema.js";
11
12
  import { UpdatesModeSchema } from "./updates-mode-schema.js";
12
- import { z } from "zod/v4";
13
13
 
14
14
  /**
15
- * @description User-customizable deployment settings specified at deploy time.\n\nThese settings are provided by the customer via CloudFormation parameters,\nTerraform attributes, CLI flags, or Helm values. They customize how the\nagent is deployed and what capabilities are enabled.\n\n**Key distinction**: StackSettings is user-customizable, while ManagementConfig\nis platform-derived (from the Agent Manager\'s ServiceAccount).
15
+ * @description User-customizable deployment settings specified at deploy time.\n\nThese settings are provided by the customer via CloudFormation parameters,\nTerraform attributes, CLI flags, or Helm values. They customize how the\ndeployment runs and what capabilities are enabled.\n\n**Key distinction**: StackSettings is user-customizable, while ManagementConfig\nis platform-derived (from the Manager\'s ServiceAccount).
16
16
  */
17
17
  export const StackSettingsSchema = z.object({
18
- get deploymentModel(){
18
+ get "deploymentModel"(){
19
19
  return DeploymentModelSchema.describe("Deployment model: how updates are delivered to the remote environment.").optional()
20
20
  },
21
- get domains(){
21
+ get "domains"(){
22
22
  return z.union([DomainSettingsSchema, z.null()]).optional()
23
23
  },
24
- get heartbeats(){
24
+ "externalBindings": z.object({
25
+
26
+ }).describe("External bindings for pre-existing infrastructure.\nAllows using existing resources (MinIO, Redis, shared Container Apps\nEnvironment, etc.) instead of having Alien provision them.\nRequired for Kubernetes platform, optional for cloud platforms.").nullish(),
27
+ get "heartbeats"(){
25
28
  return HeartbeatsModeSchema.describe("How heartbeat health checks are handled.").optional()
26
29
  },
27
- get network(){
30
+ get "network"(){
28
31
  return z.union([NetworkSettingsSchema, z.null()]).optional()
29
32
  },
30
- get telemetry(){
33
+ get "telemetry"(){
31
34
  return TelemetryModeSchema.describe("How telemetry (logs, metrics, traces) is handled.").optional()
32
35
  },
33
- get updates(){
34
- return UpdatesModeSchema.describe("How updates are delivered to the agent.").optional()
36
+ get "updates"(){
37
+ return UpdatesModeSchema.describe("How updates are delivered to the deployment.").optional()
35
38
  }
36
- }).describe("User-customizable deployment settings specified at deploy time.\n\nThese settings are provided by the customer via CloudFormation parameters,\nTerraform attributes, CLI flags, or Helm values. They customize how the\nagent is deployed and what capabilities are enabled.\n\n**Key distinction**: StackSettings is user-customizable, while ManagementConfig\nis platform-derived (from the Agent Manager's ServiceAccount).")
39
+ }).describe("User-customizable deployment settings specified at deploy time.\n\nThese settings are provided by the customer via CloudFormation parameters,\nTerraform attributes, CLI flags, or Helm values. They customize how the\ndeployment runs and what capabilities are enabled.\n\n**Key distinction**: StackSettings is user-customizable, while ManagementConfig\nis platform-derived (from the Manager's ServiceAccount).")
37
40
 
38
41
  export type StackSettings = z.infer<typeof StackSettingsSchema>
@@ -3,21 +3,21 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { PlatformSchema } from "./platform-schema.js";
7
8
  import { StackResourceStateSchema } from "./stack-resource-state-schema.js";
8
- import { z } from "zod/v4";
9
9
 
10
10
  /**
11
11
  * @description Represents the collective state of all resources in a stack, including platform and pending actions.
12
12
  */
13
13
  export const StackStateSchema = z.object({
14
- get platform(){
14
+ get "platform"(){
15
15
  return PlatformSchema.describe("Represents the target cloud platform.")
16
16
  },
17
17
  "resourcePrefix": z.string().describe("A prefix used for resource naming to ensure uniqueness across deployments."),
18
18
  "resources": z.object({
19
19
 
20
- }).catchall(StackResourceStateSchema.describe("Represents the state of a single resource within the stack for a specific platform.")).describe("The state of individual resources, keyed by resource ID.")
20
+ }).catchall(z.lazy(() => StackResourceStateSchema).describe("Represents the state of a single resource within the stack for a specific platform.")).describe("The state of individual resources, keyed by resource ID.")
21
21
  }).describe("Represents the collective state of all resources in a stack, including platform and pending actions.")
22
22
 
23
23
  export type StackState = z.infer<typeof StackStateSchema>
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Represents the overall status of a stack based on its resource states.
@@ -3,30 +3,30 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { StorageEventTypeSchema } from "./storage-event-type-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description Represents an event triggered by an action in an object storage service.\n\nThis struct provides a generic representation for events from services like\nAWS S3, Google Cloud Storage (GCS), and Azure Blob Storage.
11
11
  */
12
12
  export const StorageEventSchema = z.object({
13
13
  "bucketName": z.string().describe("The name of the bucket or container where the event occurred."),
14
- "contentType": z.string().describe("Optional content type (MIME type) of the object.").optional().nullable(),
15
- "copySource": z.string().describe("Optional information about the source object for copy events.").optional().nullable(),
16
- "currentTier": z.string().describe("Optional current storage tier for TierChanged or Restored events.").optional().nullable(),
17
- "etag": z.string().describe("Optional ETag or hash of the object content.").optional().nullable(),
18
- get eventType(){
14
+ "contentType": z.string().describe("Optional content type (MIME type) of the object.").nullish(),
15
+ "copySource": z.string().describe("Optional information about the source object for copy events.").nullish(),
16
+ "currentTier": z.string().describe("Optional current storage tier for TierChanged or Restored events.").nullish(),
17
+ "etag": z.string().describe("Optional ETag or hash of the object content.").nullish(),
18
+ get "eventType"(){
19
19
  return StorageEventTypeSchema.describe("Represents the type of storage event that occurred.")
20
20
  },
21
- "metadata": z.object({
21
+ "metadata": z.optional(z.object({
22
22
 
23
- }).catchall(z.string()).describe("Optional metadata associated with the object.").optional(),
23
+ }).catchall(z.string()).describe("Optional metadata associated with the object.")),
24
24
  "objectKey": z.string().describe("The key or path of the object involved in the event."),
25
- "previousTier": z.string().describe("Optional previous storage tier for TierChanged or Restored events.").optional().nullable(),
26
- "region": z.string().describe("Optional region where the event originated.").optional().nullable(),
27
- "size": z.int().min(0).describe("Optional size of the object in bytes.").optional().nullable(),
28
- "timestamp": z.string().datetime().describe("The timestamp when the event occurred."),
29
- "versionId": z.string().describe("Optional version or sequencer identifier for the event or object state.").optional().nullable()
25
+ "previousTier": z.string().describe("Optional previous storage tier for TierChanged or Restored events.").nullish(),
26
+ "region": z.string().describe("Optional region where the event originated.").nullish(),
27
+ "size": z.int().min(0).describe("Optional size of the object in bytes.").nullish(),
28
+ "timestamp": z.iso.datetime().describe("The timestamp when the event occurred."),
29
+ "versionId": z.string().describe("Optional version or sequencer identifier for the event or object state.").nullish()
30
30
  }).describe("Represents an event triggered by an action in an object storage service.\n\nThis struct provides a generic representation for events from services like\nAWS S3, Google Cloud Storage (GCS), and Azure Blob Storage.")
31
31
 
32
32
  export type StorageEvent = z.infer<typeof StorageEventSchema>
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Represents the type of storage event that occurred.
@@ -3,12 +3,12 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
+ import * as z from "zod";
6
7
  import { StorageEventSchema } from "./storage-event-schema.js";
7
- import { z } from "zod/v4";
8
8
 
9
9
  /**
10
10
  * @description A wrapper type for a list of storage events.
11
11
  */
12
- export const StorageEventsSchema = z.array(StorageEventSchema.describe("Represents an event triggered by an action in an object storage service.\n\nThis struct provides a generic representation for events from services like\nAWS S3, Google Cloud Storage (GCS), and Azure Blob Storage.")).describe("A wrapper type for a list of storage events.")
12
+ export const StorageEventsSchema = z.array(z.lazy(() => StorageEventSchema).describe("Represents an event triggered by an action in an object storage service.\n\nThis struct provides a generic representation for events from services like\nAWS S3, Google Cloud Storage (GCS), and Azure Blob Storage.")).describe("A wrapper type for a list of storage events.")
13
13
 
14
14
  export type StorageEvents = z.infer<typeof StorageEventsSchema>
@@ -3,7 +3,7 @@
3
3
  * Do not edit manually.
4
4
  */
5
5
 
6
- import { z } from "zod/v4";
6
+ import * as z from "zod";
7
7
 
8
8
  /**
9
9
  * @description Outputs generated by a successfully provisioned Storage bucket.