@agnishc/edb-auto-name-session 0.4.0 → 0.5.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.5.1] - 2026-05-05
4
+
5
+ ### Added
6
+ - Expose the current session name to agents by appending it to the system prompt before agent startup.
7
+
8
+ ## [0.5.0] - 2026-05-05
9
+
3
10
  ## [0.2.0] - 2026-04-29
4
11
 
5
12
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agnishc/edb-auto-name-session",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "Pi extension: replace Pi's first-message session label with a generated title",
5
5
  "keywords": [
6
6
  "pi-package",
package/src/index.ts CHANGED
@@ -34,6 +34,14 @@ export default function autoNameSessionExtension(pi: ExtensionAPI): void {
34
34
  pending = false;
35
35
  });
36
36
 
37
+ pi.on("before_agent_start", async (event) => {
38
+ const name = pi.getSessionName();
39
+ if (!name) return;
40
+ return {
41
+ systemPrompt: `${event.systemPrompt}\n\nCurrent session name: ${name}`,
42
+ };
43
+ });
44
+
37
45
  pi.on("message_end", async (event, ctx) => {
38
46
  if (!armed || pending || pi.getSessionName()) return;
39
47
  if (event.message.role !== "user") return;