sdk

package module
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2026 License: MIT Imports: 22 Imported by: 0

README

Power Manage SDK

Shared protobuf contract, generated Go and TypeScript code, agent stream client, and reusable device capability libraries for Power Manage.

The only system-design authority is ../DESIGN_2026_07_31/00_TARGET_DESIGN.md. This README describes how to work with the SDK repository; it does not define a second architecture.

Runtime contract

  • Protobuf sources live in proto/powermanage/v1/ under package powermanage.v1.
  • Generated Go and TypeScript packages live in gen/go/powermanage/v1/ and gen/ts/powermanage/v1/.
  • AgentService exposes one bidirectional Stream. Handshake, synchronization, heartbeats, manifest delivery and receipts, results, secret operations, and terminal traffic are frames on that stream.
  • Agent certificates authenticate the direct mTLS connection. Application frames are not separately signed.
  • Fields classified as secret use the versioned X25519 SealedValue envelope with context-bound associated data.
  • Human authentication is OIDC-based; the contract has no local password or TOTP RPCs.
  • The exact current RPC set is pinned by testdata/rpc_golden.json. The separate predecessor golden exists only to prove the approved deletion sets; it is not a compatibility surface.

Repository layout

Path Purpose
proto/powermanage/v1/ Contract source
gen/go/powermanage/v1/ Generated protobuf and Connect Go packages
gen/ts/powermanage/v1/ Generated TypeScript messages
cmd/powermanage/ Operator CLI for bootstrap, OIDC login, and named control RPCs
client.go Agent-side stream client and correlated stream operations
crypto/ Enrollment CSR and transport-field sealing helpers
sys/ Device capability implementations
pkg/ Package-manager capabilities
ts/ Browser client, auth storage, errors, logging, and exports
docs/ Capability and contributor documentation

The shipped device implementations are concrete: systemd for service actions and LUKS for disk-encryption actions. The public action contract does not expose selectors for unimplemented alternatives. Optional forward capability packages remain isolated until production code deliberately adopts them.

Generate the contract

Install the lockfile-pinned JavaScript tools, then regenerate both languages:

npm ci
make generate

make generate runs protobuf generation, injects Go validation tags, formats the Go output, and generates TypeScript with the same pinned Buf tool used by CI. Generated files are committed.

Verify

Run the canonical standalone-module gate:

./scripts/verify.sh

It checks formatting, build, vet, static analysis, Go tests, Buf lint and format, docref, generated-code drift, TypeScript typechecking, and TypeScript tests. GOWORK=off is intentional so the result matches a standalone SDK checkout.

Useful focused commands:

env GOWORK=off go test ./...
npm run typecheck
npm test
npm run lint:proto
npm run format:proto
docref check

See CONTRIBUTING.md for contribution mechanics and docs/04-contributing/01-release-coordination.md for coordinated SDK/server/agent publication.

Documentation

Overview

Package sdk provides a client library for communicating with the power-manage server.

Index

Constants

View Source
const (
	MinHeartbeatInterval = 5 * time.Second
	MaxHeartbeatInterval = 5 * time.Minute
)

Heartbeat interval bounds. The SDK clamps server-supplied values from Welcome.heartbeat_interval into this range before applying them, so a misconfigured or malicious server can never push the cadence outside what's safe for both sides (too fast = stream spam, too slow = agent looks dead to control's liveness tracking).

Variables

This section is empty.

Functions

func NewULID

func NewULID() string

NewULID generates a new ULID string.

func ValidateHTTPSURL

func ValidateHTTPSURL(raw string) error

