Cotal TypeScript packages
    Preparing search index...

    Function agentStart

    • Start argv in its own workspace of session and return its stable refs.

      herdr 0.8.0 has no "create a pane running this command" primitive: agent start attaches a RECOGNIZED agent kind to an existing pane, pane split needs a pane to split from, and a fresh headless server has no workspace, tab or pane at all. So the bootstrap is workspace create (which yields a workspace + tab + root pane in one call, honouring --cwd) followed by pane run into that root pane. One workspace per agent also gives the name-labeled-tab layout for free.

      The command is exec'd deliberately: a plain pane run leaves the pane's shell alive after the command exits, so the pane would outlive the agent and terminalState could never prove an exit. exec replaces the shell, so herdr closes the pane exactly when the agent exits — which is the property the whole lifecycle design rests on.

      Fails loud and leaves nothing behind: if the process does not appear within the readiness window the half-built workspace is torn down before throwing.

      Parameters

      • session: string
      • name: string
      • cwd: string
      • argv: string[]

      Returns HerdrAgent