@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.
- package/.turbo/turbo-build.log +30 -0
- package/LICENSE.md +105 -0
- package/dist/index.d.ts +2343 -2321
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -6
- package/dist/index.js.map +1 -1
- package/dist/stack.js +264 -262
- package/dist/stack.js.map +1 -1
- package/dist/tests/index.d.ts +2 -1
- package/dist/tests/index.d.ts.map +1 -1
- package/kubb.config.ts +1 -0
- package/package.json +17 -10
- package/src/artifact-registry.ts +12 -0
- package/src/function.ts +5 -6
- package/src/generated/index.ts +0 -2
- package/src/generated/schemas/agentStatus.json +1 -1
- package/src/generated/schemas/alienError.json +1 -1
- package/src/generated/schemas/alienEvent.json +1 -1
- package/src/generated/schemas/artifactRegistry.json +1 -1
- package/src/generated/schemas/azureManagementConfig.json +1 -1
- package/src/generated/schemas/commandState.json +1 -1
- package/src/generated/schemas/createCommandRequest.json +1 -1
- package/src/generated/schemas/deploymentStatus.json +1 -1
- package/src/generated/schemas/devStatus.json +1 -1
- package/src/generated/schemas/envelope.json +1 -1
- package/src/generated/schemas/eventChange.json +1 -1
- package/src/generated/schemas/eventState.json +1 -1
- package/src/generated/schemas/function.json +1 -1
- package/src/generated/schemas/functionOutputs.json +1 -1
- package/src/generated/schemas/functionTrigger.json +1 -1
- package/src/generated/schemas/leaseInfo.json +1 -1
- package/src/generated/schemas/leaseResponse.json +1 -1
- package/src/generated/schemas/managementConfig.json +1 -1
- package/src/generated/schemas/managementPermissions.json +1 -1
- package/src/generated/schemas/permissionsConfig.json +1 -1
- package/src/generated/schemas/remoteStackManagement.json +1 -1
- package/src/generated/schemas/remoteStackManagementOutputs.json +1 -1
- package/src/generated/schemas/resourceEntry.json +1 -1
- package/src/generated/schemas/resourceLifecycle.json +1 -1
- package/src/generated/schemas/stack.json +1 -1
- package/src/generated/schemas/stackResourceState.json +1 -1
- package/src/generated/schemas/stackSettings.json +1 -1
- package/src/generated/schemas/stackState.json +1 -1
- package/src/generated/schemas/updatesMode.json +1 -1
- package/src/generated/zod/agent-status-schema.ts +6 -5
- package/src/generated/zod/alien-error-schema.ts +5 -4
- package/src/generated/zod/alien-event-schema.ts +6 -6
- package/src/generated/zod/artifact-registry-outputs-schema.ts +3 -3
- package/src/generated/zod/artifact-registry-schema.ts +3 -2
- package/src/generated/zod/aws-custom-certificate-config-schema.ts +1 -1
- package/src/generated/zod/aws-management-config-schema.ts +1 -1
- package/src/generated/zod/aws-platform-permission-schema.ts +3 -3
- package/src/generated/zod/azure-custom-certificate-config-schema.ts +1 -1
- package/src/generated/zod/azure-management-config-schema.ts +5 -3
- package/src/generated/zod/azure-platform-permission-schema.ts +3 -3
- package/src/generated/zod/base-resource-outputs-schema.ts +2 -2
- package/src/generated/zod/base-resource-schema.ts +2 -2
- package/src/generated/zod/binding-configuration-aws-binding-spec-schema.ts +7 -7
- package/src/generated/zod/binding-configuration-azure-binding-spec-schema.ts +5 -5
- package/src/generated/zod/binding-configuration-gcp-binding-spec-schema.ts +7 -7
- package/src/generated/zod/body-spec-schema.ts +4 -4
- package/src/generated/zod/build-config-schema.ts +5 -5
- package/src/generated/zod/build-outputs-schema.ts +1 -1
- package/src/generated/zod/build-schema.ts +5 -5
- package/src/generated/zod/build-status-schema.ts +1 -1
- package/src/generated/zod/command-response-schema.ts +3 -3
- package/src/generated/zod/command-state-schema.ts +3 -3
- package/src/generated/zod/command-status-response-schema.ts +4 -4
- package/src/generated/zod/compute-type-schema.ts +1 -1
- package/src/generated/zod/container-autoscaling-schema.ts +5 -5
- package/src/generated/zod/container-code-schema.ts +2 -2
- package/src/generated/zod/container-gpu-spec-schema.ts +1 -1
- package/src/generated/zod/container-outputs-schema.ts +5 -5
- package/src/generated/zod/container-port-schema.ts +2 -2
- package/src/generated/zod/container-schema.ts +18 -18
- package/src/generated/zod/container-status-schema.ts +1 -1
- package/src/generated/zod/create-command-request-schema.ts +6 -6
- package/src/generated/zod/create-command-response-schema.ts +4 -4
- package/src/generated/zod/custom-certificate-config-schema.ts +4 -4
- package/src/generated/zod/custom-domain-config-schema.ts +2 -2
- package/src/generated/zod/deployment-model-schema.ts +1 -1
- package/src/generated/zod/deployment-status-schema.ts +2 -2
- package/src/generated/zod/dev-resource-info-schema.ts +2 -2
- package/src/generated/zod/dev-status-schema.ts +4 -4
- package/src/generated/zod/dev-status-state-schema.ts +1 -1
- package/src/generated/zod/domain-settings-schema.ts +2 -2
- package/src/generated/zod/envelope-schema.ts +6 -6
- package/src/generated/zod/event-change-schema.ts +9 -9
- package/src/generated/zod/event-state-schema.ts +2 -2
- package/src/generated/zod/expose-protocol-schema.ts +1 -1
- package/src/generated/zod/function-code-schema.ts +2 -2
- package/src/generated/zod/function-outputs-schema.ts +6 -5
- package/src/generated/zod/function-schema.ts +13 -13
- package/src/generated/zod/function-trigger-schema.ts +4 -4
- package/src/generated/zod/gcp-condition-schema.ts +1 -1
- package/src/generated/zod/gcp-custom-certificate-config-schema.ts +1 -1
- package/src/generated/zod/gcp-management-config-schema.ts +1 -1
- package/src/generated/zod/gcp-platform-permission-schema.ts +3 -3
- package/src/generated/zod/health-check-schema.ts +6 -6
- package/src/generated/zod/heartbeats-mode-schema.ts +1 -1
- package/src/generated/zod/http-method-schema.ts +1 -1
- package/src/generated/zod/index.ts +0 -2
- package/src/generated/zod/ingress-schema.ts +1 -1
- package/src/generated/zod/kv-outputs-schema.ts +3 -3
- package/src/generated/zod/kv-schema.ts +1 -1
- package/src/generated/zod/lease-info-schema.ts +4 -4
- package/src/generated/zod/lease-request-schema.ts +3 -3
- package/src/generated/zod/lease-response-schema.ts +2 -2
- package/src/generated/zod/lifecycle-rule-schema.ts +2 -2
- package/src/generated/zod/load-balancer-endpoint-schema.ts +2 -2
- package/src/generated/zod/local-operation-schema.ts +1 -1
- package/src/generated/zod/management-config-schema.ts +6 -6
- package/src/generated/zod/management-permissions-schema.ts +3 -3
- package/src/generated/zod/message-payload-schema.ts +1 -1
- package/src/generated/zod/monitoring-config-schema.ts +6 -6
- package/src/generated/zod/network-settings-schema.ts +4 -4
- package/src/generated/zod/permission-grant-schema.ts +4 -4
- package/src/generated/zod/permission-profile-schema.ts +2 -2
- package/src/generated/zod/permission-set-reference-schema.ts +2 -2
- package/src/generated/zod/permission-set-schema.ts +2 -2
- package/src/generated/zod/permissions-config-schema.ts +3 -3
- package/src/generated/zod/persistent-storage-schema.ts +4 -4
- package/src/generated/zod/platform-permissions-schema.ts +7 -7
- package/src/generated/zod/platform-schema.ts +1 -1
- package/src/generated/zod/presigned-operation-schema.ts +1 -1
- package/src/generated/zod/presigned-request-backend-schema.ts +2 -2
- package/src/generated/zod/presigned-request-schema.ts +4 -4
- package/src/generated/zod/push-progress-schema.ts +1 -1
- package/src/generated/zod/queue-message-schema.ts +6 -6
- package/src/generated/zod/queue-outputs-schema.ts +2 -2
- package/src/generated/zod/queue-schema.ts +1 -1
- package/src/generated/zod/readiness-probe-schema.ts +3 -3
- package/src/generated/zod/release-request-schema.ts +1 -1
- package/src/generated/zod/remote-stack-management-outputs-schema.ts +3 -3
- package/src/generated/zod/remote-stack-management-schema.ts +3 -3
- package/src/generated/zod/replica-status-schema.ts +4 -4
- package/src/generated/zod/resource-entry-schema.ts +5 -5
- package/src/generated/zod/resource-lifecycle-schema.ts +2 -2
- package/src/generated/zod/resource-ref-schema.ts +2 -2
- package/src/generated/zod/resource-spec-schema.ts +1 -1
- package/src/generated/zod/resource-status-schema.ts +1 -1
- package/src/generated/zod/resource-type-schema.ts +1 -1
- package/src/generated/zod/response-handling-schema.ts +2 -2
- package/src/generated/zod/scheduled-event-schema.ts +2 -2
- package/src/generated/zod/service-account-outputs-schema.ts +1 -1
- package/src/generated/zod/service-account-schema.ts +2 -2
- package/src/generated/zod/stack-ref-schema.ts +1 -1
- package/src/generated/zod/stack-resource-state-schema.ts +13 -13
- package/src/generated/zod/stack-schema.ts +3 -3
- package/src/generated/zod/stack-settings-schema.ts +13 -10
- package/src/generated/zod/stack-state-schema.ts +3 -3
- package/src/generated/zod/stack-status-schema.ts +1 -1
- package/src/generated/zod/storage-event-schema.ts +13 -13
- package/src/generated/zod/storage-event-type-schema.ts +1 -1
- package/src/generated/zod/storage-events-schema.ts +2 -2
- package/src/generated/zod/storage-outputs-schema.ts +1 -1
- package/src/generated/zod/storage-schema.ts +4 -4
- package/src/generated/zod/storage-upload-schema.ts +3 -3
- package/src/generated/zod/submit-response-request-schema.ts +2 -2
- package/src/generated/zod/telemetry-mode-schema.ts +1 -1
- package/src/generated/zod/toolchain-config-schema.ts +5 -5
- package/src/generated/zod/updates-mode-schema.ts +3 -3
- package/src/generated/zod/upload-complete-request-schema.ts +1 -1
- package/src/generated/zod/upload-complete-response-schema.ts +3 -3
- package/src/generated/zod/vault-outputs-schema.ts +1 -1
- package/src/generated/zod/vault-schema.ts +1 -1
- package/src/index.ts +2 -2
- package/src/generated/schemas/imagePullCredentials.json +0 -1
- package/src/generated/zod/image-pull-credentials-schema.ts +0 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"object","description":"Represents the collective state of all resources in a stack, including platform and pending actions.","required":["platform","resources","resourcePrefix"],"properties":{"platform":{"description":"The target platform for this stack state.","type":"string","enum":["aws","gcp","azure","kubernetes","local","test"],"x-readme-ref-name":"Platform"},"resourcePrefix":{"type":"string","description":"A prefix used for resource naming to ensure uniqueness across deployments."},"resources":{"type":"object","description":"The state of individual resources, keyed by resource ID.","additionalProperties":{"type":"object","description":"Represents the state of a single resource within the stack for a specific platform.","required":["type","status","config"],"properties":{"_internal":{"description":"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."},"config":{"description":"The current resource configuration.","type":"object","required":["type","id"],"properties":{"id":{"type":"string","description":"The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters."},"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResource"},"dependencies":{"type":"array","items":{"type":"object","description":"New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.","required":["type","id"],"properties":{"id":{"type":"string"},"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"x-readme-ref-name":"ResourceRef"},"description":"Complete list of dependencies for this resource, including infrastructure dependencies.\nThis preserves the full dependency information from the stack definition."},"error":{"oneOf":[{"type":"null"},{"description":"Stores the last error encountered during a failed step transition.","type":"object","required":["code","message","retryable","internal"],"properties":{"code":{"type":"string","description":"A unique identifier for the type of error.\n\nThis should be a short, machine-readable string that can be used\nby clients to programmatically handle different error types.\nExamples: \"NOT_FOUND\", \"VALIDATION_ERROR\", \"TIMEOUT\"","example":"NOT_FOUND","maxLength":128},"context":{"description":"Additional diagnostic information about the error context.\n\nThis optional field can contain structured data providing more details\nabout the error, such as validation errors, request parameters that\ncaused the issue, or other relevant context information."},"httpStatusCode":{"type":["integer","null"],"format":"int32","description":"HTTP status code for this error.\n\nUsed when converting the error to an HTTP response. If None, falls back to\nthe error type's default status code or 500.","maximum":599,"minimum":100},"internal":{"type":"boolean","description":"Indicates if this is an internal error that should not be exposed to users.\n\nWhen `true`, this error contains sensitive information or implementation\ndetails that should not be shown to end-users. Such errors should be\nlogged for debugging but replaced with generic error messages in responses."},"message":{"type":"string","description":"Human-readable error message.\n\nThis message should be clear and actionable for developers or end-users,\nproviding context about what went wrong and potentially how to fix it.","example":"Item not found.","maxLength":16384},"retryable":{"type":"boolean","description":"Indicates whether the operation that caused the error should be retried.\n\nWhen `true`, the error is transient and the operation might succeed\nif attempted again. When `false`, retrying the same operation is\nunlikely to succeed without changes.","default":false},"source":{"description":"The underlying error that caused this error, creating an error chain.\n\nThis allows for proper error propagation and debugging by maintaining\nthe full context of how an error occurred through multiple layers\nof an application."}},"x-readme-ref-name":"AlienError"}]},"isExternallyProvisioned":{"type":"boolean","description":"True if the resource was provisioned by an external system (e.g., CloudFormation).\nDefaults to false, indicating dynamic provisioning by the executor."},"lastFailedState":{"description":"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."},"lifecycle":{"oneOf":[{"type":"null"},{"description":"The lifecycle of the resource (Frozen
|
|
1
|
+
{"type":"object","description":"Represents the collective state of all resources in a stack, including platform and pending actions.","required":["platform","resources","resourcePrefix"],"properties":{"platform":{"description":"The target platform for this stack state.","type":"string","enum":["aws","gcp","azure","kubernetes","local","test"],"x-readme-ref-name":"Platform"},"resourcePrefix":{"type":"string","description":"A prefix used for resource naming to ensure uniqueness across deployments."},"resources":{"type":"object","description":"The state of individual resources, keyed by resource ID.","additionalProperties":{"type":"object","description":"Represents the state of a single resource within the stack for a specific platform.","required":["type","status","config"],"properties":{"_internal":{"description":"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."},"config":{"description":"The current resource configuration.","type":"object","required":["type","id"],"properties":{"id":{"type":"string","description":"The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters."},"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResource"},"dependencies":{"type":"array","items":{"type":"object","description":"New ResourceRef that works with any resource type.\nThis can eventually replace the enum-based ResourceRef for full extensibility.","required":["type","id"],"properties":{"id":{"type":"string"},"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"x-readme-ref-name":"ResourceRef"},"description":"Complete list of dependencies for this resource, including infrastructure dependencies.\nThis preserves the full dependency information from the stack definition."},"error":{"oneOf":[{"type":"null"},{"description":"Stores the last error encountered during a failed step transition.","type":"object","required":["code","message","retryable","internal"],"properties":{"code":{"type":"string","description":"A unique identifier for the type of error.\n\nThis should be a short, machine-readable string that can be used\nby clients to programmatically handle different error types.\nExamples: \"NOT_FOUND\", \"VALIDATION_ERROR\", \"TIMEOUT\"","example":"NOT_FOUND","maxLength":128},"context":{"description":"Additional diagnostic information about the error context.\n\nThis optional field can contain structured data providing more details\nabout the error, such as validation errors, request parameters that\ncaused the issue, or other relevant context information."},"hint":{"type":["string","null"],"description":"Optional human-facing remediation hint."},"httpStatusCode":{"type":["integer","null"],"format":"int32","description":"HTTP status code for this error.\n\nUsed when converting the error to an HTTP response. If None, falls back to\nthe error type's default status code or 500.","maximum":599,"minimum":100},"internal":{"type":"boolean","description":"Indicates if this is an internal error that should not be exposed to users.\n\nWhen `true`, this error contains sensitive information or implementation\ndetails that should not be shown to end-users. Such errors should be\nlogged for debugging but replaced with generic error messages in responses."},"message":{"type":"string","description":"Human-readable error message.\n\nThis message should be clear and actionable for developers or end-users,\nproviding context about what went wrong and potentially how to fix it.","example":"Item not found.","maxLength":16384},"retryable":{"type":"boolean","description":"Indicates whether the operation that caused the error should be retried.\n\nWhen `true`, the error is transient and the operation might succeed\nif attempted again. When `false`, retrying the same operation is\nunlikely to succeed without changes.","default":false},"source":{"description":"The underlying error that caused this error, creating an error chain.\n\nThis allows for proper error propagation and debugging by maintaining\nthe full context of how an error occurred through multiple layers\nof an application."}},"x-readme-ref-name":"AlienError"}]},"isExternallyProvisioned":{"type":"boolean","description":"True if the resource was provisioned by an external system (e.g., CloudFormation).\nDefaults to false, indicating dynamic provisioning by the executor."},"lastFailedState":{"description":"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."},"lifecycle":{"oneOf":[{"type":"null"},{"description":"The lifecycle of the resource (Frozen or Live).\nDefaults to Live if not specified.","type":"string","enum":["frozen","live"],"x-readme-ref-name":"ResourceLifecycle"}]},"outputs":{"oneOf":[{"type":"null"},{"description":"Outputs generated by the resource (e.g., ARN, URL, Bucket Name).","type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResourceOutputs"}]},"previousConfig":{"oneOf":[{"type":"null"},{"description":"The previous resource configuration during updates.\nThis is set when an update is initiated and cleared when the update completes or fails.","type":"object","required":["type","id"],"properties":{"id":{"type":"string","description":"The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters."},"type":{"type":"string","description":"Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.","examples":["function","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResource"}]},"remoteBindingParams":{"description":"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()."},"retryAttempt":{"type":"integer","format":"int32","description":"Tracks consecutive retry attempts for the current state transition.","minimum":0},"status":{"description":"High-level status derived from the internal state.","type":"string","enum":["pending","provisioning","provision-failed","running","updating","update-failed","deleting","delete-failed","deleted","refresh-failed"],"x-readme-ref-name":"ResourceStatus"},"type":{"type":"string","description":"The high-level type of the resource (e.g., Function::RESOURCE_TYPE, Storage::RESOURCE_TYPE)."}},"x-readme-ref-name":"StackResourceState"},"propertyNames":{"type":"string"}}},"x-readme-ref-name":"StackState"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"type":"string","description":"How updates are delivered to the
|
|
1
|
+
{"type":"string","description":"How updates are delivered to the deployment.","enum":["auto","approval-required"],"x-readme-ref-name":"UpdatesMode"}
|
|
@@ -3,25 +3,26 @@
|
|
|
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 { DeploymentStatusSchema } from "./deployment-status-schema.js";
|
|
8
9
|
import { DevResourceInfoSchema } from "./dev-resource-info-schema.js";
|
|
9
|
-
import { z } from "zod/v4";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* @description Status of a single agent in the dev server
|
|
13
13
|
*/
|
|
14
14
|
export const AgentStatusSchema = z.object({
|
|
15
|
-
"
|
|
16
|
-
|
|
15
|
+
"commandsUrl": z.string().describe("Commands endpoint URL for the deployment").nullish(),
|
|
16
|
+
"createdAt": z.string().describe("ISO 8601 timestamp when agent was created"),
|
|
17
|
+
get "error"(){
|
|
17
18
|
return z.union([AlienErrorSchema, z.null()]).optional()
|
|
18
19
|
},
|
|
19
20
|
"id": z.string().describe("Agent ID (e.g., ag_xyz123)"),
|
|
20
21
|
"name": z.string().describe("Agent name (from --agent-name flag)"),
|
|
21
22
|
"resources": z.object({
|
|
22
23
|
|
|
23
|
-
}).catchall(DevResourceInfoSchema.describe("Information about a deployed resource")).describe("Resources deployed by this agent (keyed by resource name)"),
|
|
24
|
-
get status(){
|
|
24
|
+
}).catchall(z.lazy(() => DevResourceInfoSchema).describe("Information about a deployed resource")).describe("Resources deployed by this agent (keyed by resource name)"),
|
|
25
|
+
get "status"(){
|
|
25
26
|
return DeploymentStatusSchema.describe("Deployment status in the deployment lifecycle")
|
|
26
27
|
}
|
|
27
28
|
}).describe("Status of a single agent in the dev server")
|
|
@@ -3,19 +3,20 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Canonical error container that provides a structured way to represent errors\nwith rich metadata including error codes, human-readable messages, context,\nand chaining capabilities for error propagation.\n\nThis struct is designed to be both machine-readable and user-friendly,\nsupporting serialization for API responses and detailed error reporting\nin distributed systems.
|
|
10
10
|
*/
|
|
11
11
|
export const AlienErrorSchema = z.object({
|
|
12
12
|
"code": z.string().max(128).describe("A unique identifier for the type of error.\n\nThis should be a short, machine-readable string that can be used\nby clients to programmatically handle different error types.\nExamples: \"NOT_FOUND\", \"VALIDATION_ERROR\", \"TIMEOUT\""),
|
|
13
|
-
"context": z.any().optional
|
|
14
|
-
"
|
|
13
|
+
"context": z.optional(z.any().describe("Additional diagnostic information about the error context.\n\nThis optional field can contain structured data providing more details\nabout the error, such as validation errors, request parameters that\ncaused the issue, or other relevant context information.")),
|
|
14
|
+
"hint": z.string().describe("Optional human-facing remediation hint.").nullish(),
|
|
15
|
+
"httpStatusCode": z.int().min(100).max(599).describe("HTTP status code for this error.\n\nUsed when converting the error to an HTTP response. If None, falls back to\nthe error type's default status code or 500.").nullish(),
|
|
15
16
|
"internal": z.boolean().describe("Indicates if this is an internal error that should not be exposed to users.\n\nWhen `true`, this error contains sensitive information or implementation\ndetails that should not be shown to end-users. Such errors should be\nlogged for debugging but replaced with generic error messages in responses."),
|
|
16
17
|
"message": z.string().max(16384).describe("Human-readable error message.\n\nThis message should be clear and actionable for developers or end-users,\nproviding context about what went wrong and potentially how to fix it."),
|
|
17
18
|
"retryable": z.boolean().default(false).describe("Indicates whether the operation that caused the error should be retried.\n\nWhen `true`, the error is transient and the operation might succeed\nif attempted again. When `false`, retrying the same operation is\nunlikely to succeed without changes."),
|
|
18
|
-
"source": z.any().
|
|
19
|
+
"source": z.optional(z.any().describe("The underlying error that caused this error, creating an error chain.\n\nThis allows for proper error propagation and debugging by maintaining\nthe full context of how an error occurred through multiple layers\nof an application."))
|
|
19
20
|
}).describe("Canonical error container that provides a structured way to represent errors\nwith rich metadata including error codes, human-readable messages, context,\nand chaining capabilities for error propagation.\n\nThis struct is designed to be both machine-readable and user-friendly,\nsupporting serialization for API responses and detailed error reporting\nin distributed systems.")
|
|
20
21
|
|
|
21
22
|
export type AlienError = z.infer<typeof AlienErrorSchema>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { PushProgressSchema } from "./push-progress-schema.js";
|
|
7
8
|
import { StackStateSchema } from "./stack-state-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description Represents all possible events in the Alien system
|
|
@@ -26,7 +26,7 @@ export const AlienEventSchema = z.union([z.object({
|
|
|
26
26
|
"type": z.enum(["DownloadingAlienRuntime"]),
|
|
27
27
|
"url": z.string().describe("URL being downloaded from")
|
|
28
28
|
}), z.object({
|
|
29
|
-
"relatedResources": z.array(z.string()).describe("All resource names sharing this build (for deduped container groups)")
|
|
29
|
+
"relatedResources": z.optional(z.array(z.string()).describe("All resource names sharing this build (for deduped container groups)")),
|
|
30
30
|
"resourceName": z.string().describe("Name of the resource being built"),
|
|
31
31
|
"resourceType": z.string().describe("Type of the resource: \"function\", \"container\", \"worker\""),
|
|
32
32
|
"type": z.enum(["BuildingResource"])
|
|
@@ -35,7 +35,7 @@ export const AlienEventSchema = z.union([z.object({
|
|
|
35
35
|
"type": z.enum(["BuildingImage"])
|
|
36
36
|
}), z.object({
|
|
37
37
|
"image": z.string().describe("Name of the image being pushed"),
|
|
38
|
-
get progress(){
|
|
38
|
+
get "progress"(){
|
|
39
39
|
return z.union([PushProgressSchema, z.null()]).optional()
|
|
40
40
|
},
|
|
41
41
|
"type": z.enum(["PushingImage"])
|
|
@@ -52,13 +52,13 @@ get progress(){
|
|
|
52
52
|
"type": z.enum(["CreatingRelease"])
|
|
53
53
|
}), z.object({
|
|
54
54
|
"language": z.string().describe("Language being compiled (rust, typescript, etc.)"),
|
|
55
|
-
"progress": z.string().describe("Current progress/status line from the build output").
|
|
55
|
+
"progress": z.string().describe("Current progress/status line from the build output").nullish(),
|
|
56
56
|
"type": z.enum(["CompilingCode"])
|
|
57
57
|
}), z.object({
|
|
58
|
-
get nextState(){
|
|
58
|
+
get "nextState"(){
|
|
59
59
|
return StackStateSchema.describe("Represents the collective state of all resources in a stack, including platform and pending actions.")
|
|
60
60
|
},
|
|
61
|
-
"suggestedDelayMs": z.int().min(0).describe("An suggested duration to wait before executing the next step.").
|
|
61
|
+
"suggestedDelayMs": z.int().min(0).describe("An suggested duration to wait before executing the next step.").nullish(),
|
|
62
62
|
"type": z.enum(["StackStep"])
|
|
63
63
|
}), z.object({
|
|
64
64
|
"type": z.enum(["GeneratingCloudFormationTemplate"])
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Outputs generated by a successfully provisioned ArtifactRegistry.
|
|
10
10
|
*/
|
|
11
11
|
export const ArtifactRegistryOutputsSchema = z.object({
|
|
12
|
-
"pullRole": z.string().describe("Role/principal identifier for pull-only access.\n- AWS: IAM role ARN (e.g., \"arn:aws:iam::123456789012:role/my-stack-my-registry-pull\")\n- GCP: Service account email (e.g., \"my-stack-my-registry-pull@my-project.iam.gserviceaccount.com\")\n- Azure: Managed identity resource ID (e.g., \"/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-registry-pull\")").
|
|
13
|
-
"pushRole": z.string().describe("Role/principal identifier for push and pull access.\n- AWS: IAM role ARN (e.g., \"arn:aws:iam::123456789012:role/my-stack-my-registry-push\")\n- GCP: Service account email (e.g., \"my-stack-my-registry-push@my-project.iam.gserviceaccount.com\")\n- Azure: Managed identity resource ID (e.g., \"/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-registry-push\")").
|
|
12
|
+
"pullRole": z.string().describe("Role/principal identifier for pull-only access.\n- AWS: IAM role ARN (e.g., \"arn:aws:iam::123456789012:role/my-stack-my-registry-pull\")\n- GCP: Service account email (e.g., \"my-stack-my-registry-pull@my-project.iam.gserviceaccount.com\")\n- Azure: Managed identity resource ID (e.g., \"/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-registry-pull\")").nullish(),
|
|
13
|
+
"pushRole": z.string().describe("Role/principal identifier for push and pull access.\n- AWS: IAM role ARN (e.g., \"arn:aws:iam::123456789012:role/my-stack-my-registry-push\")\n- GCP: Service account email (e.g., \"my-stack-my-registry-push@my-project.iam.gserviceaccount.com\")\n- Azure: Managed identity resource ID (e.g., \"/subscriptions/.../resourceGroups/.../providers/Microsoft.ManagedIdentity/userAssignedIdentities/my-registry-push\")").nullish(),
|
|
14
14
|
"registryEndpoint": z.string().describe("The registry endpoint for docker operations.\n- AWS: ECR registry URL (e.g., \"123456789012.dkr.ecr.us-west-2.amazonaws.com\")\n- GCP: Artifact Registry URL (e.g., \"us-central1-docker.pkg.dev/my-project\")\n- Azure: Container registry login server (e.g., \"myregistry.azurecr.io\")"),
|
|
15
15
|
"registryId": z.string().describe("The platform-specific registry identifier.\n- AWS: Account and region (e.g., \"123456789012:us-west-2\")\n- GCP: Full registry name (e.g., \"projects/my-project/locations/us-central1\")\n- Azure: Registry resource ID (e.g., \"/subscriptions/.../resourceGroups/.../providers/Microsoft.ContainerRegistry/registries/myregistry\")")
|
|
16
16
|
}).describe("Outputs generated by a successfully provisioned ArtifactRegistry.")
|
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Represents an artifact registry for storing container images and other build artifacts.\nThis is a high-level wrapper resource that provides a cloud-agnostic interface over\nAWS ECR, GCP Artifact Registry, and Azure Container Registry.\n\n# Platform Mapping\n- **AWS**: Implicitly exists as the AWS account and region\n- **GCP**: Explicitly configured per project and location (Artifact Registry API enabled)\n- **Azure**: Explicitly provisioned Azure Container Registry instance\n\nThe actual repository management and permissions are handled through the bindings API.
|
|
10
10
|
*/
|
|
11
11
|
export const ArtifactRegistrySchema = z.object({
|
|
12
|
-
"id": z.string().describe("Identifier for the artifact registry. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters.")
|
|
12
|
+
"id": z.string().describe("Identifier for the artifact registry. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters."),
|
|
13
|
+
"replicationRegions": z.optional(z.array(z.string()).describe("AWS-only: regions to replicate container images to.\nECR private image replication ensures images pushed in the registry's home region\nare automatically available in these additional regions (required when Lambda or\nother compute runs in a different region from the registry)."))
|
|
13
14
|
}).describe("Represents an artifact registry for storing container images and other build artifacts.\nThis is a high-level wrapper resource that provides a cloud-agnostic interface over\nAWS ECR, GCP Artifact Registry, and Azure Container Registry.\n\n# Platform Mapping\n- **AWS**: Implicitly exists as the AWS account and region\n- **GCP**: Explicitly configured per project and location (Artifact Registry API enabled)\n- **Azure**: Explicitly provisioned Azure Container Registry instance\n\nThe actual repository management and permissions are handled through the bindings API.")
|
|
14
15
|
|
|
15
16
|
export type ArtifactRegistry = z.infer<typeof ArtifactRegistrySchema>
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { BindingConfigurationAwsBindingSpecSchema } from "./binding-configuration-aws-binding-spec-schema.js";
|
|
7
8
|
import { PermissionGrantSchema } from "./permission-grant-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description AWS-specific platform permission configuration
|
|
12
12
|
*/
|
|
13
13
|
export const AwsPlatformPermissionSchema = z.object({
|
|
14
|
-
get binding(){
|
|
14
|
+
get "binding"(){
|
|
15
15
|
return BindingConfigurationAwsBindingSpecSchema.describe("Generic binding configuration for permissions")
|
|
16
16
|
},
|
|
17
|
-
get grant(){
|
|
17
|
+
get "grant"(){
|
|
18
18
|
return PermissionGrantSchema.describe("Grant permissions for a specific cloud platform")
|
|
19
19
|
}
|
|
20
20
|
}).describe("AWS-specific platform permission configuration")
|
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Azure management configuration extracted from stack settings
|
|
10
10
|
*/
|
|
11
11
|
export const AzureManagementConfigSchema = z.object({
|
|
12
|
-
"managementPrincipalId": z.string().describe("
|
|
13
|
-
"managingTenantId": z.string().describe("The managing Azure Tenant ID for cross-tenant access")
|
|
12
|
+
"managementPrincipalId": z.string().describe("Management service principal object ID for local development fallback").nullish(),
|
|
13
|
+
"managingTenantId": z.string().describe("The managing Azure Tenant ID for cross-tenant access"),
|
|
14
|
+
"oidcIssuer": z.string().describe("OIDC issuer URL for federated identity credential creation").nullish(),
|
|
15
|
+
"oidcSubject": z.string().describe("OIDC subject claim for federated identity credential creation").nullish()
|
|
14
16
|
}).describe("Azure management configuration extracted from stack settings")
|
|
15
17
|
|
|
16
18
|
export type AzureManagementConfig = z.infer<typeof AzureManagementConfigSchema>
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { BindingConfigurationAzureBindingSpecSchema } from "./binding-configuration-azure-binding-spec-schema.js";
|
|
7
8
|
import { PermissionGrantSchema } from "./permission-grant-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description Azure-specific platform permission configuration
|
|
12
12
|
*/
|
|
13
13
|
export const AzurePlatformPermissionSchema = z.object({
|
|
14
|
-
get binding(){
|
|
14
|
+
get "binding"(){
|
|
15
15
|
return BindingConfigurationAzureBindingSpecSchema.describe("Generic binding configuration for permissions")
|
|
16
16
|
},
|
|
17
|
-
get grant(){
|
|
17
|
+
get "grant"(){
|
|
18
18
|
return PermissionGrantSchema.describe("Grant permissions for a specific cloud platform")
|
|
19
19
|
}
|
|
20
20
|
}).describe("Azure-specific platform permission configuration")
|
|
@@ -3,14 +3,14 @@
|
|
|
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 Resource outputs that can hold output data for any resource type in the Alien system. All resource outputs share a common \'type\' field with additional type-specific output properties.
|
|
11
11
|
*/
|
|
12
12
|
export const BaseResourceOutputsSchema = z.object({
|
|
13
|
-
get type(){
|
|
13
|
+
get "type"(){
|
|
14
14
|
return ResourceTypeSchema.describe("Resource type identifier that determines the specific kind of resource. This field is used for polymorphic deserialization and resource-specific behavior.")
|
|
15
15
|
}
|
|
16
16
|
}).catchall(z.any()).describe("Resource outputs that can hold output data for any resource type in the Alien system. All resource outputs share a common 'type' field with additional type-specific output properties.")
|
|
@@ -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 Resource that can hold any resource type in the Alien system. All resources share common \'type\' and \'id\' fields with additional type-specific properties.
|
|
11
11
|
*/
|
|
12
12
|
export const BaseResourceSchema = z.object({
|
|
13
13
|
"id": z.string().describe("The unique identifier for this specific resource instance. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]). Maximum 64 characters."),
|
|
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
|
}).catchall(z.any()).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.")
|
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Generic binding configuration for permissions
|
|
10
10
|
*/
|
|
11
11
|
export const BindingConfigurationAwsBindingSpecSchema = z.object({
|
|
12
|
-
"resource": z.object({
|
|
12
|
+
"resource": z.optional(z.object({
|
|
13
13
|
"condition": z.object({
|
|
14
14
|
|
|
15
15
|
}).catchall(z.object({
|
|
16
16
|
|
|
17
|
-
}).catchall(z.string())).describe("Optional condition for additional filtering (rare)").
|
|
17
|
+
}).catchall(z.string())).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
18
18
|
"resources": z.array(z.string()).describe("Resource ARNs to bind to")
|
|
19
|
-
}).describe("AWS-specific binding specification")
|
|
20
|
-
"stack": z.object({
|
|
19
|
+
}).describe("AWS-specific binding specification")),
|
|
20
|
+
"stack": z.optional(z.object({
|
|
21
21
|
"condition": z.object({
|
|
22
22
|
|
|
23
23
|
}).catchall(z.object({
|
|
24
24
|
|
|
25
|
-
}).catchall(z.string())).describe("Optional condition for additional filtering (rare)").
|
|
25
|
+
}).catchall(z.string())).describe("Optional condition for additional filtering (rare)").nullish(),
|
|
26
26
|
"resources": z.array(z.string()).describe("Resource ARNs to bind to")
|
|
27
|
-
}).describe("AWS-specific binding specification")
|
|
27
|
+
}).describe("AWS-specific binding specification"))
|
|
28
28
|
}).describe("Generic binding configuration for permissions")
|
|
29
29
|
|
|
30
30
|
export type BindingConfigurationAwsBindingSpec = z.infer<typeof BindingConfigurationAwsBindingSpecSchema>
|
|
@@ -3,18 +3,18 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* @description Generic binding configuration for permissions
|
|
10
10
|
*/
|
|
11
11
|
export const BindingConfigurationAzureBindingSpecSchema = z.object({
|
|
12
|
-
"resource": z.object({
|
|
12
|
+
"resource": z.optional(z.object({
|
|
13
13
|
"scope": z.string().describe("Scope (subscription/resource group/resource level)")
|
|
14
|
-
}).describe("Azure-specific binding specification")
|
|
15
|
-
"stack": z.object({
|
|
14
|
+
}).describe("Azure-specific binding specification")),
|
|
15
|
+
"stack": z.optional(z.object({
|
|
16
16
|
"scope": z.string().describe("Scope (subscription/resource group/resource level)")
|
|
17
|
-
}).describe("Azure-specific binding specification")
|
|
17
|
+
}).describe("Azure-specific binding specification"))
|
|
18
18
|
}).describe("Generic binding configuration for permissions")
|
|
19
19
|
|
|
20
20
|
export type BindingConfigurationAzureBindingSpec = z.infer<typeof BindingConfigurationAzureBindingSpecSchema>
|
|
@@ -3,25 +3,25 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { GcpConditionSchema } from "./gcp-condition-schema.js";
|
|
7
|
-
import { z } from "zod/v4";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @description Generic binding configuration for permissions
|
|
11
11
|
*/
|
|
12
12
|
export const BindingConfigurationGcpBindingSpecSchema = z.object({
|
|
13
|
-
"resource": z.object({
|
|
14
|
-
get condition(){
|
|
13
|
+
"resource": z.optional(z.object({
|
|
14
|
+
get "condition"(){
|
|
15
15
|
return z.union([GcpConditionSchema, z.null()]).optional()
|
|
16
16
|
},
|
|
17
17
|
"scope": z.string().describe("Scope (project/resource level)")
|
|
18
|
-
}).describe("GCP-specific binding specification")
|
|
19
|
-
"stack": z.object({
|
|
20
|
-
get condition(){
|
|
18
|
+
}).describe("GCP-specific binding specification")),
|
|
19
|
+
"stack": z.optional(z.object({
|
|
20
|
+
get "condition"(){
|
|
21
21
|
return z.union([GcpConditionSchema, z.null()]).optional()
|
|
22
22
|
},
|
|
23
23
|
"scope": z.string().describe("Scope (project/resource level)")
|
|
24
|
-
}).describe("GCP-specific binding specification")
|
|
24
|
+
}).describe("GCP-specific binding specification"))
|
|
25
25
|
}).describe("Generic binding configuration for permissions")
|
|
26
26
|
|
|
27
27
|
export type BindingConfigurationGcpBindingSpec = z.infer<typeof BindingConfigurationGcpBindingSpecSchema>
|
|
@@ -3,8 +3,8 @@
|
|
|
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 Body specification supporting inline and storage modes
|
|
@@ -14,11 +14,11 @@ export const BodySpecSchema = z.union([z.object({
|
|
|
14
14
|
"mode": z.enum(["inline"])
|
|
15
15
|
}), z.object({
|
|
16
16
|
"mode": z.enum(["storage"]),
|
|
17
|
-
"size": z.int().min(0).describe("Size of the body in bytes").
|
|
18
|
-
get storageGetRequest(){
|
|
17
|
+
"size": z.int().min(0).describe("Size of the body in bytes").nullish(),
|
|
18
|
+
get "storageGetRequest"(){
|
|
19
19
|
return z.union([PresignedRequestSchema, z.null()]).optional()
|
|
20
20
|
},
|
|
21
|
-
"storagePutUsed": z.boolean().describe("Indicates storage upload was used for response submission").
|
|
21
|
+
"storagePutUsed": z.boolean().describe("Indicates storage upload was used for response submission").nullish()
|
|
22
22
|
})]).describe("Body specification supporting inline and storage modes")
|
|
23
23
|
|
|
24
24
|
export type BodySpec = z.infer<typeof BodySpecSchema>
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { ComputeTypeSchema } from "./compute-type-schema.js";
|
|
7
8
|
import { MonitoringConfigSchema } from "./monitoring-config-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description Configuration for starting a build.
|
|
12
12
|
*/
|
|
13
13
|
export const BuildConfigSchema = z.object({
|
|
14
|
-
get computeType(){
|
|
14
|
+
get "computeType"(){
|
|
15
15
|
return ComputeTypeSchema.describe("Compute type for build resources.").optional()
|
|
16
16
|
},
|
|
17
|
-
"environment": z.object({
|
|
17
|
+
"environment": z.optional(z.object({
|
|
18
18
|
|
|
19
|
-
}).catchall(z.string()).describe("Key-value pairs to set as environment variables for the build.")
|
|
19
|
+
}).catchall(z.string()).describe("Key-value pairs to set as environment variables for the build.")),
|
|
20
20
|
"image": z.string().describe("Base container image to use for the build environment."),
|
|
21
|
-
get monitoring(){
|
|
21
|
+
get "monitoring"(){
|
|
22
22
|
return z.union([MonitoringConfigSchema, z.null()]).optional()
|
|
23
23
|
},
|
|
24
24
|
"script": z.string().describe("Bash script to execute for the build."),
|
|
@@ -3,22 +3,22 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { ComputeTypeSchema } from "./compute-type-schema.js";
|
|
7
8
|
import { ResourceRefSchema } from "./resource-ref-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description Represents a build resource that executes bash scripts to build code.\nBuilds are designed to be stateless and can be triggered on-demand to compile,\ntest, or package application code.
|
|
12
12
|
*/
|
|
13
13
|
export const BuildSchema = z.object({
|
|
14
|
-
get computeType(){
|
|
14
|
+
get "computeType"(){
|
|
15
15
|
return ComputeTypeSchema.describe("Compute type for build resources.").optional()
|
|
16
16
|
},
|
|
17
|
-
"environment": z.object({
|
|
17
|
+
"environment": z.optional(z.object({
|
|
18
18
|
|
|
19
|
-
}).catchall(z.string()).describe("Key-value pairs to set as environment variables for the build.")
|
|
19
|
+
}).catchall(z.string()).describe("Key-value pairs to set as environment variables for the build.")),
|
|
20
20
|
"id": z.string().describe("Identifier for the build resource. Must contain only alphanumeric characters, hyphens, and underscores ([A-Za-z0-9-_]).\nMaximum 64 characters."),
|
|
21
|
-
get links(){
|
|
21
|
+
get "links"(){
|
|
22
22
|
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("List of resource references this build depends on.")
|
|
23
23
|
},
|
|
24
24
|
"permissions": z.string().describe("Permission profile name that defines the permissions granted to this build.\nThis references a profile defined in the stack's permission definitions.")
|
|
@@ -3,20 +3,20 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { BodySpecSchema } from "./body-spec-schema.js";
|
|
7
|
-
import { z } from "zod/v4";
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* @description Command response from deployment
|
|
11
11
|
*/
|
|
12
12
|
export const CommandResponseSchema = z.union([z.object({
|
|
13
|
-
get response(){
|
|
13
|
+
get "response"(){
|
|
14
14
|
return BodySpecSchema.describe("Body specification supporting inline and storage modes")
|
|
15
15
|
},
|
|
16
16
|
"status": z.enum(["success"])
|
|
17
17
|
}), z.object({
|
|
18
18
|
"code": z.string().describe("Error code"),
|
|
19
|
-
"details": z.string().describe("Optional additional details").
|
|
19
|
+
"details": z.string().describe("Optional additional details").nullish(),
|
|
20
20
|
"message": z.string().describe("Error message"),
|
|
21
21
|
"status": z.enum(["error"])
|
|
22
22
|
})]).describe("Command response from deployment")
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import
|
|
6
|
+
import * as z from "zod";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
* @description Command states in the
|
|
9
|
+
* @description Command states in the Commands protocol lifecycle
|
|
10
10
|
*/
|
|
11
|
-
export const CommandStateSchema = z.enum(["PENDING_UPLOAD", "PENDING", "DISPATCHED", "SUCCEEDED", "FAILED", "EXPIRED"]).describe("Command states in the
|
|
11
|
+
export const CommandStateSchema = z.enum(["PENDING_UPLOAD", "PENDING", "DISPATCHED", "SUCCEEDED", "FAILED", "EXPIRED"]).describe("Command states in the Commands protocol lifecycle")
|
|
12
12
|
|
|
13
13
|
export type CommandState = z.infer<typeof CommandStateSchema>
|
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
+
import * as z from "zod";
|
|
6
7
|
import { CommandResponseSchema } from "./command-response-schema.js";
|
|
7
8
|
import { CommandStateSchema } from "./command-state-schema.js";
|
|
8
|
-
import { z } from "zod/v4";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* @description Response to status queries
|
|
@@ -13,11 +13,11 @@ import { z } from "zod/v4";
|
|
|
13
13
|
export const CommandStatusResponseSchema = z.object({
|
|
14
14
|
"attempt": z.int().min(0).describe("Current attempt number"),
|
|
15
15
|
"commandId": z.string().describe("Command identifier"),
|
|
16
|
-
get response(){
|
|
16
|
+
get "response"(){
|
|
17
17
|
return z.union([CommandResponseSchema, z.null()]).optional()
|
|
18
18
|
},
|
|
19
|
-
get state(){
|
|
20
|
-
return CommandStateSchema.describe("Command states in the
|
|
19
|
+
get "state"(){
|
|
20
|
+
return CommandStateSchema.describe("Command states in the Commands protocol lifecycle")
|
|
21
21
|
}
|
|
22
22
|
}).describe("Response to status queries")
|
|
23
23
|
|