runner.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. export const RUNNER_PROTOCOL = 1
  2. export interface RunnerRecord {
  3. id: string
  4. name: string
  5. sourceNodeId: string
  6. sourceOwner: string
  7. allowedProfiles: string[]
  8. tokenHash: string
  9. enabled: boolean
  10. createdAt: number
  11. }
  12. export interface RunnerCommand {
  13. id: string
  14. kind: 'browser.invoke' | 'local-vm.manage' | 'computer.control' | 'computer.retire' | 'http' | 'gateway.open' | 'gateway.rpc' | 'gateway.close' | 'lease.create' | 'lease.bind' | 'lease.close'
  15. payload: Record<string, unknown>
  16. expiresAt: number
  17. }
  18. export interface RunnerConfiguration {
  19. protocol: 1
  20. serverURL: string
  21. runnerId: string
  22. token: string
  23. hermesURL: string
  24. /** Satellite runners open sessions on the server Hermes, never 127.0.0.1. */
  25. satellite?: boolean
  26. allowedProfiles: string[]
  27. artifactRoots: string[]
  28. allowInsecureLan?: boolean
  29. /** Opt-in, independent of the full Linux desktop. */
  30. browser?: { enabled: boolean; maxSessions?: number; idleTimeoutMs?: number }
  31. computers?: {managedBy?:'compose';network?:'none'|'public-proxy';runtime:'docker'|'podman';imageId:string;python:string;hermesSource:string;hermesHome:string;maxConcurrent?:number}
  32. hermesCredentials?: {username:string;password:string}
  33. }
  34. export const UNCONFIGURED_COMPUTER_IMAGE='sha256:'+'0'.repeat(64)