Hyperlinkv0.9.0-beta.0

Launcher

Launcher.Handleinterfacesrc/internal/launcher.ts:415

Custody handle — only spawn / up construct these. After Handle.handoff or Handle.kill, do not use the handle for control; the launcher may exit.

modelsspawnupHandle.handoffHandle.kill
export interface Handle {
  /** Minted assume token (redacted brand — never cleartext in logs). */
  readonly token: Redacted.Redacted<Token>;
  /** Dial / verify / handoff target. */
  readonly node: AnyNode;
  /** Wait until Ready (allReady or `ready.services`) is proven cross-process. */
  readonly awaitReady: () => Effect.Effect<
    Handle,
    | ReadyTimedOut
    | ChildExited
    | HandleSpent
    | UnaddressedNode
    | NodeUnreachable
    | ProtocolUnanswered
    | ServiceNotReady
    | ServiceNotServed
    | PlatformError
  >;
  /** Call {@link Node.assume}, then unref the child so the launcher scope may close. */
  readonly handoff: () => Effect.Effect<
    void,
    | HandleNotReady
    | AssumeTokenMismatch
    | AssumeTokenReused
    | AssumeNotReady
    | NodeUnreachable
    | UnaddressedNode
    | HandleSpent
    | PlatformError
  >;
  /**
   * SIGTERM the OS child and spend the handle. Safe after spawn; fails {@link HandleSpent}
   * after handoff/kill. Ready timeout also kill-reaps automatically.
   */
  readonly kill: () => Effect.Effect<void, HandleSpent | PlatformError>;
}
Referenced by 1 symbols