← Catalog

pi-konjac

Pi coding agent input translation extension using Bergamot language pair models.

Extension

Install

Install with PiG

pig install npm:pi-konjac

Install with Pi

pi install npm:pi-konjac
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/index.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.0 (README.md). PiG does not review it.

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 input events 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 like npm test, PATCH /api/users, and src/auth.ts from 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/config
  • PI_KONJAC_CACHE_DIR=/path/to/cache
  • PI_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.