pios

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MCPClient

type MCPClient struct {
	BinPath string
	// contains filtered or unexported fields
}

MCPClient invokes the PIOS CLI binary at two lifecycle points:

  1. Before the evolutionary loop starts (InitWorkspace) — to seed branch scaffolding.
  2. After the time budget expires (Validate) — to confirm structural validity before merge.

BinPath must resolve to the pios binary: either "pios" (found via PATH) or an absolute path to the compiled binary.

func NewMCPClient

func NewMCPClient(binPath string, logger *slog.Logger) *MCPClient

func (*MCPClient) InitWorkspace

func (m *MCPClient) InitWorkspace(ctx context.Context, workspace, branch string) error

InitWorkspace seeds the workspace with a PIOS contract by running `pios init` in the target workspace directory.

When a workspace already contains a STATUS.md file, ESA preserves the existing contract instead of re-seeding and overwriting user-edited templates such as templates/tasks.md.

func (*MCPClient) Validate

func (m *MCPClient) Validate(ctx context.Context, workspace string) (bool, error)

Validate calls `pios validate` in the given workspace directory to confirm the workflow contract is structurally sound before merge.

Returns (true, nil) when validation passes, (false, nil) when validation runs but finds contract violations, and (false, error) when the binary cannot be executed or the context is cancelled.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL