internal/

directory
v1.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2026 License: GPL-3.0

Directories

Path Synopsis
Package agentauth verifies agent API tokens (pwk_<id>_<secret>) for the MCP endpoint (docs/design/mcp.md §7, ADR-0010).
Package agentauth verifies agent API tokens (pwk_<id>_<secret>) for the MCP endpoint (docs/design/mcp.md §7, ADR-0010).
Package api provides HTTP handlers for the PiWorker API.
Package api provides HTTP handlers for the PiWorker API.
Package backup makes and restores whole-state backups of a PiWorker installation (ADR-0032, docs/design/backups-and-updates.md).
Package backup makes and restores whole-state backups of a PiWorker installation (ADR-0032, docs/design/backups-and-updates.md).
fakes3
Package fakes3 is an in-memory, path-style S3 endpoint for tests: enough of the protocol for PUT (plain or aws-chunked), GET, HEAD, DELETE and ListObjectsV2.
Package fakes3 is an in-memory, path-style S3 endpoint for tests: enough of the protocol for PUT (plain or aws-chunked), GET, HEAD, DELETE and ListObjectsV2.
Package brokers holds the named MQTT broker connections (ADR-0026): a broker URL, credentials and a Zigbee2MQTT base topic, defined once in the editor and referenced by name from the Zigbee nodes.
Package brokers holds the named MQTT broker connections (ADR-0026): a broker URL, credentials and a Zigbee2MQTT base topic, defined once in the editor and referenced by name from the Zigbee nodes.
Package config loads PiWorker configuration from defaults, a TOML file, and environment variables.
Package config loads PiWorker configuration from defaults, a TOML file, and environment variables.
Package events provides a process-wide publish/subscribe hub that streams per-node execution events (running/success/error) and debug-node output from the flow runtime to live subscribers such as the editor's SSE endpoint.
Package events provides a process-wide publish/subscribe hub that streams per-node execution events (running/success/error) and debug-node output from the flow runtime to live subscribers such as the editor's SSE endpoint.
Package flow provides the core data models and runtime for flow-based automation.
Package flow provides the core data models and runtime for flow-based automation.
Package hostsys reads host figures from Linux's /sys, on every architecture PiWorker ships for: the Raspberry Pi and other ARM boards expose the CPU as a thermal zone, x86_64 PCs as a thermal zone (Intel's x86_pkg_temp) or only as a hwmon chip (Intel coretemp, AMD k10temp).
Package hostsys reads host figures from Linux's /sys, on every architecture PiWorker ships for: the Raspberry Pi and other ARM boards expose the CPU as a thermal zone, x86_64 PCs as a thermal zone (Intel's x86_pkg_temp) or only as a hwmon chip (Intel coretemp, AMD k10temp).
Package llm connects PiWorker to large language models (ADR-0038, docs/design/llm.md): named LLM connections defined by the admin (a provider, an endpoint, an API key and a default model), the provider clients the LLM nodes use (Anthropic through its official Go SDK; OpenAI and every OpenAI-compatible server, such as Ollama, LM Studio or OpenRouter, over HTTP), a daily token budget per connection, the local conversation memory and the local knowledge base (embeddings in SQLite).
Package llm connects PiWorker to large language models (ADR-0038, docs/design/llm.md): named LLM connections defined by the admin (a provider, an endpoint, an API key and a default model), the provider clients the LLM nodes use (Anthropic through its official Go SDK; OpenAI and every OpenAI-compatible server, such as Ollama, LM Studio or OpenRouter, over HTTP), a daily token budget per connection, the local conversation memory and the local knowledge base (embeddings in SQLite).
Package mcpserver serves the /mcp endpoint (docs/design/mcp.md §8, ADR-0009, ADR-0010): the Model Context Protocol over Streamable HTTP in stateless mode with JSON responses, for AI agents holding an agent token.
Package mcpserver serves the /mcp endpoint (docs/design/mcp.md §8, ADR-0009, ADR-0010): the Model Context Protocol over Streamable HTTP in stateless mode with JSON responses, for AI agents holding an agent token.
Package metrics provides Prometheus metrics for PiWorker.
Package metrics provides Prometheus metrics for PiWorker.
Package mqttpool shares MQTT broker connections between the nodes and services of the process (ADR-0025).
Package mqttpool shares MQTT broker connections between the nodes and services of the process (ADR-0025).
Package mqtttest provides an in-process MQTT 3.1.1 broker for tests.
Package mqtttest provides an in-process MQTT 3.1.1 broker for tests.
Package node provides the interface definitions and registry for flow nodes.
Package node provides the interface definitions and registry for flow nodes.
builtin
Package builtin provides the standard set of built-in nodes for PiWorker.
Package builtin provides the standard set of built-in nodes for PiWorker.
Package redact hides credentials that URLs carry (userinfo, query string, fragment) in text shown outside the server: node errors, agent results.
Package redact hides credentials that URLs carry (userinfo, query string, fragment) in text shown outside the server: node errors, agent results.
Package secrets provides a process-wide store for named secret values (API tokens, SMTP passwords, …) that flow nodes reference as {{secret.NAME}} instead of embedding the plaintext in the flow definition.
Package secrets provides a process-wide store for named secret values (API tokens, SMTP passwords, …) that flow nodes reference as {{secret.NAME}} instead of embedding the plaintext in the flow definition.
Package service holds the operations shared by the REST API and the MCP endpoint (docs/design/mcp.md §6): both are thin adapters over it, so permissions, argument validation, limits, approvals, redaction and audit are enforced in one place.
Package service holds the operations shared by the REST API and the MCP endpoint (docs/design/mcp.md §6): both are thin adapters over it, so permissions, argument validation, limits, approvals, redaction and audit are enforced in one place.
Package storage provides persistence for flows and related data.
Package storage provides persistence for flows and related data.
Package storesbackup exports and restores the installation's stores that a flow export does not carry (ADR-0031): the global variables, each flow's variables, the named broker connections, the LLM connections (ADR-0038) and the secrets.
Package storesbackup exports and restores the installation's stores that a flow export does not carry (ADR-0031): the global variables, each flow's variables, the named broker connections, the LLM connections (ADR-0038) and the secrets.
Package tlsca provides PiWorker's native HTTPS certificates: a local certificate authority generated on first start and a server certificate signed by it.
Package tlsca provides PiWorker's native HTTPS certificates: a local certificate authority generated on first start and a server certificate signed by it.
Package toolschema compiles and enforces the closed JSON Schema subset that PiWorker accepts for the input of MCP tools (ADR-0013, docs/design/mcp.md §5).
Package toolschema compiles and enforces the closed JSON Schema subset that PiWorker accepts for the input of MCP tools (ADR-0013, docs/design/mcp.md §5).
Package types provides shared type definitions for the PiWorker flow system.
Package types provides shared type definitions for the PiWorker flow system.
Package vars provides a process-wide key/value store for flow variables, shared by the set-var and get-var nodes.
Package vars provides a process-wide key/value store for flow variables, shared by the set-var and get-var nodes.
Package webhook provides a process-wide hub that routes incoming HTTP webhook requests to registered handlers.
Package webhook provides a process-wide hub that routes incoming HTTP webhook requests to registered handlers.
Package webui provides embedded frontend assets for production deployment.
Package webui provides embedded frontend assets for production deployment.
Package zigbee speaks Zigbee2MQTT's MQTT API: its topics, device names, availability, bridge messages and the device list with each device's features ("exposes").
Package zigbee speaks Zigbee2MQTT's MQTT API: its topics, device names, availability, bridge messages and the device list with each device's features ("exposes").

Jump to

Keyboard shortcuts

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