@tduyng/pi-session 0.0.2 → 0.0.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 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
# @tduyng/pi-session
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Sessions name themselves, and a turn killed by a usage limit resumes when the limit resets. No more `untitled` rows in the picker, no more sitting out a quota by hand.
|
|
4
|
+
|
|
5
|
+
## What it costs
|
|
6
|
+
|
|
7
|
+
Nothing. No tool is registered, no prompt text is injected, and no session entry is created for the naming. The extension reads at `agent_end` and writes a name.
|
|
4
8
|
|
|
5
9
|
## Auto-name
|
|
6
10
|
|
|
7
|
-
A new session starts unnamed. On `agent_end
|
|
11
|
+
A new session starts unnamed. On `agent_end` the extension reads the first user message and uses it: first line, a leading `/` or `#` stripped, whitespace collapsed, 60 characters at most, cut at a word boundary.
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
Before, a week of `2026-09-01 14:22`, `2026-09-01 14:47`, `2026-09-02 09:03`. After, `fix retry backoff`, `review auth diff`, `migrate schema`.
|
|
10
14
|
|
|
11
|
-
|
|
15
|
+
An expanded skill uses its argument when one is present, or the skill name when it has none. The extension ignores the expanded instructions and the skill's filesystem path. A `/skill:name task` command follows the same rule and uses `task`. A `Skill invocation protocol` message with no skill block is skipped, because an extension injected it. A name you set with `/name` always wins.
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
Naming runs last and swallows its own errors. It is cosmetic and never blocks a turn.
|
|
14
18
|
|
|
15
19
|
## Autoresume
|
|
16
20
|
|
|
17
|
-
When a provider quota exhaustion kills a turn, the extension parses a reset time
|
|
21
|
+
When a provider quota exhaustion kills a turn, the extension parses a reset time out of the error text. It accepts:
|
|
18
22
|
|
|
19
23
|
- Epoch timestamps: `limit reached|1757193000`
|
|
20
24
|
- ISO timestamps: `resets at 2026-09-06T23:30:00+02:00`
|
|
@@ -22,15 +26,22 @@ When a provider quota exhaustion kills a turn, the extension parses a reset time
|
|
|
22
26
|
- Clock times: `resets 11:30pm (Europe/Paris)`, `reset at 23:30`
|
|
23
27
|
- Retry-after headers: `retry-after: 3600`
|
|
24
28
|
|
|
25
|
-
For claude-bridge
|
|
29
|
+
For a claude-bridge session whose error carries no reset time, it asks the Anthropic OAuth usage endpoint and picks the latest reset among the exhausted windows, with the credential from the macOS keychain or `~/.claude/.credentials.json`.
|
|
26
30
|
|
|
27
|
-
A 5-second safety delay is added past the reset
|
|
31
|
+
A 5-second safety delay is added past the reset, and the timer caps at 24 hours. A reset further out than 24 hours schedules nothing and posts a warning instead. Any user turn or session shutdown cancels it. The resume sends a real user message: "The usage limit has reset. Continue the previous task from where it stopped."
|
|
28
32
|
|
|
29
|
-
|
|
33
|
+
A quota reset is the cheapest minute of the day to be running: the window opened, the work is ready, and nobody has to be awake for it.
|
|
34
|
+
|
|
35
|
+
| Command | Effect |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| `/autoresume` | Status |
|
|
38
|
+
| `/autoresume on` | Arm it |
|
|
39
|
+
| `/autoresume off` | Disarm it |
|
|
40
|
+
| `/autoresume cancel` | Drop the pending resume |
|
|
30
41
|
|
|
31
42
|
## Design
|
|
32
43
|
|
|
33
|
-
|
|
44
|
+
Autoresume touches no session storage and adds no tool beyond its command. Session creation, storage, and selection stay with pi.
|
|
34
45
|
|
|
35
46
|
## Install
|
|
36
47
|
|
|
@@ -40,6 +51,4 @@ pi install npm:@tduyng/pi-session
|
|
|
40
51
|
|
|
41
52
|
Local checkout: `pi install /path/to/dotfiles/pi/agent/extensions/pi-session`
|
|
42
53
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
None. It works out of the box.
|
|
54
|
+
No configuration required.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tduyng/pi-session",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.3",
|
|
4
|
+
"description": "Sessions name themselves, and a turn killed by a usage limit resumes when the limit resets.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi",
|
|
7
7
|
"pi-package",
|