vxcomputer

package
v0.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package vxcomputer is the resource module for VXCOMPUTER — the node-local, policy-governed agent runtime. It drives the Plan→Act→Reflect agent loop, the risk policy gate, signed approvals, and the tamper-evident hash-chained audit ledger.

Endpoints (all on the per-tenant node):

GET  /api/v2/vxcomputer/info
GET  /api/v2/vxcomputer/health
GET  /api/v2/vxcomputer/policy/classify?command=…
POST /api/v2/vxcomputer/run
POST /api/v2/vxcomputer/approval/resolve
GET  /api/v2/vxcomputer/audit/verify

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ApprovalInput

type ApprovalInput struct {
	RunID      string `json:"run_id"`
	StepID     string `json:"step_id,omitempty"`
	Command    string `json:"command"`
	Decision   string `json:"decision,omitempty"` // approve|deny (default approve)
	TTLSeconds int    `json:"ttl_seconds,omitempty"`
	Approver   string `json:"approver,omitempty"`
}

ApprovalInput is the body for ResolveApproval.

type Client

type Client struct {
	T              *transport.Transport
	NodeURL        string
	AuthedUsername string
}

Client is the entry point. Construct via c.VxComputer().

func (*Client) AuditVerify

func (c *Client) AuditVerify(ctx context.Context) (Result, error)

AuditVerify replays the node's tamper-evident hash-chained audit ledger and reports any tampering.

func (*Client) Classify

func (c *Client) Classify(ctx context.Context, command string) (Result, error)

Classify risk-classifies a shell command (low|medium|high|hard-blocked) WITHOUT running it.

func (*Client) Health

func (c *Client) Health(ctx context.Context) (Result, error)

Health is a liveness probe for the node agent runtime.

func (*Client) Info

func (c *Client) Info(ctx context.Context) (Result, error)

Info returns VXCOMPUTER capabilities and version.

func (*Client) ResolveApproval

func (c *Client) ResolveApproval(ctx context.Context, in ApprovalInput) (Result, error)

ResolveApproval approves or denies a pending medium/high-risk command. On approve, the Result carries a signed, single-use, command-bound approval token.

func (*Client) Run

func (c *Client) Run(ctx context.Context, in RunInput) (Result, error)

Run drives the Plan→Act→Reflect loop for an objective. The returned Result carries the full timeline; status may be "awaiting_approval".

type Result

type Result = map[string]interface{}

Result is a decoded JSON object response. The control-plane endpoints return dynamic shapes, so callers index Result directly — the same contract as vxsdk-py's dict return.

type RunInput

type RunInput struct {
	Objective string `json:"objective"`
	Channel   string `json:"channel,omitempty"`    // chat|cloudshell|studio|desktop
	SessionID string `json:"session_id,omitempty"` // optional continuity
}

RunInput is the body for Run.

Jump to

Keyboard shortcuts

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