runner.ts 1.1 KB

1234567891011121314151617181920212223242526272829303132
  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: '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. computers?: {managedBy?:'compose';network?:'none'|'public-proxy';runtime:'docker'|'podman';imageId:string;python:string;hermesSource:string;hermesHome:string;maxConcurrent?:number}
  30. hermesCredentials?: {username:string;password:string}
  31. }
  32. export const UNCONFIGURED_COMPUTER_IMAGE='sha256:'+'0'.repeat(64)