@alienplatform/core 1.5.1 → 1.7.1

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.
@@ -9,7 +9,7 @@ declare function getStackState(): {
9
9
  id: string;
10
10
  type: string;
11
11
  };
12
- status: "pending" | "provisioning" | "provision-failed" | "running" | "updating" | "update-failed" | "deleting" | "delete-failed" | "deleted" | "refresh-failed";
12
+ status: "pending" | "provisioning" | "provision-failed" | "running" | "updating" | "update-failed" | "deleting" | "delete-failed" | "teardown-required" | "deleted" | "refresh-failed";
13
13
  type: string;
14
14
  _internal?: any;
15
15
  controllerPlatform?: "aws" | "gcp" | "azure" | "kubernetes" | "local" | "test" | null | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alienplatform/core",
3
- "version": "1.5.1",
3
+ "version": "1.7.1",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -167,7 +167,7 @@ describe("AlienError.from() with JS Error types", () => {
167
167
  expect(alienError.code).toBe("GENERIC_ERROR")
168
168
  expect(alienError.message).toBe("Something went wrong")
169
169
  expect(alienError.retryable).toBe(false)
170
- expect(alienError.internal).toBe(false)
170
+ expect(alienError.internal).toBe(true)
171
171
  expect(alienError.httpStatusCode).toBe(500)
172
172
  expect(alienError.context?.originalError).toEqual({
173
173
  name: "Error",
@@ -175,6 +175,13 @@ describe("AlienError.from() with JS Error types", () => {
175
175
  stack: expect.any(String),
176
176
  })
177
177
  expect(alienError.context?.errorType).toBe("Error")
178
+ expect(alienError.toExternal()).toEqual({
179
+ code: "GENERIC_ERROR",
180
+ message: "Internal server error",
181
+ retryable: false,
182
+ internal: false,
183
+ httpStatusCode: 500,
184
+ })
178
185
  })
179
186
 
180
187
  it("converts TypeError", async () => {
@@ -557,7 +564,7 @@ describe("External API Sanitization", async () => {
557
564
  })
558
565
  })
559
566
 
560
- it("preserves non-internal errors deep in chain", async () => {
567
+ it("sanitizes unknown errors deep in otherwise public chains", async () => {
561
568
  const chainedError = (await AlienError.from(new Error("Network timeout")))
562
569
  .withContext(
563
570
  DatabaseError.create({
@@ -575,15 +582,15 @@ describe("External API Sanitization", async () => {
575
582
 
576
583
  const external = chainedError.toExternal()
577
584
 
578
- // All errors in this chain are non-internal, so should be preserved
579
585
  expect(external.code).toBe("AUTH_FAILED")
580
586
  expect((external.source as AlienErrorOptions)?.code).toBe("DATABASE_CONNECTION_FAILED")
581
- expect(((external.source as AlienErrorOptions)?.source as AlienErrorOptions)?.code).toBe(
582
- "GENERIC_ERROR",
583
- )
584
- expect(((external.source as AlienErrorOptions)?.source as AlienErrorOptions)?.message).toBe(
585
- "Network timeout",
586
- )
587
+ expect(((external.source as AlienErrorOptions)?.source as AlienErrorOptions)).toEqual({
588
+ code: "GENERIC_ERROR",
589
+ message: "Internal server error",
590
+ retryable: false,
591
+ internal: false,
592
+ httpStatusCode: 500,
593
+ })
587
594
  })
588
595
 
589
596
  it("handles mixed internal/external in chain", async () => {
package/src/error.ts CHANGED
@@ -388,7 +388,7 @@ export class AlienError<TContext extends z.ZodTypeAny = z.ZodAny> extends Error
388
388
  code: "GENERIC_ERROR",
389
389
  message: `HTTP request failed with status ${error.status}`,
390
390
  retryable: false,
391
- internal: false,
391
+ internal: true,
392
392
  httpStatusCode: error.status,
393
393
  context: {
394
394
  url: error.url,
@@ -409,7 +409,7 @@ export class AlienError<TContext extends z.ZodTypeAny = z.ZodAny> extends Error
409
409
  code: "GENERIC_ERROR",
410
410
  message: errorBody?.message || `HTTP request failed with status ${error.status}`,
411
411
  retryable: false,
412
- internal: false,
412
+ internal: true,
413
413
  httpStatusCode: error.status,
414
414
  context: {
415
415
  url: error.url,
@@ -438,7 +438,7 @@ export class AlienError<TContext extends z.ZodTypeAny = z.ZodAny> extends Error
438
438
  code: "GENERIC_ERROR",
439
439
  message,
440
440
  retryable: false,
441
- internal: false,
441
+ internal: true,
442
442
  httpStatusCode: 500,
443
443
  context: {
444
444
  originalError: serialized,
@@ -1 +1 @@
1
- {"type":"object","description":"Status of a single agent in the dev server","required":["id","name","status","resources","createdAt"],"properties":{"commandsUrl":{"type":["string","null"],"description":"Commands endpoint URL for the deployment"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when agent was created"},"error":{"oneOf":[{"type":"null"},{"description":"Error if this agent has failed","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"}]},"id":{"type":"string","description":"Deployment ID (e.g., dep_xyz123)"},"name":{"type":"string","description":"Agent name (from --agent-name flag)"},"resources":{"type":"object","description":"Resources deployed by this agent (keyed by resource name)","additionalProperties":{"type":"object","description":"Information about a deployed resource","required":["url"],"properties":{"resourceType":{"type":["string","null"],"description":"Resource type (\"worker\" | \"container\")"},"url":{"type":"string","description":"Resource URL (e.g., http://localhost:8080)"}},"x-readme-ref-name":"DevResourceInfo"},"propertyNames":{"type":"string"}},"status":{"description":"Deployment status (running, provisioning, etc.)","type":"string","enum":["pending","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}},"x-readme-ref-name":"AgentStatus"}
1
+ {"type":"object","description":"Status of a single agent in the dev server","required":["id","name","status","resources","createdAt"],"properties":{"commandsUrl":{"type":["string","null"],"description":"Commands endpoint URL for the deployment"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when agent was created"},"error":{"oneOf":[{"type":"null"},{"description":"Error if this agent has failed","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"}]},"id":{"type":"string","description":"Deployment ID (e.g., dep_xyz123)"},"name":{"type":"string","description":"Agent name (from --agent-name flag)"},"resources":{"type":"object","description":"Resources deployed by this agent (keyed by resource name)","additionalProperties":{"type":"object","description":"Information about a deployed resource","required":["url"],"properties":{"resourceType":{"type":["string","null"],"description":"Resource type (\"worker\" | \"container\")"},"url":{"type":"string","description":"Resource URL (e.g., http://localhost:8080)"}},"x-readme-ref-name":"DevResourceInfo"},"propertyNames":{"type":"string"}},"status":{"description":"Deployment status (running, provisioning, etc.)","type":"string","enum":["pending","preflights-failed","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","teardown-required","teardown-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}},"x-readme-ref-name":"AgentStatus"}
@@ -1 +1 @@
1
- {"oneOf":[{"type":"object","description":"Loading configuration file","required":["type"],"properties":{"type":{"type":"string","enum":["LoadingConfiguration"]}}},{"type":"object","description":"Operation finished successfully","required":["type"],"properties":{"type":{"type":"string","enum":["Finished"]}}},{"type":"object","description":"Stack packaging event","required":["stack","type"],"properties":{"stack":{"type":"string","description":"Name of the stack being built"},"type":{"type":"string","enum":["BuildingStack"]}}},{"type":"object","description":"Running build-time preflight checks and mutations","required":["stack","platform","type"],"properties":{"platform":{"type":"string","description":"Platform being targeted"},"stack":{"type":"string","description":"Name of the stack being checked"},"type":{"type":"string","enum":["RunningPreflights"]}}},{"type":"object","description":"Downloading alien runtime event","required":["targetTriple","url","type"],"properties":{"targetTriple":{"type":"string","description":"Target triple for the runtime"},"type":{"type":"string","enum":["DownloadingAlienRuntime"]},"url":{"type":"string","description":"URL being downloaded from"}}},{"type":"object","description":"Resource build event (function, container, or worker)","required":["resourceName","resourceType","type"],"properties":{"relatedResources":{"type":"array","items":{"type":"string"},"description":"All resource names sharing this build (for deduped container groups)"},"resourceName":{"type":"string","description":"Name of the resource being built"},"resourceType":{"type":"string","description":"Type of the resource: \"worker\", \"container\""},"type":{"type":"string","enum":["BuildingResource"]}}},{"type":"object","description":"Image build event","required":["image","type"],"properties":{"image":{"type":"string","description":"Name of the image being built"},"type":{"type":"string","enum":["BuildingImage"]}}},{"type":"object","description":"Image push event","required":["image","type"],"properties":{"image":{"type":"string","description":"Name of the image being pushed"},"progress":{"oneOf":[{"type":"null"},{"description":"Progress information for the push operation","type":"object","required":["operation","layersUploaded","totalLayers","bytesUploaded","totalBytes"],"properties":{"bytesUploaded":{"type":"integer","format":"int64","description":"Bytes uploaded so far","minimum":0},"layersUploaded":{"type":"integer","description":"Number of layers uploaded so far","minimum":0},"operation":{"type":"string","description":"Current operation being performed"},"totalBytes":{"type":"integer","format":"int64","description":"Total bytes to upload","minimum":0},"totalLayers":{"type":"integer","description":"Total number of layers to upload","minimum":0}},"x-readme-ref-name":"PushProgress"}]},"type":{"type":"string","enum":["PushingImage"]}}},{"type":"object","description":"Pushing stack images to registry","required":["stack","platform","type"],"properties":{"destination":{"type":["string","null"],"description":"Human-readable destination for pushed images"},"platform":{"type":"string","description":"Target platform"},"stack":{"type":"string","description":"Name of the stack being pushed"},"type":{"type":"string","enum":["PushingStack"]}}},{"type":"object","description":"Pushing resource images to registry","required":["resourceName","resourceType","type"],"properties":{"resourceName":{"type":"string","description":"Name of the resource being pushed"},"resourceType":{"type":"string","description":"Type of the resource: \"worker\", \"container\""},"type":{"type":"string","enum":["PushingResource"]}}},{"type":"object","description":"Creating a release on the platform","required":["project","type"],"properties":{"project":{"type":"string","description":"Project name"},"type":{"type":"string","enum":["CreatingRelease"]}}},{"type":"object","description":"Code compilation event (rust, typescript, etc.)","required":["language","type"],"properties":{"language":{"type":"string","description":"Language being compiled (rust, typescript, etc.)"},"progress":{"type":["string","null"],"description":"Current progress/status line from the build output"},"type":{"type":"string","enum":["CompilingCode"]}}},{"type":"object","required":["nextState","type"],"properties":{"nextState":{"description":"The resulting state of the stack after the step.","type":"object","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":["worker","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResource"},"controllerPlatform":{"oneOf":[{"type":"null"},{"description":"Platform whose controller owns this resource state. Defaults to the\ncontaining stack platform when absent.","type":"string","enum":["aws","gcp","azure","kubernetes","local","test"],"x-readme-ref-name":"Platform"}]},"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":["worker","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"}]},"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":["worker","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":["worker","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., Worker::RESOURCE_TYPE, Storage::RESOURCE_TYPE)."}},"x-readme-ref-name":"StackResourceState"},"propertyNames":{"type":"string"}}},"x-readme-ref-name":"StackState"},"suggestedDelayMs":{"type":["integer","null"],"format":"int64","description":"An suggested duration to wait before executing the next step.","minimum":0},"type":{"type":"string","enum":["StackStep"]}}},{"type":"object","description":"Generating CloudFormation template","required":["type"],"properties":{"type":{"type":"string","enum":["GeneratingCloudFormationTemplate"]}}},{"type":"object","description":"Generating infrastructure template","required":["platform","type"],"properties":{"platform":{"type":"string","description":"Platform for which the template is being generated"},"type":{"type":"string","enum":["GeneratingTemplate"]}}},{"type":"object","description":"Provisioning a new agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being provisioned"},"releaseId":{"type":"string","description":"ID of the release being deployed to the agent"},"type":{"type":"string","enum":["ProvisioningAgent"]}}},{"type":"object","description":"Updating an existing agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being updated"},"releaseId":{"type":"string","description":"ID of the new release being deployed to the agent"},"type":{"type":"string","enum":["UpdatingAgent"]}}},{"type":"object","description":"Deleting an agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being deleted"},"releaseId":{"type":"string","description":"ID of the release that was running on the agent"},"type":{"type":"string","enum":["DeletingAgent"]}}},{"type":"object","description":"Starting a debug session for an agent","required":["agentId","debugSessionId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being debugged"},"debugSessionId":{"type":"string","description":"ID of the debug session"},"type":{"type":"string","enum":["DebuggingAgent"]}}},{"type":"object","description":"Preparing environment for deployment","required":["strategyName","type"],"properties":{"strategyName":{"type":"string","description":"Name of the deployment strategy being used"},"type":{"type":"string","enum":["PreparingEnvironment"]}}},{"type":"object","description":"Deploying stack with alien-infra","required":["stackName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being deployed"},"type":{"type":"string","enum":["DeployingStack"]}}},{"type":"object","description":"Running test function after deployment","required":["stackName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being tested"},"type":{"type":"string","enum":["RunningTestWorker"]}}},{"type":"object","description":"Cleaning up deployed stack resources","required":["stackName","strategyName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being cleaned up"},"strategyName":{"type":"string","description":"Name of the deployment strategy being used for cleanup"},"type":{"type":"string","enum":["CleaningUpStack"]}}},{"type":"object","description":"Cleaning up deployment environment","required":["stackName","strategyName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being cleaned up"},"strategyName":{"type":"string","description":"Name of the deployment strategy being used for cleanup"},"type":{"type":"string","enum":["CleaningUpEnvironment"]}}},{"type":"object","description":"Setting up platform context","required":["platformName","type"],"properties":{"platformName":{"type":"string","description":"Name of the platform (e.g., \"AWS\", \"GCP\")"},"type":{"type":"string","enum":["SettingUpPlatformContext"]}}},{"type":"object","description":"Ensuring docker repository exists","required":["repositoryName","type"],"properties":{"repositoryName":{"type":"string","description":"Name of the docker repository"},"type":{"type":"string","enum":["EnsuringDockerRepository"]}}},{"type":"object","description":"Deploying CloudFormation stack","required":["cfnStackName","currentStatus","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"currentStatus":{"type":"string","description":"Current stack status"},"type":{"type":"string","enum":["DeployingCloudFormationStack"]}}},{"type":"object","description":"Assuming AWS IAM role","required":["roleArn","type"],"properties":{"roleArn":{"type":"string","description":"ARN of the role to assume"},"type":{"type":"string","enum":["AssumingRole"]}}},{"type":"object","description":"Importing stack state from CloudFormation","required":["cfnStackName","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"type":{"type":"string","enum":["ImportingStackStateFromCloudFormation"]}}},{"type":"object","description":"Deleting CloudFormation stack","required":["cfnStackName","currentStatus","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"currentStatus":{"type":"string","description":"Current stack status"},"type":{"type":"string","enum":["DeletingCloudFormationStack"]}}},{"type":"object","description":"Emptying S3 buckets before stack deletion","required":["bucketNames","type"],"properties":{"bucketNames":{"type":"array","items":{"type":"string"},"description":"Names of the S3 buckets being emptied"},"type":{"type":"string","enum":["EmptyingBuckets"]}}}],"description":"Represents all possible events in the Alien system","x-readme-ref-name":"AlienEvent"}
1
+ {"oneOf":[{"type":"object","description":"Loading configuration file","required":["type"],"properties":{"type":{"type":"string","enum":["LoadingConfiguration"]}}},{"type":"object","description":"Operation finished successfully","required":["type"],"properties":{"type":{"type":"string","enum":["Finished"]}}},{"type":"object","description":"Stack packaging event","required":["stack","type"],"properties":{"stack":{"type":"string","description":"Name of the stack being built"},"type":{"type":"string","enum":["BuildingStack"]}}},{"type":"object","description":"Running build-time preflight checks and mutations","required":["stack","platform","type"],"properties":{"platform":{"type":"string","description":"Platform being targeted"},"stack":{"type":"string","description":"Name of the stack being checked"},"type":{"type":"string","enum":["RunningPreflights"]}}},{"type":"object","description":"Downloading alien runtime event","required":["targetTriple","url","type"],"properties":{"targetTriple":{"type":"string","description":"Target triple for the runtime"},"type":{"type":"string","enum":["DownloadingAlienRuntime"]},"url":{"type":"string","description":"URL being downloaded from"}}},{"type":"object","description":"Resource build event (function, container, or worker)","required":["resourceName","resourceType","type"],"properties":{"relatedResources":{"type":"array","items":{"type":"string"},"description":"All resource names sharing this build (for deduped container groups)"},"resourceName":{"type":"string","description":"Name of the resource being built"},"resourceType":{"type":"string","description":"Type of the resource: \"worker\", \"container\""},"type":{"type":"string","enum":["BuildingResource"]}}},{"type":"object","description":"Image build event","required":["image","type"],"properties":{"image":{"type":"string","description":"Name of the image being built"},"type":{"type":"string","enum":["BuildingImage"]}}},{"type":"object","description":"Image push event","required":["image","type"],"properties":{"image":{"type":"string","description":"Name of the image being pushed"},"progress":{"oneOf":[{"type":"null"},{"description":"Progress information for the push operation","type":"object","required":["operation","layersUploaded","totalLayers","bytesUploaded","totalBytes"],"properties":{"bytesUploaded":{"type":"integer","format":"int64","description":"Bytes uploaded so far","minimum":0},"layersUploaded":{"type":"integer","description":"Number of layers uploaded so far","minimum":0},"operation":{"type":"string","description":"Current operation being performed"},"totalBytes":{"type":"integer","format":"int64","description":"Total bytes to upload","minimum":0},"totalLayers":{"type":"integer","description":"Total number of layers to upload","minimum":0}},"x-readme-ref-name":"PushProgress"}]},"type":{"type":"string","enum":["PushingImage"]}}},{"type":"object","description":"Pushing stack images to registry","required":["stack","platform","type"],"properties":{"destination":{"type":["string","null"],"description":"Human-readable destination for pushed images"},"platform":{"type":"string","description":"Target platform"},"stack":{"type":"string","description":"Name of the stack being pushed"},"type":{"type":"string","enum":["PushingStack"]}}},{"type":"object","description":"Pushing resource images to registry","required":["resourceName","resourceType","type"],"properties":{"resourceName":{"type":"string","description":"Name of the resource being pushed"},"resourceType":{"type":"string","description":"Type of the resource: \"worker\", \"container\""},"type":{"type":"string","enum":["PushingResource"]}}},{"type":"object","description":"Creating a release on the platform","required":["project","type"],"properties":{"project":{"type":"string","description":"Project name"},"type":{"type":"string","enum":["CreatingRelease"]}}},{"type":"object","description":"Code compilation event (rust, typescript, etc.)","required":["language","type"],"properties":{"language":{"type":"string","description":"Language being compiled (rust, typescript, etc.)"},"progress":{"type":["string","null"],"description":"Current progress/status line from the build output"},"type":{"type":"string","enum":["CompilingCode"]}}},{"type":"object","required":["nextState","type"],"properties":{"nextState":{"description":"The resulting state of the stack after the step.","type":"object","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":["worker","storage","queue","redis","postgres"],"x-readme-ref-name":"ResourceType"}},"additionalProperties":true,"x-readme-ref-name":"BaseResource"},"controllerPlatform":{"oneOf":[{"type":"null"},{"description":"Platform whose controller owns this resource state. Defaults to the\ncontaining stack platform when absent.","type":"string","enum":["aws","gcp","azure","kubernetes","local","test"],"x-readme-ref-name":"Platform"}]},"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":["worker","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"}]},"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":["worker","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":["worker","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","teardown-required","deleted","refresh-failed"],"x-readme-ref-name":"ResourceStatus"},"type":{"type":"string","description":"The high-level type of the resource (e.g., Worker::RESOURCE_TYPE, Storage::RESOURCE_TYPE)."}},"x-readme-ref-name":"StackResourceState"},"propertyNames":{"type":"string"}}},"x-readme-ref-name":"StackState"},"suggestedDelayMs":{"type":["integer","null"],"format":"int64","description":"An suggested duration to wait before executing the next step.","minimum":0},"type":{"type":"string","enum":["StackStep"]}}},{"type":"object","description":"Generating CloudFormation template","required":["type"],"properties":{"type":{"type":"string","enum":["GeneratingCloudFormationTemplate"]}}},{"type":"object","description":"Generating infrastructure template","required":["platform","type"],"properties":{"platform":{"type":"string","description":"Platform for which the template is being generated"},"type":{"type":"string","enum":["GeneratingTemplate"]}}},{"type":"object","description":"Provisioning a new agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being provisioned"},"releaseId":{"type":"string","description":"ID of the release being deployed to the agent"},"type":{"type":"string","enum":["ProvisioningAgent"]}}},{"type":"object","description":"Updating an existing agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being updated"},"releaseId":{"type":"string","description":"ID of the new release being deployed to the agent"},"type":{"type":"string","enum":["UpdatingAgent"]}}},{"type":"object","description":"Deleting an agent","required":["agentId","releaseId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being deleted"},"releaseId":{"type":"string","description":"ID of the release that was running on the agent"},"type":{"type":"string","enum":["DeletingAgent"]}}},{"type":"object","description":"Starting a debug session for an agent","required":["agentId","debugSessionId","type"],"properties":{"agentId":{"type":"string","description":"ID of the agent being debugged"},"debugSessionId":{"type":"string","description":"ID of the debug session"},"type":{"type":"string","enum":["DebuggingAgent"]}}},{"type":"object","description":"Preparing environment for deployment","required":["strategyName","type"],"properties":{"strategyName":{"type":"string","description":"Name of the deployment strategy being used"},"type":{"type":"string","enum":["PreparingEnvironment"]}}},{"type":"object","description":"Deploying stack with alien-infra","required":["stackName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being deployed"},"type":{"type":"string","enum":["DeployingStack"]}}},{"type":"object","description":"Running test function after deployment","required":["stackName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being tested"},"type":{"type":"string","enum":["RunningTestWorker"]}}},{"type":"object","description":"Cleaning up deployed stack resources","required":["stackName","strategyName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being cleaned up"},"strategyName":{"type":"string","description":"Name of the deployment strategy being used for cleanup"},"type":{"type":"string","enum":["CleaningUpStack"]}}},{"type":"object","description":"Cleaning up deployment environment","required":["stackName","strategyName","type"],"properties":{"stackName":{"type":"string","description":"Name of the stack being cleaned up"},"strategyName":{"type":"string","description":"Name of the deployment strategy being used for cleanup"},"type":{"type":"string","enum":["CleaningUpEnvironment"]}}},{"type":"object","description":"Setting up platform context","required":["platformName","type"],"properties":{"platformName":{"type":"string","description":"Name of the platform (e.g., \"AWS\", \"GCP\")"},"type":{"type":"string","enum":["SettingUpPlatformContext"]}}},{"type":"object","description":"Ensuring docker repository exists","required":["repositoryName","type"],"properties":{"repositoryName":{"type":"string","description":"Name of the docker repository"},"type":{"type":"string","enum":["EnsuringDockerRepository"]}}},{"type":"object","description":"Deploying CloudFormation stack","required":["cfnStackName","currentStatus","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"currentStatus":{"type":"string","description":"Current stack status"},"type":{"type":"string","enum":["DeployingCloudFormationStack"]}}},{"type":"object","description":"Assuming AWS IAM role","required":["roleArn","type"],"properties":{"roleArn":{"type":"string","description":"ARN of the role to assume"},"type":{"type":"string","enum":["AssumingRole"]}}},{"type":"object","description":"Importing stack state from CloudFormation","required":["cfnStackName","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"type":{"type":"string","enum":["ImportingStackStateFromCloudFormation"]}}},{"type":"object","description":"Deleting CloudFormation stack","required":["cfnStackName","currentStatus","type"],"properties":{"cfnStackName":{"type":"string","description":"Name of the CloudFormation stack"},"currentStatus":{"type":"string","description":"Current stack status"},"type":{"type":"string","enum":["DeletingCloudFormationStack"]}}},{"type":"object","description":"Emptying S3 buckets before stack deletion","required":["bucketNames","type"],"properties":{"bucketNames":{"type":"array","items":{"type":"string"},"description":"Names of the S3 buckets being emptied"},"type":{"type":"string","enum":["EmptyingBuckets"]}}}],"description":"Represents all possible events in the Alien system","x-readme-ref-name":"AlienEvent"}
@@ -1 +1 @@
1
- {"type":"string","description":"Deployment status in the deployment lifecycle","enum":["pending","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}
1
+ {"type":"string","description":"Deployment status in the deployment lifecycle","enum":["pending","preflights-failed","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","teardown-required","teardown-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}
@@ -1 +1 @@
1
- {"type":"object","description":"Overall status of the dev server","required":["pid","platform","stackId","stateDir","apiUrl","startedAt","status","agents","lastUpdated"],"properties":{"agents":{"type":"object","description":"Agents being managed by this dev server (keyed by agent name)","additionalProperties":{"type":"object","description":"Status of a single agent in the dev server","required":["id","name","status","resources","createdAt"],"properties":{"commandsUrl":{"type":["string","null"],"description":"Commands endpoint URL for the deployment"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when agent was created"},"error":{"oneOf":[{"type":"null"},{"description":"Error if this agent has failed","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"}]},"id":{"type":"string","description":"Deployment ID (e.g., dep_xyz123)"},"name":{"type":"string","description":"Agent name (from --agent-name flag)"},"resources":{"type":"object","description":"Resources deployed by this agent (keyed by resource name)","additionalProperties":{"type":"object","description":"Information about a deployed resource","required":["url"],"properties":{"resourceType":{"type":["string","null"],"description":"Resource type (\"worker\" | \"container\")"},"url":{"type":"string","description":"Resource URL (e.g., http://localhost:8080)"}},"x-readme-ref-name":"DevResourceInfo"},"propertyNames":{"type":"string"}},"status":{"description":"Deployment status (running, provisioning, etc.)","type":"string","enum":["pending","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}},"x-readme-ref-name":"AgentStatus"},"propertyNames":{"type":"string"}},"apiUrl":{"type":"string","description":"Dev server API URL (e.g., http://localhost:9090)"},"error":{"oneOf":[{"type":"null"},{"description":"Global error if dev server itself has an error","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"}]},"lastUpdated":{"type":"string","description":"ISO 8601 timestamp of last status update"},"pid":{"type":"integer","format":"int32","description":"Dev server process ID","minimum":0},"platform":{"type":"string","description":"Platform (always \"local\" for dev server)"},"stackId":{"type":"string","description":"Stack ID (always \"dev\" for dev server)"},"startedAt":{"type":"string","description":"ISO 8601 timestamp when dev server started"},"stateDir":{"type":"string","description":"Path to state directory"},"status":{"description":"Overall dev server status","type":"string","enum":["initializing","ready","error","shuttingDown"],"x-readme-ref-name":"DevStatusState"}},"x-readme-ref-name":"DevStatus"}
1
+ {"type":"object","description":"Overall status of the dev server","required":["pid","platform","stackId","stateDir","apiUrl","startedAt","status","agents","lastUpdated"],"properties":{"agents":{"type":"object","description":"Agents being managed by this dev server (keyed by agent name)","additionalProperties":{"type":"object","description":"Status of a single agent in the dev server","required":["id","name","status","resources","createdAt"],"properties":{"commandsUrl":{"type":["string","null"],"description":"Commands endpoint URL for the deployment"},"createdAt":{"type":"string","description":"ISO 8601 timestamp when agent was created"},"error":{"oneOf":[{"type":"null"},{"description":"Error if this agent has failed","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"}]},"id":{"type":"string","description":"Deployment ID (e.g., dep_xyz123)"},"name":{"type":"string","description":"Agent name (from --agent-name flag)"},"resources":{"type":"object","description":"Resources deployed by this agent (keyed by resource name)","additionalProperties":{"type":"object","description":"Information about a deployed resource","required":["url"],"properties":{"resourceType":{"type":["string","null"],"description":"Resource type (\"worker\" | \"container\")"},"url":{"type":"string","description":"Resource URL (e.g., http://localhost:8080)"}},"x-readme-ref-name":"DevResourceInfo"},"propertyNames":{"type":"string"}},"status":{"description":"Deployment status (running, provisioning, etc.)","type":"string","enum":["pending","preflights-failed","initial-setup","initial-setup-failed","provisioning","provisioning-failed","running","refresh-failed","update-pending","updating","update-failed","delete-pending","deleting","delete-failed","teardown-required","teardown-failed","deleted","error"],"x-readme-ref-name":"DeploymentStatus"}},"x-readme-ref-name":"AgentStatus"},"propertyNames":{"type":"string"}},"apiUrl":{"type":"string","description":"Dev server API URL (e.g., http://localhost:9090)"},"error":{"oneOf":[{"type":"null"},{"description":"Global error if dev server itself has an error","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"}]},"lastUpdated":{"type":"string","description":"ISO 8601 timestamp of last status update"},"pid":{"type":"integer","format":"int32","description":"Dev server process ID","minimum":0},"platform":{"type":"string","description":"Platform (always \"local\" for dev server)"},"stackId":{"type":"string","description":"Stack ID (always \"dev\" for dev server)"},"startedAt":{"type":"string","description":"ISO 8601 timestamp when dev server started"},"stateDir":{"type":"string","description":"Path to state directory"},"status":{"description":"Overall dev server status","type":"string","enum":["initializing","ready","error","shuttingDown"],"x-readme-ref-name":"DevStatusState"}},"x-readme-ref-name":"DevStatus"}