Pi coding agent extensions and configuration for homelab workflow
  • TypeScript 92.4%
  • JavaScript 4.3%
  • Python 3.1%
  • Shell 0.2%
Find a file
pi-landing cb0d8376a3
All checks were successful
CI / pr-title (push) Has been skipped
CI / forgejo-ci (push) Successful in 30s
CI / skill-args (push) Successful in 28s
CI / pi-otel-telemetry (push) Successful in 43s
CI / mcp-bridge (push) Successful in 13s
CI / plane (push) Successful in 56s
CI / ask-user-question (push) Successful in 25s
CI / nats-intercom (push) Successful in 16s
tests / python (push) Successful in 5s
CI / todo (push) Successful in 32s
CI / refocus (push) Successful in 39s
CI / pi-friction (push) Successful in 27s
CI / redact (push) Successful in 25s
CI / forgejo (push) Successful in 1m42s
CI / pi-swarm-suite (push) Successful in 3m27s
Merge pull request 'HOMELAB-1679: fix(forgejo): pin the seat-posting helpers' credential to the built-in origin, and close review-3c's S1/S3 follow-ups (LR-20261111-017)' (#133) from lr-20261111-017-s1 into main
2026-11-12 10:33:46 +00:00
.forgejo/workflows HOMELAB-2634: ci(herdr): use runner Python for janitor tests 2026-11-03 21:37:53 +00:00
ask-user-question HOMELAB-1609: feat(ask-user-question): vendor ask_user_question tool 2026-09-20 17:27:02 +00:00
deploy HOMELAB-2634: fix(herdr): recognise relieved sessions, fail closed on everything else 2026-11-04 15:20:53 +00:00
docs docs(forgejo): the default-origin rule on LANDING paths, and the seat helpers' pin, without the overclaim (LR-20261111-017, homelab-93 S1) 2026-11-12 05:57:19 +00:00
epic-session HOMELAB-1734: refactor(epic-session): generalize extension for all projects (#44) 2026-09-29 03:05:00 +00:00
forgejo fix(forgejo): round-1 review nits — drop a dead helper, stop claiming Node's exact grammar, pin the child argv (LR-20261111-017) 2026-11-12 06:08:56 +00:00
forgejo-ci Merge pull request 'HOMELAB-2682: feat(forgejo-ci): read FORGEJO_API_KEY_FILE first (scoped)' (#117) from plane/HOMELAB-2682-ci-key-file into main 2026-11-07 05:33:57 +00:00
harbor HOMELAB-1507: security: sanitize internal endpoints/PII + repo hygiene for public release 2026-08-19 05:05:22 +00:00
lab-director feat: initial pi extensions — forgejo, harbor, lab-director, outline, outline-vault, google-docs, otel-telemetry, plane 2026-06-11 11:36:40 -06:00
mcp-bridge HOMELAB-1769: docs(mcp-bridge): correct reconnect semantics to match implemented behaviour 2026-09-30 21:23:10 +00:00
nats-intercom HOMELAB-1881: fix(nats-intercom): return Text components from TUI renderers (#64) 2026-10-03 05:18:17 +00:00
outline feat: initial pi extensions — forgejo, harbor, lab-director, outline, outline-vault, google-docs, otel-telemetry, plane 2026-06-11 11:36:40 -06:00
pi-friction HOMELAB-1727: fix(pi-friction): stamp the /friction command as the HUMAN actor 2026-10-03 05:09:30 +00:00
pi-google-docs chore(extensions): remove outline-vault + drop google-docs skill registration 2026-08-19 04:48:08 +00:00
pi-otel-telemetry HOMELAB-2682: fix(pi-otel-telemetry): survive /reload by adopting the live provider 2026-11-07 06:42:44 +00:00
pi-session-tag ldv0(sessiontag): feat(pi-session-tag): omniroute session-tag header, fail-safe 2026-11-08 22:30:54 +00:00
pi-skills feat(pi-skills): carry Lab-Run id in review/handoff artifacts; fix archive link 2026-11-10 00:18:11 +00:00
pi-swarm-suite ldv0(sessiontag): feat(pi-swarm-suite): publish spawn role for session tagging 2026-11-08 22:31:00 +00:00
plane HOMELAB-2682: docs(plane): fold review concerns into PR 110 2026-11-06 19:27:44 +00:00
redact HOMELAB-2682: test(forgejo): fixtures clean their temp dirs under vitest 2026-11-07 06:00:05 +00:00
refocus HOMELAB-1678: feat(refocus): runtime wiring, metering, CI job, docs 2026-10-01 03:16:45 +00:00
scripts/herdr_janitor HOMELAB-2634: treat partial attach references as attached, harden protected names (review F1b/F3) 2026-11-04 21:26:51 +00:00
skill-args HOMELAB-1609: feat(skill-args): vendor rpiv-args /skill: expansion engine 2026-09-20 17:26:52 +00:00
skills docs(skills): name where RELIEF_THRESHOLD actually lives (census seat B M1) 2026-11-11 16:56:51 +00:00
tests HOMELAB-2634: treat partial attach references as attached, harden protected names (review F1b/F3) 2026-11-04 21:26:51 +00:00
todo HOMELAB-1609: feat(todo): vendor rpiv-todo tool, /todos command + overlay 2026-09-20 17:27:02 +00:00
voice-whisper HOMELAB-1877: feat(voice-whisper): Tier 1 enrichment (timestamps, metadata sidecar, translate, formats) 2026-10-03 03:18:53 +00:00
.gitignore HOMELAB-1750: chore(pi-skills): ignore python bytecode in pi-skills helpers 2026-09-29 21:56:25 -06:00
LICENSE HOMELAB-1507: security: sanitize internal endpoints/PII + repo hygiene for public release 2026-08-19 05:05:22 +00:00
NOTICE HOMELAB-1609: feat(pi-skills): vendor code-review, create-handoff, resume-handoff, commit from rpiv-pi 2026-09-20 17:26:20 +00:00
README.md ldv0(sessiontag): feat(pi-swarm-suite): publish spawn role for session tagging 2026-11-08 22:31:00 +00:00

pi-extensions

Extensions for the pi coding agent, living in a single repository that is consumed as a bare ~/.pi/agent/extensions/ directory.

Every subdirectory pi recognises as an extension is auto-discovered — either a root index.ts, or a package.json carrying a pi.extensions manifest that names a different entry point (pi-google-docs and pi-swarm-suite load from src/index.ts this way). No package install is required. The repository is the install unit.

Extensions

Extension What it does Docs
forgejo Git forge: pull requests, CI runs, branches, repos, PR comments, webhooks. docs/forgejo.md
forgejo-ci Per-job CI status/durations and failure-log excerpts for Forgejo Actions (landing-pipeline evidence). docs/forgejo-ci.md
harbor Harbor container registry: push/pull images, list projects/repos/tags, inspect config. docs/harbor.md
plane Plane project management: tickets, comments, cycles, modules, relations, states, labels. docs/plane.md
outline Outline docs: create/update/search/move documents, collections, comments, plus the knowledge-graph tools. docs/outline.md
lab-director Lab Director stage artifact recording, HTML review artifacts, and the task-scoped Outline shortcuts. docs/lab-director.md
pi-google-docs Google Docs read/create/update/search/list plus Drive-folder graph indexing. docs/pi-google-docs.md
pi-otel-telemetry OpenTelemetry traces to OTLP + the query_telemetry tool for Tempo traces and PromQL. docs/pi-otel-telemetry.md
pi-skills Four vendored skills (code-review, create-handoff, resume-handoff, commit) registered via resources_discover. docs/pi-skills.md
skill-args Skill argument plumbing: $ARGUMENTS/$N, ${SKILL_DIR}, ${SESSION_ID}, shell blocks, shell-timeout. docs/skill-args.md
todo The todo tool, /todos command, and a live todo overlay panel. docs/todo.md
ask-user-question The ask_user_question tool: a structured multi-question dialog with authored options. docs/ask-user-question.md
epic-session The /epic-session command: claim a parallel-session slot, create epic worktrees, print a sourceable env block, and tear the session down. docs/epic-session.md
pi-swarm-suite Subagent fleet: Agent, agent_swarm, swarm_status, task_status, workflow, plus steering and result retrieval. Also publishes the current in-process spawn role (AsyncLocalStorage) for the session-tag extension. docs/pi-swarm-suite.md
pi-session-tag Stamps every OmniRoute provider request with x-omniroute-session-id (proj/role/sid) so the gateway fills call_logs.session_tag; fail-safe by construction, OmniRoute-only. Not installed yet — see its README. pi-session-tag/README.md
voice-whisper Local push-to-talk dictation (whisper.cpp large-v3-turbo, EN/ES auto-detect) via a warm whisper-server; Ctrl+R toggles recording. docs/voice-whisper.md
mcp-bridge Typed MCP seam: an MCP server's tools registered as mcp_* pi tools (built for the agent-sandbox server: claim, status, exec, file transfer, delete). docs/mcp-bridge.md
refocus Byte-threshold intent re-injection: a long session's context crossing a threshold gets one <500-token delta restating its intent and last verified activity, so it re-orients instead of restarting. Metered via refocus_status. docs/refocus.md
redact Masks secrets (Anthropic/OpenAI/GitHub/Forgejo tokens, URL creds, Authorization, JWTs, OpenBao tokens, AWS/age/PEM keys, password assignments, k8s Secret data) in every tool result before it reaches model context, the session JSONL or a subagent .output transcript. Outputs only, never args or files; fail-open. docs/redact.md

Extensions that ship their own in-tree documentation link to it from their page rather than duplicating it (pi-swarm-suite, pi-skills, todo, ask-user-question, skill-args, harbor, pi-google-docs, forgejo-ci, epic-session, mcp-bridge, refocus, redact).

Herdr Session Janitor

scripts/herdr_janitor/janitor.py is a standalone mgmt helper, not a pi auto-loaded extension. It is dry-run by default and closes only named, allowlisted old sessions with a proven successor plus handoff evidence, or an explicit retire marker, and only when the old pane has no live agents/workers/shells. See docs/herdr-janitor.md for the safety contract, 15-minute systemd --user timer, evidence paths, and the separate supervisor activation procedure. The implementation change does not install or activate the timer.

Install

Symlink the checkout into pi's extension directory (recommended — keeps edits live and git pull effective):

git clone git@forgejo.aaron.reynoza.org:Homelab/pi-extensions.git ~/repos/pi-extensions
ln -s ~/repos/pi-extensions ~/.pi/agent/extensions

Or clone directly into place:

git clone git@forgejo.aaron.reynoza.org:Homelab/pi-extensions.git ~/.pi/agent/extensions

Either way pi discovers every extension-shaped subdirectory at startup — a root index.ts, or the entry named by a pi.extensions manifest in that directory's package.json. Restart the session, or run /reload after editing an extension.

If you want only a subset, symlink the individual extension directories instead of the repository root — each one is self-contained.

Configuration

Extensions read credentials from the environment; there is no central config file in this repository. Set the variables in your shell profile (or in the workspace that launches pi):

Extension Variables
forgejo FORGEJO_BASE_URL, FORGEJO_API_KEY
forgejo-ci FORGEJO_BASE_URL, FORGEJO_API_KEY, and FORGEJO_SESSION_COOKIE (or FORGEJO_WEB_USERNAME + FORGEJO_WEB_PASSWORD) for job logs
harbor HARBOR_BASE_URL, HARBOR_USERNAME, HARBOR_PASSWORD, HARBOR_LAN_ENDPOINT, HARBOR_INSECURE
plane PLANE_API_KEY, PLANE_WORKSPACE_SLUG, PLANE_BASE_URL
outline, lab-director OUTLINE_API_URL, OUTLINE_API_KEY
pi-otel-telemetry OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS, OTEL_RESOURCE_ATTRIBUTES, OTEL_SERVICE_NAME, ZITADEL_ID_TOKEN / ZITADEL_ACCESS_TOKEN, PAPERCLIP_*
mcp-bridge AGENT_SANDBOX_MCP_URL, AGENT_SANDBOX_MCP_TOKEN (or MCP_TOKEN), PI_MCP_BRIDGE_TIMEOUT_MS, PI_MCP_BRIDGE_DISABLED
refocus All optional: REFOCUS_INTENT / REFOCUS_INTENT_FILE (where the intent comes from), REFOCUS_THRESHOLD, REFOCUS_RESET, REFOCUS_BYTE_THRESHOLD, REFOCUS_MAX_DELTA_TOKENS, REFOCUS_MAX_DELTA_BYTES, REFOCUS_MAX_INJECTIONS, REFOCUS_MIN_TURNS_BETWEEN, REFOCUS_FALLBACK, REFOCUS_RESTART_BASELINE_TOKENS, REFOCUS_ACTION_SUMMARY_CHARS, REFOCUS_SCOPE, REFOCUS_ENABLED, REFOCUS_LOG
redact All optional: PI_REDACT_LOG (count log path, default ~/.pi/agent/redact.log), PI_REDACT_DISABLED=1 (operator kill switch)

Required-ness differs. The forgejo, plane, and outline tools throw when their variables are unset; for lab-director only the three outline_* shortcut tools need OUTLINE_* (the client is built per call, so artifact recording and HTML rendering work without it). Every harbor, pi-otel-telemetry, and mcp-bridge variable has a default or a fallback — mcp-bridge degrades to no mcp_* tools when the server is unreachable rather than erroring — see each extension's page. Every refocus variable is optional: with no intent set it is a strict no-op, and with the intent set the defaults implement the <500-token contract as shipped.

pi-google-docs stores OAuth credentials under ~/.pi/google-docs/ instead (see its docs page). Never commit credentials.

External packages

Two kinds of dependency live outside this repository.

pi packages installed through pi's package manager (not part of this repo; listed under packages in ~/.pi/agent/settings.json): pi-intercom, pi-web-access, pi-markdown-preview, pi-chrome, pi-btw, and pi-image-attachments. The @juicesharp/rpiv-* packages also used to be in that list and are no longer installed — most of their surface was vendored here instead (see the vendoring note below). pi-provider-kimi-code was dropped too (HOMELAB-2301): models are reached through OmniRoute only.

Local npm dependencies, installed inside the extension directory that owns them:

  • pi-swarm-suite builds on the vendored Agent/task core and expects the pi coding agent runtime it was written against.
  • pi-otel-telemetry connects to any OTLP/HTTP collector and a Tempo-compatible trace backend and Prometheus-compatible metrics API.
  • pi-google-docs uses the Google APIs Node client.
  • mcp-bridge uses the @modelcontextprotocol/sdk client (pinned) to reach an MCP server over streamable HTTP.
  • Skill and tool schemas use typebox / @sinclair/typebox as provided by pi.

Where an extension has a package.json, install its dependencies inside that extension directory before first use.

Vendoring note (HOMELAB-1609)

Three extensions and the pi-skills bundle are MIT-licensed ports of @juicesharp/rpiv-* packages, not original work: skill-args (from rpiv-args), todo (from rpiv-todo), ask-user-question (from rpiv-ask-user-question), and the four skills under pi-skills/skills/ (from rpiv-pi, v2.10.1). They were vendored when the @juicesharp/rpiv-* packages were uninstalled (HOMELAB-1609) so that the used surface survives. Tool and command names and expansion semantics are byte-for-byte preserved; the unused @juicesharp/* internal dependencies (rpiv-config, rpiv-i18n) were inlined or dropped. Upstream license text is preserved in each directory's LICENSE, and modifications are listed in the per-extension README (pi-skills/README.md for the skills, including the stripped contract: frontmatter). Where a port needed its own config surface it ships a local-config.ts (ask-user-question/, todo/).

Notes

  • The knowledge-graph tools (lab_director_graph_*) live in outline/; lab-director/ keeps artifact tracking, the HTML artifact renderer, and the pipeline skills.
  • herdr-agent-state.ts (if present in a live install) is machine-generated glue written by herdr and deliberately gitignored — see .gitignore. It is not part of this repository.
  • Removed extensions. paperclip (HOMELAB-1457) and outline-vault (superseded by outline/ plus the knowledge graph) were retired. Their integration points outlive them: pi-otel-telemetry still reads PAPERCLIP_* (docs/pi-otel-telemetry.md) and the outline graph builder still writes a markdown vault under ~/.pi/outline-vault (docs/outline.md).

License

Apache-2.0 — see LICENSE and NOTICE. pi-swarm-suite/src/core (the fifth vendored component) vendors the MIT-licensed @tintinweb/pi-subagents — see pi-swarm-suite/LICENSE. Other vendored third-party code keeps its upstream copyright and license files in the directory that contains it.

Adding an extension

  1. Create <name>/index.ts exporting pi's extension shape. If the entry point has to live elsewhere, add a package.json with {"pi": {"extensions": ["./src/index.ts"]}} instead.
  2. Document it in docs/<name>.md and add a row to the table above.
  3. Reload pi and confirm its tools and commands appear.