ValidateHTTPSURL returns a non-nil error unless raw is a well-formed https://host URL. It parses rather than prefix-checks so every corner a bare "starts with https://" test misses fails closed:

  • non-https schemes (http, ftp, h2c, the empty scheme)
  • case variants (HTTP://, Https://) and leading whitespace
  • opaque forms (https:foo — Opaque != "")
  • hostless URLs (https:)
  • embedded user info (https://user:pass@host) and fragments

It is the single source for the agent's HTTPS-only endpoints, so a cleartext or malformed endpoint is refused before any network call.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client provides methods to communicate with the power-manage server.

func NewClient

func NewClient(serverURL string, opts ...ClientOption) *Client

NewClient creates a new SDK client.

func (*Client) AuthToken

func (c *Client) AuthToken() string

AuthToken returns the current auth token.

func (*Client) Close

func (c *Client) Close() error

Close closes the stream connection and cancels every pending request.

func (*Client) CloseIdleConnections

func (c *Client) CloseIdleConnections()

CloseIdleConnections releases idle keep-alive connections held by this client's transport. The agent calls it when tearing down a connection session before reconnecting (WS13 #8): without it, each reconnect builds a fresh client whose mTLS transport keeps its own idle-connection pool, leaking sockets/file-descriptors across a long-lived reconnect loop. Safe to call on a client with no custom transport (http.DefaultClient.Transport) or a nil client.

func (*Client) Connect

func (c *Client) Connect(ctx context.Context) error

Connect establishes a bidirectional stream with the server.

func (*Client) DeviceID

func (c *Client) DeviceID() string

DeviceID returns the current device ID.

func (*Client) GetLuksKey

func (c *Client) GetLuksKey(ctx context.Context, actionID string) (*pm.SealedValue, error)

GetLuksKey sends a GetLuksKeyRequest on the stream and waits for the correlated response, matched by message ID.

The returned passphrase is sealed to this device's enrollment recipient key. Opening it is the caller's job, at the narrow sink immediately before use — the SDK deliberately does not unseal here, so the plaintext never exists in a general-purpose transport helper.

func (*Client) Receive

func (c *Client) Receive(ctx context.Context) (*pm.ServerMessage, error)

Receive receives the next message from the server.

func (*Client) Run

func (c *Client) Run(ctx context.Context, hostname, agentVersion string, heartbeatInterval time.Duration, handler StreamHandler) error

Run connects to the server and processes messages using the provided handler.

heartbeatInterval is the initial cadence used until the server's Welcome message arrives. If Welcome.heartbeat_interval is set and falls within [MinHeartbeatInterval, MaxHeartbeatInterval], the SDK resets the heartbeat ticker to that value — both on the initial connect and on every subsequent reconnect (each reconnect is a fresh Run() call that receives a fresh Welcome). Out-of-range values are clamped; zero / unset keeps the caller-supplied interval.

func (*Client) SendActionResult

func (c *Client) SendActionResult(ctx context.Context, result *pm.ActionResult) error

SendActionResult reports the outcome of one occurrence. The result must carry the delivery_id and occurrence_id it descends from; control keys ingestion on that pair, so a result replayed after a reconnect updates the same row instead of creating a second one.

func (*Client) SendDeliveryReceipt added in v0.5.4

func (c *Client) SendDeliveryReceipt(ctx context.Context, deliveryID string) error

SendDeliveryReceipt confirms that a delivery is durably recorded on this device. Control advances the delivery only on this frame, never on its own successful socket write, so the caller MUST NOT send it before the local commit has landed.

runManifestDelivery calls this only after the handler returns nil, making the durable-record-before-receipt ordering structural.

func (*Client) SendHeartbeat

func (c *Client) SendHeartbeat(ctx context.Context, hb *pm.Heartbeat) error

SendHeartbeat sends a heartbeat message to the server.

func (*Client) SendHello

func (c *Client) SendHello(ctx context.Context, hostname, agentVersion string) error

SendHello sends a hello message to the server.

func (*Client) SendInventory

func (c *Client) SendInventory(ctx context.Context, inventory *pm.DeviceInventory) error

SendInventory sends device inventory to the server.

func (*Client) SendLogQueryResult

func (c *Client) SendLogQueryResult(ctx context.Context, result *pm.LogQueryResult) error

SendLogQueryResult sends a log query result to the server.

func (*Client) SendManifestResult added in v0.5.4

func (c *Client) SendManifestResult(ctx context.Context, result *pm.ManifestResult) error

SendManifestResult reports the outcome of a complete manifest, once, after its occurrences have reported individually.

func (*Client) SendOutputChunk

func (c *Client) SendOutputChunk(ctx context.Context, chunk *pm.OutputChunk) error

SendOutputChunk sends an output chunk during action execution.

func (*Client) SendQueryResult

func (c *Client) SendQueryResult(ctx context.Context, result *pm.OSQueryResult) error

SendQueryResult sends an OS query result to the server.

func (*Client) SendRevokeLuksDeviceKeyResult

func (c *Client) SendRevokeLuksDeviceKeyResult(ctx context.Context, actionID string, success bool, errMsg string) error

SendRevokeLuksDeviceKeyResult sends the result of a LUKS device key revocation back to the server.

func (*Client) SendSecurityAlert

func (c *Client) SendSecurityAlert(ctx context.Context, alert *pm.SecurityAlert) error

SendSecurityAlert sends a security alert to the server for audit logging.

func (*Client) SendTerminalOutput

func (c *Client) SendTerminalOutput(ctx context.Context, out *pm.TerminalOutput) error

SendTerminalOutput sends a stdout/stderr chunk from a remote terminal session back to the server. The TerminalHandler is responsible for chunking PTY reads to fit the proto's 64KB max data size.

func (*Client) SendTerminalStateChange

func (c *Client) SendTerminalStateChange(ctx context.Context, change *pm.TerminalStateChange) error

SendTerminalStateChange reports a terminal session lifecycle event (started, exited with code, error). Send STARTED immediately after the PTY is allocated, EXITED when the shell process exits cleanly, and ERROR for any failure that ends the session before STARTED or in flight.

func (*Client) StartReceiver

func (c *Client) StartReceiver(ctx context.Context) context.CancelFunc

StartReceiver starts a background goroutine that receives stream messages and delivers them to pending correlated request channels. Returns a cancel function to stop the receiver. This is useful for CLI tools that need request-response correlation without the full Run() loop. The caller must call Connect() and SendHello() before calling this.

func (*Client) StoreLpsPasswords added in v0.5.4

func (c *Client) StoreLpsPasswords(ctx context.Context, actionID string, rotations []*pm.LpsPasswordRotation) error

StoreLpsPasswords reports one LPS execution's password rotations and waits for the server confirmation.

Each rotation's password must already be sealed to control's deployment sealing key, with AAD binding the device, the action and that rotation's username — the username binding is what stops a blob being stored under a different account than the one it was generated for.

Request/response are correlated by message id like every other stream call, so a failed batch is reported rather than silently dropped: LPS rotations are unrecoverable if lost — the agent has already changed the local password.

func (*Client) StoreLuksKey

func (c *Client) StoreLuksKey(ctx context.Context, actionID, devicePath string, passphrase *pm.SealedValue, reason pm.RotationReason) error

StoreLuksKey sends a StoreLuksKeyRequest on the stream and waits for the server confirmation.

passphrase must already be sealed to control's deployment sealing key, with AAD binding this device and actionID. The SDK does not seal for the caller: sealing needs the recipient key and the action context, both of which belong to the agent, and a transport helper that accepted plaintext would be the one place a credential could be logged by accident.

func (*Client) Sync added in v0.5.4

func (c *Client) Sync(ctx context.Context) (*SyncStateResult, error)

Sync requests the current deliveries and device policy on the existing stream. The caller records every delivery before sending its receipt.

func (*Client) ValidateLuksToken

func (c *Client) ValidateLuksToken(ctx context.Context, token string) (*ValidateLuksTokenResult, error)

ValidateLuksToken validates and atomically consumes a one-time LUKS token on the existing authenticated agent stream.

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption configures the client.

func WithAuth

func WithAuth(deviceID, authToken string) ClientOption

WithAuth sets the device ID and auth token.

func WithH2C

func WithH2C() ClientOption

WithH2C configures the client to use HTTP/2 cleartext (h2c) without TLS. This is useful for development/testing when connecting to servers that use h2c instead of HTTPS. WARNING: Only use this for development/testing - data is not encrypted!

func WithHTTPClient

func WithHTTPClient(hc *http.Client) ClientOption

WithHTTPClient sets a custom HTTP client.

func WithLogger

func WithLogger(l *slog.Logger) ClientOption

WithLogger sets a custom structured logger for the client.

func WithMTLS

func WithMTLS(certFile, keyFile, caFile string) (ClientOption, error)

WithMTLS configures the client to use mTLS authentication. certFile and keyFile are the paths to the client certificate and key. caFile is the path to the CA certificate for server verification.

func WithMTLSFromPEM

func WithMTLSFromPEM(certPEM, keyPEM, caPEM []byte) (ClientOption, error)

WithMTLSFromPEM configures mTLS using PEM-encoded certificate data.

Trust is strict: the returned TLS config verifies the server ONLY against caPEM. This is the correct setup for talking to the internal-CA-signed control agent listener over mTLS — system roots are NOT consulted, so a cert signed by any public CA cannot impersonate control even if its SNI matches.

For reaching servers whose public-facing HTTPS cert is signed by a public CA (typically a Traefik reverse proxy with Let's Encrypt in front of the control server), pair the client certificate with system roots via WithMTLSFromPEMAndSystemRoots instead.

func WithMTLSFromPEMAndSystemRoots

func WithMTLSFromPEMAndSystemRoots(certPEM, keyPEM, caPEM []byte) (ClientOption, error)

WithMTLSFromPEMAndSystemRoots is like WithMTLSFromPEM but the server-verification root pool contains caPEM PLUS the host's system roots. Use this when the server sits behind a public CA (e.g. a Traefik reverse proxy terminating TLS with Let's Encrypt) and the client cert must still authenticate the agent's identity at the application layer — for example the ControlService.RenewCertificate RPC, which can travel over a public-LE-fronted HTTPS endpoint and also passes the current certificate in the request body.

Do NOT use this for the agent's mTLS stream: control's agent listener is internal-CA only, and broadening its trust to system roots lets any publicly-trusted cert with a matching SNI impersonate it.

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) ClientOption

WithTLSConfig configures the client with a custom TLS configuration.

type InventoryHandler

type InventoryHandler interface {
	StreamHandler
	// CollectInventory gathers hardware/software inventory from the device on
	// the agent's OWN schedule (on connect + every 24h). Returns nil if
	// collection is unavailable (e.g. osquery not installed).
	CollectInventory(ctx context.Context) *pm.DeviceInventory
	// OnRequestInventory handles a control-originated RequestInventory,
	// collecting the same inventory on demand and correlating it with the
	// request's query_id. Returns nil when collection is unavailable.
	OnRequestInventory(ctx context.Context, req *pm.RequestInventory) *pm.DeviceInventory
}

InventoryHandler extends StreamHandler with device inventory collection support. Handlers that implement this interface can collect and send hardware/software inventory.

type LogQueryHandler

type LogQueryHandler interface {
	StreamHandler
	// OnLogQuery is called when the server sends a log query request.
	OnLogQuery(ctx context.Context, query *pm.LogQuery) (*pm.LogQueryResult, error)
}

LogQueryHandler extends StreamHandler with remote log query support. Handlers that implement this interface can execute journalctl queries on the device.

type LuksHandler

type LuksHandler interface {
	StreamHandler
	// OnRevokeLuksDeviceKey is called when control requests revocation of a
	// LUKS device-bound key. The full message is delivered rather than the
	// bare action_id so the handler keeps whatever context later fields add.
	// Returns (success, errorMessage).
	OnRevokeLuksDeviceKey(ctx context.Context, req *pm.RevokeLuksDeviceKey) (bool, string)
}

LuksHandler extends StreamHandler with LUKS device-key revocation support. Handlers that implement this interface will receive revoke requests from the server.

type RegisterAgentResult

type RegisterAgentResult struct {
	DeviceID    string
	CACert      []byte
	Certificate []byte
	// ControlURL is where the agent dials its AgentService stream — control's
	// agent listener, normally a different host from the API URL registration
	// went to.
	ControlURL string
	// ControlSealingPublicKey is control's deployment X25519 public key, raw
	// 32-byte encoding. The agent pins it alongside CACert and seals every
	// secret it reports to it.
	ControlSealingPublicKey []byte
}

RegisterAgentResult contains the result of agent registration.

func RegisterAgent

func RegisterAgent(ctx context.Context, controlURL string, token, hostname, agentVersion string, csr, sealingPubKey []byte, opts ...ClientOption) (*RegisterAgentResult, error)

RegisterAgent registers an agent with the control server. This is a standalone function that uses ControlServiceClient (not AgentServiceClient). The controlURL is the control server's public API URL (where the web UI connects). The result's ControlURL is a DIFFERENT host — control's agent listener, which the agent dials for its stream.

sealingPubKey is the raw 32-byte X25519 public key the agent generated for this enrollment; control seals to it for the lifetime of the device identity issued here. It is a required parameter rather than an option because an enrollment without it produces a device control can never send a secret to.

type RenewCertificateResult

type RenewCertificateResult struct {
	Certificate []byte
	NotAfter    time.Time
	CACert      []byte // Active CA certificate (non-empty when CA has been rotated)
}

RenewCertificateResult contains the result of certificate renewal.

func RenewCertificate

func RenewCertificate(ctx context.Context, controlURL string, csr, currentCert []byte, opts ...ClientOption) (*RenewCertificateResult, error)

RenewCertificate renews a device certificate via the control server. The agent presents its current certificate for identity verification.

type StreamHandler

type StreamHandler interface {
	// OnWelcome is called when the server sends a welcome message.
	OnWelcome(ctx context.Context, welcome *pm.Welcome) error
	// OnManifestDelivery is called when control delivers a manifest on the
	// authenticated stream.
	//
	// The handler MUST durably record the delivery, keyed by its delivery_id,
	// before returning nil. The SDK sends DeliveryReceipt only on a nil
	// return, so a receipt can never claim durability the device does not
	// have; control keeps redelivering until it sees one. A delivery_id the
	// handler already holds is a retry: record-once, execute-once, return nil
	// again so the receipt is re-sent.
	//
	// Returning an error means the delivery was NOT recorded. No receipt is
	// sent and the error is logged; control redelivers.
	//
	// Execution is the handler's own business, driven off its durable record
	// and reported asynchronously with SendActionResult (per occurrence) and
	// SendManifestResult (once for the manifest).
	OnManifestDelivery(ctx context.Context, delivery *pm.ManifestDelivery) error
	// OnQuery is called when the server sends an OS query.
	OnQuery(ctx context.Context, query *pm.OSQuery) (*pm.OSQueryResult, error)
	// OnError is called when the server sends an error.
	OnError(ctx context.Context, err *pm.Error) error
}

StreamHandler handles messages received from the server.

type StreamingHandler

type StreamingHandler interface {
	StreamHandler
	// OnManifestDeliveryWithStreaming carries the same durable-receipt
	// contract as OnManifestDelivery — nil return means recorded, and only
	// then does the SDK send the receipt. sendChunk streams per-occurrence
	// output while the manifest executes.
	OnManifestDeliveryWithStreaming(ctx context.Context, delivery *pm.ManifestDelivery, sendChunk func(*pm.OutputChunk) error) error
}

StreamingHandler extends StreamHandler with output streaming during manifest execution. Handlers that implement this interface receive a callback for pushing output chunks as the manifest's occurrences run.

type SyncStateResult added in v0.5.4

type SyncStateResult struct {
	// Deliveries are every manifest delivery currently assigned to this
	// device, in exactly the form the stream pushes them. The caller records
	// each one under its delivery_id and receipts it the same way, so a
	// delivery already known from the stream is recognised as a repeat rather
	// than executed twice.
	Deliveries []*pm.ManifestDelivery
	// SyncIntervalMinutes is the effective sync interval for this device.
	// 0 means use the default (30 minutes).
	SyncIntervalMinutes int32
	// MaintenanceWindow is the server-resolved union of every reaching
	// group's window (device groups + user groups assigned to the
	// device). nil means "no constraint" — the agent dispatches at any
	// time. The agent evaluates this against time.Now().Local() before
	// firing scheduler-driven dispatches; instant actions bypass the gate.
	MaintenanceWindow *pm.MaintenanceWindow
}

SyncStateResult contains the current device state returned over the stream.

type TerminalHandler

type TerminalHandler interface {
	StreamHandler
	// OnTerminalStart is called when the server requests a new PTY.
	// The handler should validate tty_user, allocate the PTY, kick off
	// I/O goroutines, and send a TERMINAL_SESSION_STATE_STARTED state
	// change. If allocation fails, it MUST send a STATE_ERROR instead.
	OnTerminalStart(ctx context.Context, req *pm.TerminalStart) error
	// OnTerminalInput is called for every stdin frame from the server.
	// The handler should write the bytes to the PTY of the matching
	// session_id and ignore (with a debug log) frames for unknown
	// sessions.
	OnTerminalInput(ctx context.Context, req *pm.TerminalInput) error
	// OnTerminalResize forwards a TIOCSWINSZ to the session's PTY.
	// Unknown sessions are ignored.
	OnTerminalResize(ctx context.Context, req *pm.TerminalResize) error
	// OnTerminalStop terminates the session and reverts any side effects
	// (shell unmask, temp home cleanup, etc.). Unknown sessions are
	// idempotent no-ops so the server can fire and forget on disconnect.
	OnTerminalStop(ctx context.Context, req *pm.TerminalStop) error
}

TerminalHandler extends StreamHandler with remote terminal (PTY) session support. Handlers that implement this interface receive the four server-initiated session control messages from manchtools/power-manage-sdk#16 and are responsible for allocating PTYs, relaying I/O, and reporting state back via Client.SendTerminalOutput / Client.SendTerminalStateChange.

All four methods MUST return promptly: the SDK invokes them on the receive loop, so a slow handler will stall delivery of every other ServerMessage variant. Implementations should hand off to a per-session goroutine for any blocking I/O.

A nil error from these methods means the request was accepted; the handler is expected to surface terminal-level failures via SendTerminalStateChange with a TERMINAL_SESSION_STATE_ERROR payload. Returning a non-nil error from OnTerminalStart/Input/Resize/Stop is treated as a fatal stream error and tears down the agent connection.

type ValidateLuksTokenResult

type ValidateLuksTokenResult struct {
	ActionID   string
	DevicePath string
	MinLength  int32
	Complexity pm.LpsPasswordComplexity
}

ValidateLuksTokenResult contains the result of a LUKS token validation.

Directories

Path Synopsis
Package archtest holds architectural fitness functions for the SDK: self-discovering, module-wide invariant tests that fail the build when a known code smell is reintroduced or a good pattern is broken.
Package archtest holds architectural fitness functions for the SDK: self-discovering, module-wide invariant tests that fail the build when a known code smell is reintroduced or a good pattern is broken.
cmd
powermanage command
Command powermanage is the open operator client for a Power Manage control server.
Command powermanage is the open operator client for a Power Manage control server.
Package crypto provides cryptographic utilities for certificate management.
Package crypto provides cryptographic utilities for certificate management.
Package cryptotest provides shared X.509 test fixtures so the sdk and agent test suites do not each re-implement ECDSA P-256 certificate construction (WS16b DRY).
Package cryptotest provides shared X.509 test fixtures so the sdk and agent test suites do not each re-implement ECDSA P-256 certificate construction (WS16b DRY).
gen
Package maintenance hosts the canonical parser, validator, union resolver and evaluator for powermanage.v1.MaintenanceWindow.
Package maintenance hosts the canonical parser, validator, union resolver and evaluator for powermanage.v1.MaintenanceWindow.
Package pkg provides a uniform package-manager abstraction for Linux.
Package pkg provides a uniform package-manager abstraction for Linux.
sys
antivirus
Package antivirus manages an on-host antivirus engine through an injected exec.Runner.
Package antivirus manages an on-host antivirus engine through an injected exec.Runner.
catrust
Package catrust manages the host's system-wide CA trust anchors through an injected exec.Runner (plus the fs.Manager for the privileged file writes).
Package catrust manages the host's system-wide CA trust anchors through an injected exec.Runner (plus the fs.Manager for the privileged file writes).
desktop
Package desktop discovers active graphical desktop sessions on the host so user-scoped actions (Flatpak --user installs, shell scripts that need a real $HOME and DBus session bus, etc.) can fan out to every currently-signed-in user instead of running under the agent's own root context.
Package desktop discovers active graphical desktop sessions on the host so user-scoped actions (Flatpak --user installs, shell scripts that need a real $HOME and DBus session bus, etc.) can fan out to every currently-signed-in user instead of running under the agent's own root context.
dns
Package dns manages a host's DNS resolver configuration through an injected exec.Runner.
Package dns manages a host's DNS resolver configuration through an injected exec.Runner.
encryption
Package encryption manages disk encryption through an injected exec.Runner.
Package encryption manages disk encryption through an injected exec.Runner.
exec
Package exec provides command execution utilities for Linux system management.
Package exec provides command execution utilities for Linux system management.
exec/exectest
Package exectest provides a fake exec.Runner for unit-testing capability packages with no host, no sudo, and no container.
Package exectest provides a fake exec.Runner for unit-testing capability packages with no host, no sudo, and no container.
firewall
Package firewall is a cross-backend abstraction for host packet-filter management.
Package firewall is a cross-backend abstraction for host packet-filter management.
fs
Package fs provides privileged filesystem operations for Linux system management, driven by an injected exec.Runner rather than a process-global privilege backend.
Package fs provides privileged filesystem operations for Linux system management, driven by an injected exec.Runner rather than a process-global privilege backend.
inventory
Package inventory provides lightweight system inventory collection using standard Linux interfaces (/proc, /etc, standard tools) without requiring osquery.
Package inventory provides lightweight system inventory collection using standard Linux interfaces (/proc, /etc, standard tools) without requiring osquery.
log
Package log reads system logs through an injected exec.Runner.
Package log reads system logs through an injected exec.Runner.
netconfig
Package netconfig manages a host's per-interface IP / routing / MTU configuration through an injected exec.Runner.
Package netconfig manages a host's per-interface IP / routing / MTU configuration through an injected exec.Runner.
network
Package network manages WiFi connection profiles through an injected exec.Runner.
Package network manages WiFi connection profiles through an injected exec.Runner.
notify
Package notify sends system-wide notifications to logged-in users through an injected exec.Runner.
Package notify sends system-wide notifications to logged-in users through an injected exec.Runner.
osquery
Package osquery integrates the osquery binary for system queries through an injected exec.Runner.
Package osquery integrates the osquery binary for system queries through an injected exec.Runner.
reboot
Package reboot provides system reboot detection and scheduling through an injected exec.Runner.
Package reboot provides system reboot detection and scheduling through an injected exec.Runner.
remote
Package remote pulls files or directory trees onto a managed machine from one of three sources: a public HTTP URL, a version-controlled repository (Git in v1, with a pluggable interface for future drivers), or an anonymous S3-compatible endpoint.
Package remote pulls files or directory trees onto a managed machine from one of three sources: a public HTTP URL, a version-controlled repository (Git in v1, with a pluggable interface for future drivers), or an anonymous S3-compatible endpoint.
repo
Package repo configures external package-manager repositories through an injected exec.Runner, the same dependency-injected idiom as pkg/fs/network.
Package repo configures external package-manager repositories through an injected exec.Runner, the same dependency-injected idiom as pkg/fs/network.
service
Package service manages init/service units through an injected exec.Runner.
Package service manages init/service units through an injected exec.Runner.
smart
Package smart reads S.M.A.R.T. disk health via smartctl (smartmontools) through an injected exec.Runner.
Package smart reads S.M.A.R.T. disk health via smartctl (smartmontools) through an injected exec.Runner.
terminal
Package terminal provides PTY-based shell session management for remote terminal access.
Package terminal provides PTY-based shell session management for remote terminal access.
timesync
Package timesync reads a host's clock-synchronization status through an injected exec.Runner.
Package timesync reads a host's clock-synchronization status through an injected exec.Runner.
user
Package user manages Linux user accounts and groups through an injected exec.Runner.
Package user manages Linux user accounts and groups through an injected exec.Runner.
test
protovalidatecoverage command
Command protovalidatecoverage scans .proto files under the supplied directory and prints a human-readable summary of fields that lack a `validate:` constraint declared via the @gotags marker (protoc-go-inject-tag convention), across ALL messages (requests AND responses) for triage.
Command protovalidatecoverage scans .proto files under the supplied directory and prints a human-readable summary of fields that lack a `validate:` constraint declared via the @gotags marker (protoc-go-inject-tag convention), across ALL messages (requests AND responses) for triage.

Jump to

Keyboard shortcuts

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