accelremote

package
v0.209.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2026 License: Apache-2.0 Imports: 21 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package accelremote forwards ONE accelerator tool call to the fleet node that carries the device (Coral design Phase B, 0.115.0). A box that lists an id in config.FleetAccelerators but not in config.Accelerators registers that device's tools locally — MCP surface and agent loop alike — and every call lands here: read the caller's image from the caller's disk, ship its bytes inside a fleet "accel" job to the first delegate_remotes node whose health advertises the id, wait for the job, hand the tool's dict back with a placement block. The node runs only its LOCAL lane for the job, so a forwarded call can never forward again.

Index

Constants

View Source
const Budget = 150 * time.Second

Budget bounds one forwarded call end to end: a cold sidecar spawn on the node (45 s) plus the tool's own timeout, with room for a queued dispatch.

Variables

View Source
var HTTPClient = &http.Client{Transport: netguard.SafeTransport(nil), Timeout: Budget, CheckRedirect: rosterprobe.NoRedirect}

HTTPClient is the transport every request uses; tests swap it. It rides netguard.SafeTransport like every other fleet client (health, vision, text, compose): the lane may only ever reach loopback or the operator's tailnet (never-cloud, ADR 0001), enforced at dial time, so a delegate_remotes entry that drifts to a public address dies at the dial gate instead of carrying an image there.

Functions

func Call

func Call(ctx context.Context, cfg config.Config, id, tool string, args map[string]any) (map[string]any, error)

Call runs tool on accelerator id over the fleet. A transport, placement or dispatch failure is an error (the caller turns it into a device-prefixed defer); the node's own defers and the tool's structured refusals come back as the result dict, exactly as a local lane would return them.

Types

type Placement

type Placement struct {
	Node        string `json:"node"`
	Base        string `json:"base"`
	Accelerator string `json:"accelerator"`
	JobID       string `json:"job_id"`
	WallMs      int64  `json:"wall_ms"`
	Remote      bool   `json:"remote"`
}

Placement says where a forwarded call ran, so a slow call or a defer is attributable from the result alone.

Jump to

Keyboard shortcuts

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