@pi-archimedes/session-name 2.5.1 → 2.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -22
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
# @pi-archimedes/session-name
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**Find the session you meant.**
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
## What you get
|
|
8
|
-
|
|
9
|
-
- **Automatic naming** — fires on `agent_end` to generate a title from the first user/assistant exchange
|
|
10
|
-
- **Smart model resolution** — supports canonical `provider/id`, bare `id`, and thinking-suffix tolerance
|
|
11
|
-
- **Respects manual names** — skips sessions already named via `--name` or `/name`
|
|
12
|
-
- **Ephemeral-aware** — only names sessions with a session file (skips temporary sessions)
|
|
13
|
-
- **Race-safe** — re-checks session name before setting to avoid overwriting manual changes
|
|
14
|
-
- **Silent failures** — any error (auth, network, etc.) is caught and ignored
|
|
5
|
+
Timestamps and raw hash names don't tell you what a session was *for*. Session-name gives every session a short, descriptive name based on your first exchange, so `pi -r` stops being a guessing game.
|
|
15
6
|
|
|
16
7
|
## Install
|
|
17
8
|
|
|
9
|
+
Standalone:
|
|
10
|
+
|
|
18
11
|
```bash
|
|
19
12
|
pi install npm:@pi-archimedes/session-name
|
|
20
13
|
```
|
|
21
14
|
|
|
22
|
-
Or
|
|
15
|
+
Or the full suite instead:
|
|
23
16
|
|
|
24
17
|
```bash
|
|
25
18
|
pi install npm:pi-archimedes
|
|
26
19
|
```
|
|
27
20
|
|
|
28
|
-
|
|
21
|
+
New to Pi? Pi itself is a one-time global install and needs Node.js ≥ 22.19.0:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install -g --ignore-scripts @earendil-works/pi-coding-agent
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
After installing Pi, choose one installation command above, then `cd` into your project and run `pi`. Inside the session, `/login` signs you in and `/model` picks a model — the [setup section](https://github.com/danielcherubini/pi-archimedes#setup) covers the first run. `/reload` picks the extension up in a running session.
|
|
28
|
+
|
|
29
|
+
## How it works
|
|
29
30
|
|
|
30
|
-
After
|
|
31
|
+
- After the first user + assistant exchange settles, it takes the first exchange (500 characters per side), asks a model to write a 3–8-word title, caps it at 80 characters, and sets the session name — with a final re-check so a name you set yourself can never be overwritten.
|
|
32
|
+
- **Manual names win.** If you named the session (`--name` or `/name`), naming is skipped, and it re-checks before writing.
|
|
33
|
+
- **It uses your current model unless you configure another.** The title is a separate model call outside the main run — with its own cost, **not reflected in the footer's totals**. A `model` setting (e.g. a cheap model) avoids spending your main model on titles.
|
|
34
|
+
- **Skips and retries** — Ephemeral sessions (no session file) are skipped; if the model has no configured auth, the call is skipped. Transient failures print to the console and re-try on later `agent_end` events, giving up for the session after three. It is non-blocking and unobtrusive, but "silent" is too strong: failures are logged.
|
|
31
35
|
|
|
32
36
|
## Settings
|
|
33
37
|
|
|
38
|
+
`~/.pi/agent/settings.json`, under `archimedes.sessionName` (strict JSON):
|
|
39
|
+
|
|
34
40
|
| Setting | Type | Default | Description |
|
|
35
41
|
|---------|------|---------|-------------|
|
|
36
|
-
| `model` | string | _(current model)_ |
|
|
42
|
+
| `model` | string | _(current model)_ | Model used for title generation (e.g. `openai/gpt-4o-mini`). Canonical `provider/id`, bare IDs, and thinking-suffix forms are all resolved. Empty = current model. |
|
|
37
43
|
|
|
38
44
|
On/off is managed by the suite: toggle via `/plugins` (`archimedes.sessionName.enabled`, default on).
|
|
39
45
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## Integration
|
|
43
|
-
|
|
44
|
-
When installed via `pi-archimedes` (the meta package), the session-name package is automatically registered. Standalone installs work independently — it listens for `agent_end` events and uses the Pi extension API to set session names.
|
|
45
|
-
|
|
46
|
-
← Back to [pi-archimedes](../../README.md)
|
|
46
|
+
← [Back to pi-archimedes](https://github.com/danielcherubini/pi-archimedes)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pi-archimedes/session-name",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
".": "./src/index.ts"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@pi-archimedes/core": "2.
|
|
17
|
+
"@pi-archimedes/core": "2.6.3"
|
|
18
18
|
},
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"@earendil-works/pi-coding-agent": ">=0.1.0",
|
|
@@ -22,9 +22,9 @@
|
|
|
22
22
|
"@earendil-works/pi-tui": ">=0.1.0"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@earendil-works/pi-ai": "^0.
|
|
26
|
-
"@earendil-works/pi-coding-agent": "^0.
|
|
27
|
-
"@earendil-works/pi-tui": "^0.
|
|
25
|
+
"@earendil-works/pi-ai": "^0.85.1",
|
|
26
|
+
"@earendil-works/pi-coding-agent": "^0.85.1",
|
|
27
|
+
"@earendil-works/pi-tui": "^0.85.1",
|
|
28
28
|
"typescript": "^6.0.0"
|
|
29
29
|
},
|
|
30
30
|
"pi": {
|