Skip to content

(WIP) Pi Coding Agent Support#441

Draft
lost-orchard wants to merge 8 commits intoSignet-AI:mainfrom
lost-orchard:feature/pi-coding-agent
Draft

(WIP) Pi Coding Agent Support#441
lost-orchard wants to merge 8 commits intoSignet-AI:mainfrom
lost-orchard:feature/pi-coding-agent

Conversation

@lost-orchard
Copy link
Copy Markdown

@lost-orchard lost-orchard commented Apr 2, 2026

NOTE: Not ready for review!

Summary

Add support for pi-coding-agent as a first-class Signet harness, with full memory lifecycle integration, shared code extraction across extensions, and shared connector utilities.

Changes

  • @signet/pi-extension (new): Extension providing session lifecycle management, /recall and /remember commands and tools, context injection, compaction handling, and daemon health checks for
    Pi.
  • @signet/connector-pi (new): Managed extension installer with bundled dist, bootstrap env generation, and PI_CODING_AGENT_DIR persistence.
  • @signet/extension-base (new): Shared helpers (isRecord, readRuntimeEnv, readTrimmedString, readTrimmedRuntimeEnv), base types (BaseAgentMessage, BaseSessionEntry, etc.), and parameterized
    transcript utilities extracted from both oh-my-pi-extension and pi-extension to eliminate duplication.
  • @signet/connector-base: Extracted 8 shared utilities and 2 constants from connector-oh-my-pi and connector-pi to eliminate duplication.
  • @signet/oh-my-pi-extension: Refactored to import shared code from extension-base; deleted local helpers.ts and transcript.ts.
  • @signet/connector-oh-my-pi: Refactored to use shared connector-base utilities.
  • @signet/core: Added resolvePiAgentDir, resolvePiExtensionsDir, listPiAgentDirCandidates, Pi config persistence, and platform-presence-based harness detection for Pi and Oh My Pi.
  • @signet/cli: Added Pi to setup wizard harness selection, configureHarnessHooks, signet sync detection, signet update, and fixed the non-interactive existing-install path to actually install
    --harness hooks.
  • Docs: Added Pi to HARNESSES.md, ARCHITECTURE.md, CLI.md, HOOKS.md.
  • Web: Added Pi to landing page harness list.

Type

  • feat — new user-facing feature (bumps minor)
  • fix — bug fix
  • refactor — restructure without behavior change
  • chore — build, deps, config, docs
  • perf — performance improvement
  • test — test coverage

Packages affected

  • @signet/core
  • @signet/daemon
  • @signet/cli / dashboard
  • @signet/sdk
  • @signet/connector-*
  • @signet/web
  • predictor
  • Other: @signet/pi-extension, @signet/extension-base, @signet/oh-my-pi-extension

PR Readiness (MANDATORY)

(PR is not ready)

  • Spec alignment validated (INDEX.md + dependencies.yaml)
  • Agent scoping verified on all new/changed data queries
  • Input/config validation and bounds checks added
  • Error handling and fallback paths tested (no silent swallow)
  • Security checks applied to admin/mutation endpoints
  • Docs updated for API/spec/status changes
  • Regression tests added for each bug fix
  • Lint/typecheck/tests pass locally

Automated Testing

  • bun test passes
  • bun run typecheck passes
  • bun run lint passes

Manual Testing

Basic Testing

  • signet setup
  • signet setup --harness pi --name "test-agent" --non-interactive
  • empty pi extension config (enabled defaults to true)

Ambient store/recall

  • I prefer uv over poetry - memory stored
  • Do I prefer poetry or uv? - memory recalled

Slash commands with SIGNET_BYPASS=1:

  • /signet-status
  • /remember I prefer bun
  • /recall do I prefer npm or bun
  • /remember critical: always use TypeScript strict mode
  • /remember [tooling, style]: prefer biome over eslint

Tools with SIGNET_BYPASS=1

  • Prompt: Please remember that we use tabs not spaces for indentation.
  • Prompt: What do you remember about our coding conventions?

Other

  • Test forking
  • Test pre compaction hook
  • SIGNET_ENABLED=false pi
  • enabled false in config
  • custom PI_CODING_AGENT_DIR
  • uninstall
  • running above again
  • SIGNET_DAEMON_URL=http://127.0.0.1:3851 pi
  • test signet sync
  • test signet update
  • shouldn't be tagged as openclaw
  • does not consume extra copilot premium requests

