PromptRunner.Workspace (PromptRunnerSDK v0.12.1)

Copy Markdown View Source

Operator-owned workspace planning, materialization, and readiness.

A workspace maps logical packet repositories onto full independent clones. Runtime state is kept under the current operator's state root, never beneath the packet or a shared source checkout.

Summary

Functions

Resolves the optional manifest packet binding inside the independent workspace clone.

The operator-owned control-store root for a workspace manifest.

Imports completed legacy progress into an empty operator workspace.

Resolves a packet beneath a declared source repository into its independent clone.

Resolves a prepared workspace by manifest path, workspace id, or current directory.

Deterministic transient user-service unit for a workspace.

Functions

bound_packet_root(reference, opts \\ [])

@spec bound_packet_root(
  String.t(),
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Resolves the optional manifest packet binding inside the independent workspace clone.

control_root(manifest_path)

@spec control_root(String.t()) ::
  {:ok, PromptRunner.Control.Store.root()} | {:error, term()}

The operator-owned control-store root for a workspace manifest.

doctor(manifest_path, opts \\ [])

@spec doctor(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

import_state(manifest_path, packet_path, opts \\ [])

@spec import_state(String.t(), String.t(), keyword()) ::
  {:ok, map()} | {:error, term()}

Imports completed legacy progress into an empty operator workspace.

packet_root(manifest_path, packet_path)

@spec packet_root(String.t(), String.t() | nil) ::
  {:ok, String.t()} | {:error, term()}

Resolves a packet beneath a declared source repository into its independent clone.

plan(manifest_path, packet_path, opts \\ [])

@spec plan(String.t(), String.t() | nil, keyword()) ::
  {:ok,
   %{
     workspace: PromptRunner.Workspace.Plan.t(),
     runner: PromptRunner.Plan.t(),
     packet_root: String.t()
   }}
  | {:error, term()}

prepare(manifest_path, opts \\ [])

@spec prepare(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}

resolve(reference \\ nil, opts \\ [])

@spec resolve(
  String.t() | nil,
  keyword()
) :: {:ok, String.t()} | {:error, term()}

Resolves a prepared workspace by manifest path, workspace id, or current directory.

service_unit(id)

@spec service_unit(String.t()) :: String.t()

Deterministic transient user-service unit for a workspace.

status(reference, opts \\ [])

@spec status(
  String.t(),
  keyword()
) :: {:ok, map()} | {:error, term()}