pi-konjac
Pi coding agent input translation extension using Bergamot language pair models.
Package details
Install pi-konjac from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-konjac- Package
pi-konjac- Version
0.1.0- Published
- May 16, 2026
- Downloads
- not available
- Author
- oshiteku
- License
- MPL-2.0
- Types
- extension
- Size
- 43.5 KB
- Dependencies
- 2 dependencies · 0 peers
Pi manifest JSON
{
"extensions": [
"./extensions/index.js"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-konjac
A pi coding agent extension package that translates user input before it is sent to the agent.
pi-konjac uses Firefox Translations / Bergamot models through @browsermt/bergamot-translator.
Features
- Translates pi
inputevents before agent processing. - Defaults to
ja->en [base-memory]. - Lets you choose any Bergamot registry model pair and architecture from
/konjac.
Install
Install from GitHub:
pi install https://github.com/oshiteku/pi-konjac
Translation Rules
- Inputs from other extensions are not translated.
- Slash commands are not translated.
- If the source language is
en, non-empty normal text is translated. - If the source language is not
en, only inputs containing non-ASCII text are translated. This prevents commands and paths likenpm test,PATCH /api/users, andsrc/auth.tsfrom being altered. - Empty translation results, or results identical to the input, are passed through unchanged.
Cache And Settings
Defaults:
~/.pi/agent/pi-konjac/settings.json
~/.pi/agent/cache/pi-konjac/models/
Environment overrides:
PI_KONJAC_HOME=/path/to/configPI_KONJAC_CACHE_DIR=/path/to/cachePI_CODING_AGENT_DIR=/path/to/agent
Development
pnpm install
pnpm check
pnpm translate -- "ログイン処理を確認してください。"
Try another model:
pnpm translate -- --from en --to zh --architecture base-memory "Please check the login process."
License
MPL-2.0. See LICENSE.
Acknowledgements
pi-konjac uses @browsermt/bergamot-translator and follows parts of its Node.js worker/model-loading patterns.