Composable agent runtime monorepo built on the pi ecosystem
Find a file
Ryota 5bb3700717 fix(tui): prevent Kitty protocol base layout key from causing false shortcut matches
With the Kitty keyboard protocol (flag 4), terminals report both the
logical key codepoint and the physical base layout key (PC-101 QWERTY
position). The key matching logic in matchesKittySequence matched
against both unconditionally, which caused a single keypress to match
multiple shortcuts on remapped keyboard layouts.

For example, on a Dvorak layout with xremap, pressing Ctrl+K sends
CSI 107::118;5u (codepoint=107 'k', base layout=118 'v'). The
unconditional base layout match made this also match Ctrl+V, which is
bound to pasteImage. Since CustomEditor checks app-level keybindings
(pasteImage) before editor keybindings (deleteToLineEnd), Ctrl+K was
silently intercepted by the paste image handler instead of deleting
to end of line. The same issue affects symbol keys, as Dvorak also
remaps symbols to different physical positions (e.g., '/' sits where
'[' is on QWERTY).

The fix restricts base layout key matching to cases where the codepoint
is not a recognized Latin letter (a-z) or symbol (/, -, [, ;, etc.).
When the codepoint is already a recognized key, it is authoritative and
the base layout key is ignored. This preserves non-Latin layout support
(Ctrl+К on a Russian layout still matches Ctrl+K via base layout key
107) while preventing false matches from differing physical key
positions on remapped layouts.

Both matchesKittySequence and parseKey are updated with the same logic.
2026-02-01 01:25:00 +01:00
.github chore: approve contributor pasky 2026-01-31 19:08:17 +00:00
.husky Add husky pre-commit hook for formatting and type checking 2025-08-11 21:15:37 +02:00
.pi feat: add /files command to list session file operations 2026-01-29 02:25:59 +01:00
packages fix(tui): prevent Kitty protocol base layout key from causing false shortcut matches 2026-02-01 01:25:00 +01:00
scripts fix(build): add HTML templates and documentation to binary builds (#999) 2026-01-30 01:44:24 +01:00
.gitignore fix(coding-agent): normalize raw git URLs in extension source matching 2026-01-22 14:19:04 +01:00
AGENTS.md fix(coding-agent): respect .gitignore/.ignore/.fdignore when scanning package resources 2026-01-30 01:02:56 +01:00
biome.json WIP: Remove global state from pi-ai OAuth/API key handling 2025-12-25 01:01:03 +01:00
CONTRIBUTING.md chore: add PR approval gate for new contributors 2026-01-18 12:26:45 +01:00
LICENSE Initial monorepo setup with npm workspaces and dual TypeScript configuration 2025-08-09 17:18:38 +02:00
package-lock.json fix: override fast-xml-parser to 5.3.4 to resolve CVE 2026-01-31 23:48:22 +01:00
package.json fix: make pre-commit hook fail on lint warnings, fix template literal warnings 2026-02-01 00:25:57 +01:00
pi-mono.code-workspace Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
pi-test.sh fix: handle empty args array in pi-test.sh 2026-01-25 23:47:35 +01:00
README.md chore: add PR approval gate for new contributors 2026-01-18 12:26:45 +01:00
test.sh fix: use portable shebang in shell scripts 2026-01-22 21:44:39 +01:00
tsconfig.base.json Try fixing root level compiles 2025-12-03 14:16:00 +01:00
tsconfig.json Remove proxy package 2025-12-30 22:42:21 +01:00

pi logo

Discord Build status

Pi Monorepo

Looking for the pi coding agent? See packages/coding-agent for installation and usage.

Tools for building AI agents and managing LLM deployments.

Packages

Package Description
@mariozechner/pi-ai Unified multi-provider LLM API (OpenAI, Anthropic, Google, etc.)
@mariozechner/pi-agent-core Agent runtime with tool calling and state management
@mariozechner/pi-coding-agent Interactive coding agent CLI
@mariozechner/pi-mom Slack bot that delegates messages to the pi coding agent
@mariozechner/pi-tui Terminal UI library with differential rendering
@mariozechner/pi-web-ui Web components for AI chat interfaces
@mariozechner/pi-pods CLI for managing vLLM deployments on GPU pods

Contributing

See CONTRIBUTING.md for contribution guidelines and AGENTS.md for project-specific rules (for both humans and agents).

Development

npm install          # Install all dependencies
npm run build        # Build all packages
npm run check        # Lint, format, and type check
./test.sh            # Run tests (skips LLM-dependent tests without API keys)
./pi-test.sh         # Run pi from sources (must be run from repo root)

Note: npm run check requires npm run build to be run first. The web-ui package uses tsc which needs compiled .d.ts files from dependencies.

License

MIT