Documentation
¶
Overview ¶
Package remote is an explicit user-authenticated client for real Airlock deployment targets. It does not start an application, database or local host.
Index ¶
- type AgentRun
- type Binding
- type BindingSelection
- type Bindings
- type Client
- func (c *Client) CancelAgent(ctx context.Context, definition, id string) (*AgentRun, error)
- func (c *Client) CancelTest(ctx context.Context, id string) (*TestRun, error)
- func (c *Client) ContinueAgent(ctx context.Context, ...) (*AgentRun, error)
- func (c *Client) CreatePreview(ctx context.Context) (*Deployment, error)
- func (c *Client) Get(ctx context.Context) (*Deployment, error)
- func (c *Client) GetAgent(ctx context.Context, definition, id string) (*AgentRun, error)
- func (c *Client) GetTest(ctx context.Context, id string) (*TestRun, error)
- func (c *Client) InvokeTool(ctx context.Context, name string, input *structpb.Value) (*ToolResult, error)
- func (c *Client) Lifecycle(ctx context.Context, action string) error
- func (c *Client) ListAgents(ctx context.Context, definition string) ([]AgentRun, error)
- func (c *Client) ListBindings(ctx context.Context) (*Bindings, error)
- func (c *Client) OpenAcceptedArtifact(ctx context.Context, definition, id string, index int) (io.ReadCloser, error)
- func (c *Client) Request(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Response, error)
- func (c *Client) RunTests(ctx context.Context, request *TestRequest) (*TestRun, error)
- func (c *Client) SetBinding(ctx context.Context, typ, slot string, selection *BindingSelection) (*Bindings, error)
- func (c *Client) SetPolicy(ctx context.Context, policy *Policy) (*Deployment, error)
- func (c *Client) StartAgent(ctx context.Context, definition, requestID, contractHash string, ...) (*AgentRun, error)
- func (c *Client) WaitAgent(ctx context.Context, definition, id string, poll time.Duration) (*AgentRun, error)
- func (c *Client) WaitTest(ctx context.Context, id string, poll time.Duration) (*TestRun, error)
- type Config
- type Deployment
- type HTTPError
- type Policy
- type TestClient
- func (c *TestClient) CancelAgent(ctx context.Context, definition, id string) (*AgentRun, error)
- func (c *TestClient) GetAgent(ctx context.Context, definition, id string) (*AgentRun, error)
- func (c *TestClient) InvokeTool(ctx context.Context, name string, input *structpb.Value) (*ToolResult, error)
- func (c *TestClient) Request(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Response, error)
- func (c *TestClient) StartAgent(ctx context.Context, definition, requestID, contractHash string, ...) (*AgentRun, error)
- func (c *TestClient) WaitAgent(ctx context.Context, definition, id string, poll time.Duration) (*AgentRun, error)
- type TestConfig
- type TestRequest
- type TestRun
- type ToolResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AgentRun ¶
type AgentRun = wire.AgentRunInfo
type Binding ¶
type Binding = airlockv1.TargetBindingInfo
type BindingSelection ¶
type BindingSelection = airlockv1.SetTargetBindingRequest
type Bindings ¶
type Bindings = airlockv1.ListTargetBindingsResponse
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) CancelAgent ¶
func (*Client) CancelTest ¶
func (*Client) ContinueAgent ¶
func (*Client) CreatePreview ¶
func (c *Client) CreatePreview(ctx context.Context) (*Deployment, error)
CreatePreview creates an independent creator-associated deployment. Select its returned concrete name or ID in a new client for subsequent operations.
func (*Client) InvokeTool ¶
func (*Client) Lifecycle ¶
Lifecycle changes only the selected deployment. Data/bindings are retained by the host. Refresh Get separately to inspect actual running state.
func (*Client) ListAgents ¶
func (*Client) OpenAcceptedArtifact ¶
func (c *Client) OpenAcceptedArtifact(ctx context.Context, definition, id string, index int) (io.ReadCloser, error)
OpenAcceptedArtifact streams an exact ordinal in the completed run's pinned manifest.
func (*Client) Request ¶
func (c *Client) Request(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Response, error)
Request drives a declared route through Airlock's real HTTP admission. The caller owns the response body. Redirects are returned without following them.
func (*Client) SetBinding ¶
func (*Client) StartAgent ¶
type Config ¶
type Config struct {
URL, AppID, Target, Revision string
HTTPClient *http.Client
Token func(context.Context) (string, error)
}
Config identifies one logical application on one Airlock instance. Target is production by default; previews use a concrete deployment name or ID. Revision, when set, pins observation to that immutable source revision. Tokens are user/operator credentials, never SDK app credentials or caller assertions.
type Deployment ¶
type Deployment = airlockv1.DeploymentInfo
Deployment is the generated operator contract, shared with the Airlock API.
type Policy ¶
type Policy = airlockv1.SetDeploymentPolicyRequest
type TestClient ¶
type TestClient struct {
// contains filtered or unexported fields
}
func NewTestClient ¶
func NewTestClient(config TestConfig) (*TestClient, error)
func TestClientFromEnvironment ¶
func TestClientFromEnvironment() (*TestClient, error)
TestClientFromEnvironment reads only explicit opaque runner coordinates. No CLI login store, provider account, database DSN or host emulator is consulted.
func (*TestClient) CancelAgent ¶
func (*TestClient) InvokeTool ¶
func (c *TestClient) InvokeTool(ctx context.Context, name string, input *structpb.Value) (*ToolResult, error)
func (*TestClient) Request ¶
func (c *TestClient) Request(ctx context.Context, method, path string, body io.Reader, headers http.Header) (*http.Response, error)
The scoped client exposes execution only, never binding/deployment/inventory.
func (*TestClient) StartAgent ¶
type TestConfig ¶
type TestConfig struct {
APIRoot, Token, AppID, DeploymentID, Revision string
RuntimeGeneration int64
HTTPClient *http.Client
}
TestConfig is supplied by the host runner, not a laptop login or app token. The API root is an exact /api/test-runs/UUID capability namespace.
type TestRequest ¶
type TestRequest = airlockv1.RunDeploymentTestsRequest
type TestRun ¶
type TestRun = airlockv1.DeploymentTestRunInfo
type ToolResult ¶
type ToolResult = airlockv1.InvokeDeploymentToolResponse