{"_id":"@capdiem/pi-session-namer","name":"@capdiem/pi-session-namer","dist-tags":{"latest":"0.1.0"},"versions":{"0.1.0":{"name":"@capdiem/pi-session-namer","version":"0.1.0","description":"Automatic session naming for the Pi coding agent: names each session 0904｜FIX｜登录态刷新丢失-style from the live conversation, rechecks as work evolves, respects manual renames, and toasts every change with undo","type":"module","pi":{"extensions":["./index.min.js"]},"keywords":["pi-package","pi","coding-agent","session","naming","rename","title","automation"],"author":{"name":"capdiem","email":"capdiem@live.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capdiem/pi-extensions.git","directory":"extensions/pi-session-namer"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"peerDependencies":{"@earendil-works/pi-ai":"*","@earendil-works/pi-coding-agent":"*","@earendil-works/pi-tui":"*"},"gitHead":"67a9cd50316b63593bd27212c9368805d84b6206","_id":"@capdiem/pi-session-namer@0.1.0","bugs":{"url":"https://github.com/capdiem/pi-extensions/issues"},"homepage":"https://github.com/capdiem/pi-extensions#readme","_nodeVersion":"24.15.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-NEcwjBzEghW+uqN2hgRvVpDiajPDUx+avNO+BUKT9GWlx1mqTPbSXUW3p6pSds+zBp/tP/GfltZW+yNACQbsjQ==","shasum":"28d9d2cc2e1d6fa27ec48b7a167cf8eeb3149510","tarball":"https://registry.npmjs.org/@capdiem/pi-session-namer/-/pi-session-namer-0.1.0.tgz","fileCount":5,"unpackedSize":61535,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIAWRR+omoE+NGWljEKndXmErxiU43f6pQO1drOa/qevuAiEAw9Sa0ggYMMXY6Gx5Qs9keRFlgbjpr/4KxARzhoUwUqY="}]},"_npmUser":{"name":"capdiem","email":"capdiem@live.com"},"directories":{},"maintainers":[{"name":"capdiem","email":"capdiem@live.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-session-namer_0.1.0_1788762427176_0.3832233771736364"},"_hasShrinkwrap":false}},"time":{"created":"2026-09-07T06:27:07.014Z","0.1.0":"2026-09-07T06:27:07.312Z","modified":"2026-09-07T06:27:07.544Z"},"maintainers":[{"name":"capdiem","email":"capdiem@live.com"}],"description":"Automatic session naming for the Pi coding agent: names each session 0904｜FIX｜登录态刷新丢失-style from the live conversation, rechecks as work evolves, respects manual renames, and toasts every change with undo","homepage":"https://github.com/capdiem/pi-extensions#readme","keywords":["pi-package","pi","coding-agent","session","naming","rename","title","automation"],"repository":{"type":"git","url":"git+https://github.com/capdiem/pi-extensions.git","directory":"extensions/pi-session-namer"},"author":{"name":"capdiem","email":"capdiem@live.com"},"bugs":{"url":"https://github.com/capdiem/pi-extensions/issues"},"license":"MIT","readme":"# pi-session-namer\n\nAutomatic session naming for the [Pi coding agent](https://pi.dev/). Each\nsession gets a name like the ones below, generated from the live\nconversation — no prompt, no confirmation:\n\n```\n0904｜FIX｜登录态刷新丢失\n0904｜FEA｜session auto naming hooks\n```\n\n## How it works\n\n- **First name after the first real exchange.** Greetings, acknowledgements,\n  and bare slash commands stay unnamed; the first question with a finished\n  answer names the session.\n- **Names are provisional.** Every 5 exchanges the name is reconsidered. A\n  local similarity gate ignores cosmetic drift; only a genuine change of\n  direction renames, at most 3 times per session.\n- **One language per session.** The title language is anchored from the\n  first real message (≥30% CJK → Chinese); renames never flip.\n- **Manual names win.** `/name` pauses auto-naming for that session until\n  `/autotitle on`.\n- **Every change is visible and reversible.** A toast shows the new title;\n  `/autotitle undo` reverts.\n- Calls run in-process through the session's own model and credentials\n  (a few hundred tokens each, hard-capped at 6 per session), so there is\n  nothing to configure and no subprocess.\n\nThe date prefix comes from the session header in your local timezone. TYPE\nis one of FEA DES FIX OPT REL EXP DOC RES (Chinese titles use\n功能/设计/修复/优化/发布/探索/文档/研究).\n\n## Commands\n\n- `/autotitle` — status: mode, current name, caps, last error\n- `/autotitle on` — resume auto-naming and try now\n- `/autotitle off` — stop for this session\n- `/autotitle now` — force a naming attempt immediately\n- `/autotitle undo` — revert to the previous title\n\n## Configuration\n\nEverything is optional.\n\nPrecedence for the naming convention: `PI_SESSION_NAMER_FORMAT` env →\n`.pi/session-name.md` in the project → `~/.pi/agent/session-name.md`\nglobally → built-in `MMDD｜TYPE｜Topic`. A custom convention replaces the\nbuilt-in prose entirely and is followed as written, e.g.:\n\n```\nFormat: [TICKET] short imperative title in English, max 8 words.\nUse [NOJIRA] when no ticket is mentioned.\n```\n\n| Env | Default | Purpose |\n| --- | --- | --- |\n| `PI_SESSION_NAMER_DISABLE` | unset | Any value turns the extension off |\n| `PI_SESSION_NAMER_FORMAT` | built-in | Naming convention, as prose for the model |\n| `PI_SESSION_NAMER_MODEL` | session model | Model used for naming (`provider/id` or id) |\n| `PI_SESSION_NAMER_RECHECK_EVERY` | `5` | Exchanges between rechecks |\n| `PI_SESSION_NAMER_MAX_RENAMES` | `3` | Applied renames per session |\n\n## Install\n\n```bash\npi install npm:@capdiem/pi-session-namer\n```\n\nOr run from source: `pi -e ./extensions/pi-session-namer/index.ts`.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md","_rev":"1-dec095f9a48850f0ab6b69f043943c0c"}