{"_id":"@camillof/pi-session-autoname","_rev":"3-7c15c085014ce57545e3a4c4c9d3a284","name":"@camillof/pi-session-autoname","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@camillof/pi-session-autoname","version":"0.1.0","keywords":["pi-package","pi","pi-extension","session-name","autoname"],"license":"MIT","_id":"@camillof/pi-session-autoname@0.1.0","maintainers":[{"name":"camillof","email":"hello@camillof.dev"}],"homepage":"https://github.com/camillof/pi-session-autoname#readme","bugs":{"url":"https://github.com/camillof/pi-session-autoname/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"a9e0bc19d4b9ffd18506b7bfdc0d20cb34a853ed","tarball":"https://registry.npmjs.org/@camillof/pi-session-autoname/-/pi-session-autoname-0.1.0.tgz","fileCount":7,"integrity":"sha512-SX8SJBeoQXbfp3nIVEdMdFfWd+cbLSRyblZqBk9PyJl8WtmRoQEAn9AlVjewXeb15dMiYhWjx9SpPem+DDCv7A==","signatures":[{"sig":"MEUCIQCZiiWp46uh0BApa8/Fy1yACRcLXW0sIRTaxSqtz0x3CwIgFfl1HNIIZUBy+Qt+NwBtMZTurpuDk7JcGJ45OGuM9a8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30127},"type":"module","engines":{"node":">=22.6.0"},"gitHead":"73d8c4a65b5b90d474791d8e9896b60b132469b2","scripts":{"test":"node --experimental-strip-types --test test/*.test.ts","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"camillof","email":"hello@camillof.dev"},"repository":{"url":"git+https://github.com/camillof/pi-session-autoname.git","type":"git"},"_npmVersion":"11.8.0","description":"Automatically name new Pi sessions with a dedicated configured model.","directories":{},"_nodeVersion":"24.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-session-autoname_0.1.0_1787580127882_0.18989530578718816","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@camillof/pi-session-autoname","version":"0.1.1","keywords":["pi-package","pi","pi-extension","session-name","autoname"],"license":"MIT","_id":"@camillof/pi-session-autoname@0.1.1","maintainers":[{"name":"camillof","email":"hello@camillof.dev"}],"homepage":"https://github.com/camillof/pi-session-autoname#readme","bugs":{"url":"https://github.com/camillof/pi-session-autoname/issues"},"pi":{"extensions":["./src/index.ts"]},"dist":{"shasum":"b7b8b455ee678cf3c3e7b4166ec0900e1942225e","tarball":"https://registry.npmjs.org/@camillof/pi-session-autoname/-/pi-session-autoname-0.1.1.tgz","fileCount":7,"integrity":"sha512-bdvYjsVOmMn2Xk2mMLU3Rk0jwPpIu8safJ8DpIy5dZGSaWavl+kEIb91oj0kkgRNyzwnBVNnvuWDwEQ9dv4mBg==","signatures":[{"sig":"MEUCIQDaxdoo/LgBONuTeGKBwjtpsuCOC/m6lVTweUM6LSPjygIgS1vNqU5x0c40PArYYKa5Q7MJitfhixQKGHDme4U/wLw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":32881},"type":"module","engines":{"node":">=22.6.0"},"gitHead":"8c66b92e2c20894f01d635318c0625b73e8cedfe","scripts":{"test":"node --experimental-strip-types --test test/*.test.ts","pack:check":"npm pack --dry-run"},"_npmUser":{"name":"camillof","email":"hello@camillof.dev"},"repository":{"url":"git+https://github.com/camillof/pi-session-autoname.git","type":"git"},"_npmVersion":"11.8.0","description":"Automatically name new Pi sessions with a dedicated configured model.","directories":{},"_nodeVersion":"24.13.1","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"_npmOperationalInternal":{"tmp":"tmp/pi-session-autoname_0.1.1_1787583773724_0.33832497850180876","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@camillof/pi-session-autoname","version":"0.1.2","description":"Automatically name new Pi sessions with a dedicated configured model.","type":"module","license":"MIT","keywords":["pi-package","pi","pi-extension","session-name","autoname"],"engines":{"node":">=22.6.0"},"repository":{"type":"git","url":"git+https://github.com/camillof/pi-session-autoname.git"},"peerDependencies":{"@earendil-works/pi-coding-agent":"*"},"publishConfig":{"access":"public"},"pi":{"extensions":["./src/index.ts"]},"scripts":{"test":"node --experimental-strip-types --test test/*.test.ts","pack:check":"npm pack --dry-run"},"gitHead":"5574493a147bfe5c99a3546ced7fc7eb57950a91","_id":"@camillof/pi-session-autoname@0.1.2","bugs":{"url":"https://github.com/camillof/pi-session-autoname/issues"},"homepage":"https://github.com/camillof/pi-session-autoname#readme","_nodeVersion":"24.13.1","_npmVersion":"11.8.0","dist":{"integrity":"sha512-UV65+SNYsPUUB3Sb7zU5w1ZeyMaY65zIkUkbCUdBXycbp+YRoWBIQu1PaVHyGnwEs7nglinWjsFh/YyM4h60/A==","shasum":"601b250662f93aec6b523477fe51c5c25f901434","tarball":"https://registry.npmjs.org/@camillof/pi-session-autoname/-/pi-session-autoname-0.1.2.tgz","fileCount":7,"unpackedSize":33351,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHnpWBYKuDxrzrQXCWdZRyZYR1kq1Fi/0iFVpcGkk7qGAiEApAj+usW9Ta2jP+yV5HJFYGIP2vwT1nO9kGYMapDbnPc="}]},"_npmUser":{"name":"camillof","email":"hello@camillof.dev"},"directories":{},"maintainers":[{"name":"camillof","email":"hello@camillof.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pi-session-autoname_0.1.2_1787783792117_0.7089579484748403"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-24T14:02:07.628Z","modified":"2026-08-26T22:36:32.411Z","0.1.0":"2026-08-24T14:02:08.032Z","0.1.1":"2026-08-24T15:02:53.880Z","0.1.2":"2026-08-26T22:36:32.254Z"},"bugs":{"url":"https://github.com/camillof/pi-session-autoname/issues"},"license":"MIT","homepage":"https://github.com/camillof/pi-session-autoname#readme","keywords":["pi-package","pi","pi-extension","session-name","autoname"],"repository":{"type":"git","url":"git+https://github.com/camillof/pi-session-autoname.git"},"description":"Automatically name new Pi sessions with a dedicated configured model.","maintainers":[{"name":"camillof","email":"hello@camillof.dev"}],"readme":"# pi-session-autoname\n\nAutomatically give a new [Pi](https://github.com/earendil-works/pi) session a short,\nsearchable name after its first completed exchange.\n\nThe extension uses a dedicated model that you explicitly configure. It never falls\nback to the active conversation model, never periodically renames a session, and has\nno installed runtime dependencies.\n\n## Features\n\n- Runs once after Pi's first `agent_settled` event.\n- Uses the original first user message and final assistant response, excluding tool output.\n- Produces a title of at most 48 Unicode characters.\n- Uses the generated name as the complete terminal title, without Pi's `π -` prefix.\n- Preserves names set with `/name`, `--name`, or another extension.\n- Prefixes Linear-style references, for example `AIR-4933: Fix message retries`.\n- Recognizes both plain keys and `linear.app/<workspace>/issue/<key>` URLs.\n- Redacts common credentials before sending the excerpt to the naming provider.\n- Provides global and project-specific model configuration through `/autoname`.\n\n## Requirements\n\n- Pi 0.84 or newer.\n- Node.js 22.6 or newer.\n- A dedicated naming model available in Pi's model registry, with its provider authenticated.\n\n## Install\n\nFrom npm:\n\n```bash\npi install npm:@camillof/pi-session-autoname\n```\n\nTry a local checkout without installing it:\n\n```bash\npi -e .\n```\n\nAfter installing or changing the extension, restart Pi or run `/reload`.\n\n## Configure the naming model\n\nNo model is selected by default. Configure one globally:\n\n```text\n/autoname model anthropic/claude-haiku-4-5\n```\n\nOr configure a model only for the current project:\n\n```text\n/autoname model openrouter/anthropic/claude-haiku --local\n```\n\nOnly the first slash separates the provider from the model ID, so model IDs may\ncontain additional slashes.\n\nConfiguration can also be written directly as JSON. Global configuration lives at\n`<agent-dir>/session-autoname.json`; project configuration lives at\n`<project>/.pi/session-autoname.json` and takes precedence.\n\n```json\n{\n  \"enabled\": true,\n  \"model\": \"anthropic/claude-haiku-4-5\",\n  \"timeoutMs\": 10000,\n  \"debug\": false\n}\n```\n\n| Field | Default | Meaning |\n| --- | --- | --- |\n| `enabled` | `true` | Enables the one automatic naming attempt. Manual `/autoname` still works when false. |\n| `model` | `null` | Required dedicated model in `provider/model-id` form. |\n| `timeoutMs` | `10000` | Request timeout, accepted range 1,000–60,000 ms. |\n| `debug` | `false` | Shows otherwise silent automatic naming failures. |\n\n## Commands\n\n| Command | Behavior |\n| --- | --- |\n| `/autoname` | Regenerate from the original first exchange and replace the current name on success. |\n| `/autoname status` | Show effective configuration, model availability, paths, and warnings. |\n| `/autoname model <provider/model-id>` | Set the global naming model. |\n| `/autoname model <provider/model-id> --local` | Set the project naming model. |\n| `/autoname model reset [--local]` | Remove the model override at that scope. |\n\nUse Pi's built-in `/name <text>` command when you want to write a custom name rather\nthan regenerate the title from the original exchange.\n\n## Naming behavior\n\nThe automatic attempt is eligible only for a brand-new, unnamed session. After the\nfirst exchange fully settles, the extension sends at most 4,000 characters from the\nfirst user message and final assistant response to the configured naming model. Tool\ncalls and tool results are excluded.\n\nIf the original exchange contains `AIR-4933` or a matching Linear issue URL, the\nextension deterministically prefixes the result with `AIR-4933: `. The prefix counts\ntoward the 48-character limit. Model output is normalized to one line and stripped of\nMarkdown, labels, control characters, duplicate ticket keys, and trailing periods.\n\nMissing configuration, unavailable credentials, timeouts, provider failures, and\ninvalid responses leave the session unchanged. Automatic failures are silent unless\n`debug` is enabled; manual failures are shown in the UI.\n\n## Privacy\n\nThe configured model may belong to a different provider than the conversation model.\nBefore sending the excerpt, the extension redacts common bearer tokens, API keys, AWS\naccess keys, private keys, and environment variables whose names end in `TOKEN`,\n`SECRET`, `PASSWORD`, `API_KEY`, or `PRIVATE_KEY`.\n\nRedaction is best-effort, not a substitute for avoiding secrets in prompts. Review the\nconfigured provider's data-handling policy before using it with sensitive sessions.\n\n## Development\n\nPi loads the TypeScript source directly; there is no build step.\n\n```bash\nnpm test\nnpm run pack:check\npi -e .\n```\n\nTests use Node's built-in test runner and TypeScript stripping. The package declares Pi\nas a peer dependency for API compatibility and type information but installs no copy\nof Pi and bundles no dependencies.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}