AI disclosure

  • AI tools were used (see Assisted-by tags in commits)

@lost-orchard lost-orchard force-pushed the feature/pi-coding-agent branch from 4dce3fe to c811656 Compare April 3, 2026 00:45
Add full Signet memory integration for the Pi coding agent platform:

- pi-extension: session lifecycle, recall/remember commands and tools,
  context injection, compaction handling, daemon health checks
- connector-pi: managed extension installer with bundled dist, bootstrap
  env generation, and PI_CODING_AGENT_DIR persistence
- extension-base: extract shared helpers, transcript, and base types
  from both oh-my-pi-extension and pi-extension to eliminate duplication
- connector-base: extract shared connector utilities from both connectors
- Consolidate daemon URL reads in pi-extension factory for consistency
- Add 58 tests across pi-extension, connector-pi, and shared packages
- Update docs, landing page, and CLI setup wizard for Pi harness

Assisted-by: GitHub-Copilot:claude-opus-4-6
Assisted-by: GitHub-Copilot:claude-sonnet-4-5
Assisted-by: GitHub-Copilot:gpt-5-4
Assisted-by: GitHub-Copilot:gpt-5-2-codex
Assisted-by: Pi:kimi-k2-5
@lost-orchard lost-orchard force-pushed the feature/pi-coding-agent branch from c811656 to 540ad82 Compare April 3, 2026 13:00
lost-orchard and others added 6 commits April 3, 2026 09:23
Previously, signet sync and signet setup --non-interactive only
detected Pi/Oh My Pi if Signet's managed extension was already
installed (chicken-and-egg). Now also checks if the platform's
agent directory exists (e.g. ~/.pi/agent/).

Additionally, the non-interactive existing-install setup path now
installs harness hooks when --harness is specified, instead of
silently returning without configuring anything.

Assisted-by: GitHub-Copilot:claude-opus-4-6
Pi support is new — there was never a .mjs extension deployed, so
the legacy filename constant, getLegacyManagedExtensionPath(), and
all .mjs cleanup paths in install/uninstall/isInstalled were dead code
copied from Oh My Pi's genuine migration pattern.

Assisted-by: Copilot (claude-opus-4.6)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add detailed documentation for Pi extension runtime behavior:
- Automatic recall injection on every user prompt
- Manual /recall, /remember, /signet-status commands
- LLM-callable signet_recall and signet_remember tools
- Note that Pi lacks Oh My Pi attribution field for X-Initiator override

Assisted-by: Claude Opus 4.6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Apply biome organizeImports and format fixes across
extension and connector packages. Remove dead imports.

Assisted-by: Claude Opus 4.6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
rememberContent sent `critical` in the request body but the
daemon /api/memory/remember endpoint reads `body.pinned`.
Since the extension already strips the "critical:" prefix
from the content, the prefix parser cannot recover it either.

Rename the body field to `pinned` so the daemon correctly
stores the memory as pinned.

Assisted-by: GitHub-Copilot:claude-opus-4-6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When SIGNET_BYPASS=1 is set, Pi extension skips automatic hook
registration (lifecycle, prompt, context, compaction) but keeps
commands and tools available. Oh My Pi extension skips all handler
registration since it has no commands or tools.

The bypass env var is read at factory invocation time rather than
at module load, so it works correctly per-session.

Assisted-by: GitHub-Copilot:claude-opus-4-6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
| `--description <description>` | Agent description in non-interactive mode |
| `--deployment-type <type>` | Deployment context (`local`, `vps`, `server`) used for interactive guidance and non-interactive inferred defaults |
| `--harness <harness>` | Repeatable/comma-separated harness list (`claude-code`, `opencode`, `openclaw`, `codex`) |
| `--harness <harness>` | Repeatable/comma-separated harness list (`claude-code`, `opencode`, `openclaw`, `oh-my-pi`, `pi`, `codex`, `forge`) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

Adds the Pi session ID alongside the daemon URL in a single
status notification so users can identify which session the
daemon is tracking.

Assisted-by: GitHub-Copilot:claude-opus-4-6
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@lost-orchard lost-orchard force-pushed the feature/pi-coding-agent branch from 540ad82 to a3751fd Compare April 3, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants