internal/

directory
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2026 License: AGPL-3.0

Directories

Path Synopsis
Package agents is the single source of truth for the agent CLIs PANDA can delegate to.
Package agents is the single source of truth for the agent CLIs PANDA can delegate to.
Package artifact packs and unpacks task artifacts: the directory trees that have to travel between nodes when one node produces work another node consumes.
Package artifact packs and unpacks task artifacts: the directory trees that have to travel between nodes when one node produces work another node consumes.
Package askengine is the unified entry engine shared by `panda ask` (CLI) and the web panel: one prompt in, three intents out — answer (pure LLM reply), tool_call (memory tools, executed and fed back), task (submitted to the node network, locally or delegated).
Package askengine is the unified entry engine shared by `panda ask` (CLI) and the web panel: one prompt in, three intents out — answer (pure LLM reply), tool_call (memory tools, executed and fed back), task (submitted to the node network, locally or delegated).
Package auth holds subscription-OAuth plumbing: PKCE flows against providers whose consumer subscriptions also grant API access, plus the on-disk token store the entry client reads for a Bearer credential.
Package auth holds subscription-OAuth plumbing: PKCE flows against providers whose consumer subscriptions also grant API access, plus the on-disk token store the entry client reads for a Bearer credential.
Package bus implements the WebSocket transport and wire protocol for node-to-node task delegation (design doc §10).
Package bus implements the WebSocket transport and wire protocol for node-to-node task delegation (design doc §10).
Package carddetect probes host hardware, discovers installed agent CLIs, and assembles or initializes capability cards (capabilities.yaml).
Package carddetect probes host hardware, discovers installed agent CLIs, and assembles or initializes capability cards (capabilities.yaml).
Package cardmut implements structured edits to a node's capability card (capabilities.yaml): add/remove/set of native abilities, agents and manual abilities without opening an editor.
Package cardmut implements structured edits to a node's capability card (capabilities.yaml): add/remove/set of native abilities, agents and manual abilities without opening an editor.
Package cliui is OpenPanda's terminal presentation layer: one colour vocabulary, one spinner, one live status line, shared by every CLI surface.
Package cliui is OpenPanda's terminal presentation layer: one colour vocabulary, one spinner, one live status line, shared by every CLI surface.
Package commander implements the three-tier capability execution: native (deterministic commands, no model), agent (AI CLI via adapter), and manual (human-notified).
Package commander implements the three-tier capability execution: native (deterministic commands, no model), agent (AI CLI via adapter), and manual (human-notified).
Package config loads PANDA node configuration from YAML.
Package config loads PANDA node configuration from YAML.
Package core hosts the node lifecycle: registration, heartbeat loop, and graceful shutdown.
Package core hosts the node lifecycle: registration, heartbeat loop, and graceful shutdown.
Package ctxstore implements the local context snapshot cache (design doc §12.4): a hash→data KV store over the `context` table with LRU eviction.
Package ctxstore implements the local context snapshot cache (design doc §12.4): a hash→data KV store over the `context` table with LRU eviction.
Package defense implements the task-loop defense chain (design doc §14) and the permission model (design doc §16).
Package defense implements the task-loop defense chain (design doc §14) and the permission model (design doc §16).
Package doctor is the structured self-check suite shared by `panda doctor` (which renders the checks as a terminal report) and the panel's /api/doctor (which serializes them to JSON).
Package doctor is the structured self-check suite shared by `panda doctor` (which renders the checks as a terminal report) and the panel's /api/doctor (which serializes them to JSON).
Package entry implements the unified entry model (design doc §7): one model call classifies a user request as an answer, a controlled tool call, a structured task, or a multi-stage plan.
Package entry implements the unified entry model (design doc §7): one model call classifies a user request as an answer, a controlled tool call, a structured task, or a multi-stage plan.
Package executil wraps os/exec so child processes can be hidden on Windows.
Package executil wraps os/exec so child processes can be hidden on Windows.
Package guard is the panic firewall for long-lived goroutines.
Package guard is the panic firewall for long-lived goroutines.
Package hwinfo probes the host machine's hardware identity (hostname, CPU model, RAM, GPU, VRAM).
Package hwinfo probes the host machine's hardware identity (hostname, CPU model, RAM, GPU, VRAM).
Package i18n provides the CLI's user-facing strings in the five project languages (the same set the READMEs and web console ship).
Package i18n provides the CLI's user-facing strings in the five project languages (the same set the READMEs and web console ship).
Package install implements `panda install` / `panda uninstall` / `panda doctor`: placing the binary on PATH (persistently, per-OS), and a whitelist-based uninstall that backs up and removes only OpenPanda-owned state while preserving user assets (projects, memory, skills, work) — unless the user passes --purge and survives its second confirmation.
Package install implements `panda install` / `panda uninstall` / `panda doctor`: placing the binary on PATH (persistently, per-OS), and a whitelist-based uninstall that backs up and removes only OpenPanda-owned state while preserving user assets (projects, memory, skills, work) — unless the user passes --purge and survives its second confirmation.
Package ledger manages the local capability directory (SQLite cache of node capability cards) and this node's self-registration.
Package ledger manages the local capability directory (SQLite cache of node capability cards) and this node's self-registration.
Package log provides structured JSON logging over slog.
Package log provides structured JSON logging over slog.
Package mcp is a minimal Model Context Protocol (MCP) client over stdio.
Package mcp is a minimal Model Context Protocol (MCP) client over stdio.
Package mcpserve is the server half of the MCP stdio transport the agent tier already speaks as a client (internal/mcp): newline-delimited JSON-RPC 2.0 on a reader/writer pair, the initialize handshake, tools/list and tools/call.
Package mcpserve is the server half of the MCP stdio transport the agent tier already speaks as a client (internal/mcp): newline-delimited JSON-RPC 2.0 on a reader/writer pair, the initialize handshake, tools/list and tools/call.
Package mdtext converts light Markdown into the two forms OpenPanda's surfaces need beyond a rendered web page:
Package mdtext converts light Markdown into the two forms OpenPanda's surfaces need beyond a rendered web page:
Package memory implements the two-layer memory system (design doc §17): Hermes personal-assistant memory and per-project memory, kept physically isolated by an isolation wall.
Package memory implements the two-layer memory system (design doc §17): Hermes personal-assistant memory and per-project memory, kept physically isolated by an isolation wall.
Package nodeidentity owns the process-wide identity lock for a running node.
Package nodeidentity owns the process-wide identity lock for a running node.
Package plan is the plan plane: the missing third layer between "one task, one node" and the scenario this project exists for — develop on the Mac, train on the Windows box, report through the Pi.
Package plan is the plan plane: the missing third layer between "one task, one node" and the scenario this project exists for — develop on the Mac, train on the Windows box, report through the Pi.
Package projects makes a project a first-class entity rather than a name that happens to appear on some tasks.
Package projects makes a project a first-class entity rather than a name that happens to appear on some tasks.
Package providers is the built-in LLM provider catalogue.
Package providers is the built-in LLM provider catalogue.
Package pyexec resolves the Python interpreter that runs PANDA's agent adapters (adapters/*.py).
Package pyexec resolves the Python interpreter that runs PANDA's agent adapters (adapters/*.py).
Package reminders implements scheduled user reminders (design P1-28): "提醒我 5 分钟后开会" — a reminder is persisted in SQLite, and a Scanner running in the daemon (and/or the web panel) claims each reminder when it comes due and fires a callback (log line, Web Push notification, SSE change signal).
Package reminders implements scheduled user reminders (design P1-28): "提醒我 5 分钟后开会" — a reminder is persisted in SQLite, and a Scanner running in the daemon (and/or the web panel) claims each reminder when it comes due and fires a callback (log line, Web Push notification, SSE change signal).
Package scheduler implements the P2P per-edge routing decision (design doc §6.4, §2.4 DCPS analogy).
Package scheduler implements the P2P per-edge routing decision (design doc §6.4, §2.4 DCPS analogy).
queue
Package queue implements the node-local task queue scheduler: it decides which queued task runs next on this node.
Package queue implements the node-local task queue scheduler: it decides which queued task runs next on this node.
Package security implements the execution-side hardening of design doc §16 and plan P3-29..P3-32: a reduced subprocess environment, network egress validation, secret scrubbing, a high-risk audit trail, and — when sandbox.mode is configured — OS-level confinement for every spawned subprocess (seatbelt on macOS, bubblewrap on Linux; see policy.go and the platform sandbox_* files).
Package security implements the execution-side hardening of design doc §16 and plan P3-29..P3-32: a reduced subprocess environment, network egress validation, secret scrubbing, a high-risk audit trail, and — when sandbox.mode is configured — OS-level confinement for every spawned subprocess (seatbelt on macOS, bubblewrap on Linux; see policy.go and the platform sandbox_* files).
Package sessions implements the web console's conversation model: each session is one chat thread plus — when the working directory is a git repository — a dedicated git worktree, so changes made while answering a session's prompts land on an isolated branch instead of the user's checkout (the codex / claude-code working model).
Package sessions implements the web console's conversation model: each session is one chat thread plus — when the working directory is a git repository — a dedicated git worktree, so changes made while answering a session's prompts land on an isolated branch instead of the user's checkout (the codex / claude-code working model).
Package skills implements the self-evolving procedural-memory layer (design §8): reusable workflows distilled from task history into SKILL.md files.
Package skills implements the self-evolving procedural-memory layer (design §8): reusable workflows distilled from task history into SKILL.md files.
Package storage wraps the local SQLite database (WAL mode).
Package storage wraps the local SQLite database (WAL mode).
Package updater implements the self-update path for the `panda` CLI: it checks GitHub for a newer release, downloads and verifies the platform's release archive, and — once the task queue is idle — atomically swaps the running binary (and its agent adapters) into place and restarts.
Package updater implements the self-update path for the `panda` CLI: it checks GitHub for a newer release, downloads and verifies the platform's release archive, and — once the task queue is idle — atomically swaps the running binary (and its agent adapters) into place and restarts.
Package util holds small shared helpers.
Package util holds small shared helpers.
Package version holds the build version in one place so both the CLI (`panda version`) and the web panel (/api/version) report the same value.
Package version holds the build version in one place so both the CLI (`panda version`) and the web panel (/api/version) report the same value.

Jump to

Keyboard shortcuts

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