Alien Platform

repository·main·Indexed 41 days ago

https://github.com/alienplatform/alien

A managed self-hosting platform for deploying and operating software within customer cloud environments (AWS, GCP, Azure) with centralized control. Includes the @alienplatform/manager-api SDK for managing remote resource bindings and commands, featuring AlienManager and tree-shakable AlienManagerCore for optimized performance.

Tokens
1.1M
Snippets
3.3K
Records
4.2K
Agent score
53%

What's inside Alien

  1. Overview of alien-gcp-clients

    main

    The alien-gcp-clients package provides a custom HTTP client designed for making direct calls to Google Cloud Platform (GCP) APIs. Unlike a wrapper around the official Google Cloud SDK, it uses reqwest to perform direct API requests authenticated via JWT-generated Bearer tokens.

    Key features include:

    • Direct API Access: Uses reqwest for lightweight, direct HTTP communication.
    • Token Management: Implements token caching with a 45-minute Time-To-Live (TTL).
    • Testability: Uses a trait-based API design, making it compatible with mockall for easy mocking in tests.

    Supported GCP Services:

    • Cloud Run
    • Cloud Storage (GCS)
    • Firestore
    • Pub/Sub
    • IAM
    • Artifact Registry
    • Cloud Build
    • Cloud Scheduler
    • Compute Engine
    • Resource Manager
    • Secret Manager
    • Service Usage
  2. Overview of alien-azure-clients

    main

    The alien-azure-clients package provides a custom HTTP client designed specifically for interacting with Azure APIs. It uses reqwest for making direct API calls and handles Azure token authentication automatically.

    Key characteristics:

    • Type Safety: Model types are automatically code-generated from official Azure OpenAPI specifications using Progenitor at build time.
    • Extensibility: It uses a trait-based API design, making it easy to mock for testing using mockall.
    • Supported Services: Includes clients for Container Apps, Blob Containers, Service Bus, Key Vault, Managed Identity, Authorization, Container Registry, VMSS, Load Balancers, Network, Storage Accounts, Table Storage, Managed Disks, and Resources.
  3. Overview of Machines operations in the TypeScript SDK

    main

    The machines namespace in the @alienplatform/platform-api TypeScript SDK provides methods for managing machine deployments and join tokens.

    Available operations include:

    • listJoinTokens: Retrieve join tokens for a deployment.
    • createJoinToken: Generate a new join token.
    • rotateJoinToken: Rotate an existing join token.
    • revokeJoinToken: Revoke a join token.
    • cancelMachineDrain: Cancel a machine drain operation.
    • drainMachine: Initiate a machine drain.
    • removeMachine: Remove a machine.
  4. Overview of alien-operator

    main
    The alien-operator is a pull-model agent designed to manage deployments within remote environments. It operates by periodically syncing with the alien-manager. When the operator detects available updates, it executes alien_deployment::step() to process the deployment and forwards telemetry data back to the management layer.
  5. Overview of the alien-error library

    main

    The alien-error library provides structured error handling for the Alien platform. Unlike standard error libraries, every error produced by this crate carries machine-readable metadata designed for API responses and automated retry logic.

    Key metadata fields include:

    • code: A machine-readable error code.
    • retryable: A boolean indicating if the operation can be safely retried.
    • internal: A boolean flag used to control whether sensitive error details are exposed to external clients or kept internal.
    • http_status_code: The appropriate HTTP status code for the error.
  6. Overview of SlackIntegration operations

    main

    The SlackIntegration module allows you to manage the connection between Alien and Slack workspaces. It provides the following operations:

    • installUrl: Generates the Slack OAuth consent URL for a specific workspace.
    • status: Returns the current Slack installation status for a workspace.
    • listChannels: Lists public Slack channels available for the workspace's installation (useful for notification channel pickers).
    • setNotificationChannel: Configures which Slack channel receives ai-agent monitor reports.
    • uninstall: Uninstalls the Slack integration, revoking the bot token at Slack and deleting the local record.
  7. Overview of Manager operations

    main

    The Managers API allows you to manage the lifecycle and configuration of private managers within the Alien platform. Available operations include:

    • Lifecycle Management: create, delete, update, provision, retry, retrySetup, and cancelSetup.
    • Retrieval: get (by ID), list (all managers), getDeployment (internal deployment details), and getManagementConfig.
    • Domain & Connectivity: getDomainBinding, updateDomainBinding, generateManagerToken (short-lived JWT for browser → manager communication), and generateManagerBindingToken (deployment-scoped token for remote bindings).
    • Diagnostics & Health: listEvents, resolveGcpOAuthProvider, and reportHeartbeat (health status and metrics).
  8. Overview of User operations in @alienplatform/platform-api

    main

    The @alienplatform/platform-api SDK provides a user namespace to manage user-specific data and access. Available operations include:

    • listMemberships: List all workspaces the current user has access to.
    • getProfile: Get the current user's profile and user-scoped onboarding state.
    • updateProfile: Update the current user's profile (display name).
    • completeProfileSetup: Complete the required beta intake and profile setup dialog.
    • createWorkspace: Create a new workspace (user is automatically added as an admin).
    • listGitNamespaces: List all git namespaces (e.g., GitHub installations) the current user has access to.
    • syncGitNamespaces: Sync git namespaces from the provider (e.g., fetching GitHub app installations).
    • listGitNamespaceRepositories: List repositories accessible through a git namespace.
  9. Overview of the alien-commands remote commands protocol

    main

    The alien-commands protocol allows a control plane to invoke code on remote deployments without requiring inbound network connections, open ports, VPNs, or firewall changes. This is achieved through a combination of push and pull dispatch models.

    Common Use Cases:

    • AI agents sending tool calls to workers in a customer's VPC.
    • Data connectors running queries against private databases.
    • Dashboards pulling real-time metrics from isolated environments.
  10. Overview of alien-core modules

    main

    The alien-core crate defines the shared vocabulary and core types used across all Alien crates. It provides the foundational data structures for the platform's domain model, including stacks, deployments, resources, and permissions.

    Key functional areas include:

    • Stack Management: stack, stack_state, and stack_settings for resource graphs and lifecycle management (frozen vs live).
    • Deployment: Types for status, config, state, release, compute, domain, and environment variables.
    • Platform & Resources: platform enum (Aws, Gcp, Azure, Kubernetes, Local) and various resource types (Worker, Container, Storage, KV, Queue, Vault, etc.).
    • Bindings: bindings/ and external_bindings for internal and bring-your-own binding definitions.
    • Commands & Events: commands_types for remote command protocols (CommandState, Envelope, BodySpec) and events/ for platform and application-level events.
    • Infrastructure & Networking: load_balancer configurations, image_rewrite for OCI image URI rewriting, and presigned URL types.
    • Configuration & Identity: client_config (ClientConfig, ImpersonationConfig) for cloud credentials and embedded_config for pre-configured binaries.
    • Development & Sync: dev_status for the alien dev machine interface and sync protocol types for pull-model deployments.
  11. Overview of alien-aws-clients

    main

    The alien-aws-clients crate provides a custom HTTP client designed for making direct calls to AWS APIs. Unlike standard wrappers around the official AWS SDK, this library uses reqwest to perform direct API calls with AWS SigV4 request signing.

    Key characteristics:

    • Direct API Calls: Uses reqwest and implements SigV4 signing manually.
    • Testability: Uses a trait-based API design, making it compatible with mockall for unit testing.
    • Compatibility: The library is WASM-compatible.

    Supported AWS Services:

    • Lambda, S3, DynamoDB, SQS, ECR, IAM, STS, CloudFormation, CodeBuild, EC2, Secrets Manager, EventBridge, ACM, API Gateway V2, AutoScaling, ELBv2, SSM.
  12. Overview of Billing operations in the TypeScript SDK

    main

    The @alienplatform/platform-api TypeScript SDK provides two primary operations for managing and inspecting billing data within a workspace:

    1. listAuditLog: Retrieves a list of billing activity entries for the current workspace.
    2. getEntitlements: Retrieves the workspace billing entitlements used for product feature gates. This data is sourced from Autumn and served via a workspace billing read model with a stale-cache fallback mechanism.