Documentation
¶
Overview ¶
Package edge is the customer-side execution surface of the unified Skybridge edge binary. It receives single read-only tool calls dispatched from the SaaS control plane and runs them locally, so customer data (live AWS reads) is gathered inside the customer network and only results travel back. It is the Go counterpart of the Python connector's local tool execution path.
Index ¶
Constants ¶
const MaxCommandLen = 1200
MaxCommandLen bounds a single CLI invocation.
Variables ¶
This section is empty.
Functions ¶
func EncodeToolRequest ¶
EncodeToolRequest mirrors the Python encoder: a JSON object carrying the sentinel/version, the tool name, and its arguments. Exposed mainly for round-trip tests and tooling.
func SplitCommand ¶
SplitCommand tokenizes a shell-style command into argv. Call it only after ValidateReadOnlyAWSCommand has accepted the command (it assumes no backslash/metacharacters).
func ValidateReadOnlyAWSCommand ¶
ValidateReadOnlyAWSCommand reports whether command is a single, read-only AWS CLI invocation. It returns (allowed, reason); reason is a short explanation suitable for audit/agent surfacing.
Types ¶
type Handler ¶
Handler executes one read-only tool locally and returns its Result. A returned error is for transport/internal failures; tool-level failures should be reported as a Result with ok=false so the SaaS side still gets a structured answer.
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
Registry maps tool names to local handlers. Only tools that genuinely need to run at the customer edge (live AWS reads) are registered here; everything else stays SaaS-side and is never dispatched to the edge.
func (*Registry) Dispatch ¶
Dispatch runs a decoded tool call. Unknown tools return an ok=false Result (not an error) so the caller can forward a structured rejection up the tunnel; a non-nil error is reserved for handler transport failures. A handler that returns an error is converted into an ok=false Result too, so the edge never drops a dispatched call silently.
type Result ¶
Result is a JSON-serializable tool result. It mirrors the Python tool convention: every result carries at least {"ok": bool, "tool": name}, plus tool-specific fields. The SaaS side wraps this into a ToolResult agent event and applies PII redaction before it reaches the model/UI.
func ErrorResult ¶
ErrorResult builds a uniform ok=false result for a tool.
type ToolCall ¶
ToolCall is a decoded single-tool request.
func DecodeToolRequest ¶
DecodeToolRequest returns the decoded ToolCall and true if goal is a valid tool-call envelope. It is intentionally defensive: any parse failure, missing/wrong sentinel, unsupported version, or empty name yields ok=false so a real natural-language goal is never mistaken for a tool call.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package awsexec runs the live, read-only AWS tools at the customer edge.
|
Package awsexec runs the live, read-only AWS tools at the customer edge. |
|
Package transport is the edge's egress-only call-home client.
|
Package transport is the edge's egress-only call-home client. |