Skip to content

armgit / qm

Public Imported from GitHub
0

Multiplayer agent harness for work.

1.1 KB
Raw Blame
import type { Deployment, DeployEndpoint, DeploymentVersion } from "./deploy-store.ts";

export type { DeployEndpoint };

export interface DeployProfile {
  managedScaleToZero: boolean;
  inPlaceReconcile?: boolean;
  dataDir?: string;
  maxAppBytes?: number;
}

export interface DeployReconcileInput {
  gitBundle?: Uint8Array;
  changedPaths: string[];
  deletedPaths: string[];
  allPaths: string[];
}

export interface DeployProvider {
  readonly profile: DeployProfile;
  apply(d: Deployment, version: DeploymentVersion): Promise<DeployEndpoint>;
  reconcile?(d: Deployment, version: DeploymentVersion, input: DeployReconcileInput): Promise<DeployEndpoint>;
  destroy(d: Deployment): Promise<void>;
  setAlwaysOn?(d: Deployment, alwaysOn: boolean): Promise<void>;
  resolveEndpoint?(d: Deployment, version: DeploymentVersion): Promise<DeployEndpoint | null>;
  rotationDue?(d: Deployment): Promise<boolean>;
  park?(d: Deployment): Promise<void>;
  /** Recent output from the running app (entrypoint stdout+stderr), newest last. */
  logs?(d: Deployment, opts: { tailLines: number }): Promise<string | null>;
}