@saifymatteo/pi-extensions 0.1.3 → 0.1.5

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.
Files changed (65) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/package.json +2 -1
  3. package/packages/pi-bg-bash/AGENTS.md +29 -0
  4. package/packages/pi-bg-bash/CHANGELOG.md +25 -0
  5. package/packages/pi-bg-bash/package.json +2 -1
  6. package/packages/pi-bg-bash/src/index.ts +189 -99
  7. package/packages/pi-bg-bash/src/lib/output.ts +31 -0
  8. package/packages/pi-bg-bash/src/lib/panel.ts +155 -0
  9. package/packages/pi-bg-bash/src/lib/process-control.ts +221 -0
  10. package/packages/pi-bg-bash/src/lib/windows-console.ts +169 -0
  11. package/packages/pi-bg-bash/test/job-controls.test.mjs +347 -0
  12. package/packages/pi-bg-bash/test/native-process-control.test.mjs +126 -0
  13. package/packages/pi-bg-bash/test/output.test.mjs +28 -0
  14. package/packages/pi-bg-bash/test/panel.test.mjs +146 -0
  15. package/packages/pi-bg-bash/test/process-control.test.mjs +300 -0
  16. package/packages/pi-bg-bash/test/windows-console.test.mjs +221 -0
  17. package/packages/pi-claude-usage/CHANGELOG.md +18 -0
  18. package/packages/pi-claude-usage/package.json +2 -1
  19. package/packages/pi-clipboard-image/CHANGELOG.md +18 -0
  20. package/packages/pi-clipboard-image/package.json +2 -1
  21. package/packages/pi-codeblock-borders/CHANGELOG.md +18 -0
  22. package/packages/pi-codeblock-borders/package.json +2 -1
  23. package/packages/pi-codegraph/CHANGELOG.md +25 -0
  24. package/packages/pi-codegraph/package.json +2 -1
  25. package/packages/pi-codegraph/src/index.ts +67 -27
  26. package/packages/pi-compact-tools/CHANGELOG.md +18 -0
  27. package/packages/pi-compact-tools/package.json +2 -1
  28. package/packages/pi-decisions/CHANGELOG.md +18 -0
  29. package/packages/pi-decisions/package.json +2 -1
  30. package/packages/pi-load-pi-dotenv/CHANGELOG.md +18 -0
  31. package/packages/pi-load-pi-dotenv/package.json +2 -1
  32. package/packages/pi-model-go/CHANGELOG.md +18 -0
  33. package/packages/pi-model-go/package.json +2 -1
  34. package/packages/pi-prestart-working/CHANGELOG.md +18 -0
  35. package/packages/pi-prestart-working/package.json +2 -1
  36. package/packages/pi-root-guard/CHANGELOG.md +18 -0
  37. package/packages/pi-root-guard/package.json +2 -1
  38. package/packages/pi-session-finder/CHANGELOG.md +18 -0
  39. package/packages/pi-session-finder/package.json +2 -1
  40. package/packages/pi-session-id/CHANGELOG.md +18 -0
  41. package/packages/pi-session-id/package.json +2 -1
  42. package/packages/pi-session-nav/CHANGELOG.md +18 -0
  43. package/packages/pi-session-nav/package.json +2 -1
  44. package/packages/pi-session-rename/CHANGELOG.md +18 -0
  45. package/packages/pi-session-rename/package.json +2 -1
  46. package/packages/pi-session-retention/AGENTS.md +15 -0
  47. package/packages/pi-session-retention/CHANGELOG.md +25 -0
  48. package/packages/pi-session-retention/package.json +2 -1
  49. package/packages/pi-session-retention/src/index.ts +43 -4
  50. package/packages/pi-session-retention/test/startup.test.mjs +229 -0
  51. package/packages/pi-skill-usage-log/CHANGELOG.md +18 -0
  52. package/packages/pi-skill-usage-log/package.json +2 -1
  53. package/packages/pi-tool-usage-log/CHANGELOG.md +18 -0
  54. package/packages/pi-tool-usage-log/package.json +2 -1
  55. package/packages/pi-tts/CHANGELOG.md +18 -0
  56. package/packages/pi-tts/package.json +2 -1
  57. package/packages/pi-user-image-previews/CHANGELOG.md +18 -0
  58. package/packages/pi-user-image-previews/package.json +2 -1
  59. package/packages/pi-vision/CHANGELOG.md +18 -0
  60. package/packages/pi-vision/package.json +2 -1
  61. package/packages/pi-wait/CHANGELOG.md +18 -0
  62. package/packages/pi-wait/package.json +2 -1
  63. package/packages/pi-zvec/CHANGELOG.md +25 -0
  64. package/packages/pi-zvec/package.json +2 -1
  65. package/packages/pi-zvec/src/index.ts +81 -39
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-codegraph",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -11,6 +11,7 @@
11
11
  "src",
12
12
  "examples",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -12,7 +12,7 @@
12
12
  // Provides:
13
13
  // - codegraph_explore tool : symbol source + call paths from the .codegraph/ index
14
14
  // - /codegraph-init /codegraph-sync /codegraph-status /codegraph-unlock
15
- // - session_start : CLI check (report once if missing), config setup, auto-init
15
+ // - session_start : non-blocking CLI check (report once if missing), config setup, auto-init
16
16
  // when no index is found walking up from cwd (bounded by home
17
17
  // dir / filesystem root), and startup sync when indexed
18
18
  // - agent_settled : single-flight sync after each completed turn (at most one
@@ -199,16 +199,26 @@ async function execCg(
199
199
  }
200
200
 
201
201
  export default function codegraph(pi: ExtensionAPI) {
202
- // ── shared CLI availability check ─────────────────────────────────────
202
+ let initialization: Promise<void> | null = null;
203
+ let cliCheck: Promise<boolean> | null = null;
204
+
205
+ // Share a cancellable probe across startup and concurrent first calls.
203
206
  async function ensureCli(pi2: ExtensionAPI): Promise<boolean> {
204
207
  if (cliAvailable !== null) return cliAvailable;
205
- try {
206
- const r = await execCg(pi2, ["version"], { timeout: CLI_CHECK_TIMEOUT_MS });
207
- cliAvailable = r.code === 0;
208
- } catch {
209
- cliAvailable = false;
210
- }
211
- return cliAvailable;
208
+ const gen = sessionGen;
209
+ const signal = runtimeAbort.signal;
210
+ cliCheck ??= (async () => {
211
+ try {
212
+ const r = await execCg(pi2, ["version"], { timeout: CLI_CHECK_TIMEOUT_MS, signal });
213
+ if (gen !== sessionGen || signal.aborted) return false;
214
+ cliAvailable = r.code === 0 && !r.killed;
215
+ } catch {
216
+ if (gen !== sessionGen || signal.aborted) return false;
217
+ cliAvailable = false;
218
+ }
219
+ return cliAvailable === true;
220
+ })();
221
+ return cliCheck;
212
222
  }
213
223
 
214
224
  // ── UI helpers: drop writes from a replaced session, never crash pi ───
@@ -335,7 +345,14 @@ export default function codegraph(pi: ExtensionAPI) {
335
345
  ),
336
346
  }),
337
347
  execute: async (_toolCallId, params, signal, _onUpdate, ctx) => {
338
- if (!(await ensureCli(pi))) return textResult(INSTALL_HINT);
348
+ const lifecycle = runtimeAbort.signal;
349
+ await initialization;
350
+ lifecycle.throwIfAborted();
351
+ signal?.throwIfAborted();
352
+ const available = await ensureCli(pi);
353
+ lifecycle.throwIfAborted();
354
+ signal?.throwIfAborted();
355
+ if (!available) return textResult(INSTALL_HINT);
339
356
  const cwd = params.path ?? ctx.cwd;
340
357
  const args = ["explore", params.query, "-p", cwd];
341
358
  if (typeof params.maxFiles === "number" && params.maxFiles > 0) {
@@ -366,6 +383,8 @@ export default function codegraph(pi: ExtensionAPI) {
366
383
  const token = indexes ? ++opSeq : 0;
367
384
  if (token) currentOpToken = token;
368
385
  try {
386
+ await initialization;
387
+ if (gen !== sessionGen || runtimeAbort.signal.aborted) return;
369
388
  await command.handler(args, ctx);
370
389
  } catch (err) {
371
390
  reportError(ctx, gen, `CodeGraph command /${name} failed`, err instanceof Error ? (err.stack ?? err.message) : String(err));
@@ -505,30 +524,24 @@ export default function codegraph(pi: ExtensionAPI) {
505
524
  },
506
525
  });
507
526
 
508
- pi.on("session_shutdown", () => {
527
+ pi.on("session_shutdown", async () => {
509
528
  cancelRetry();
510
529
  runtimeAbort.abort();
511
530
  sessionGen++;
512
531
  currentOpToken = 0;
513
532
  pendingSync = false;
514
533
  latestCtx = null;
534
+ const pending = initialization;
535
+ initialization = null;
536
+ cliCheck = null;
537
+ await pending?.catch(() => {});
515
538
  });
516
539
 
517
540
  // ── session_start: CLI check → config → auto-init / startup sync ──────
518
- pi.on("session_start", async (_event, ctx) => {
519
- runtimeAbort.abort();
520
- runtimeAbort = new AbortController();
521
- const gen = ++sessionGen;
522
- cancelRetry();
523
- retriesExhausted = false;
524
- state = null;
525
- latestCtx = ctx;
526
- currentOpToken = 0; // invalidate any op from a replaced session
527
- pendingSync = false;
528
- status(ctx, gen, undefined);
529
-
541
+ async function initialize(ctx: ExtensionContext, gen: number, signal: AbortSignal) {
542
+ if (gen !== sessionGen || signal.aborted) return;
530
543
  if (!(await ensureCli(pi))) {
531
- if (gen !== sessionGen) return;
544
+ if (gen !== sessionGen || signal.aborted) return;
532
545
  if (ctx.hasUI && !notifiedMissing) {
533
546
  notifiedMissing = true;
534
547
  reportError(ctx, gen, INSTALL_HINT);
@@ -537,24 +550,51 @@ export default function codegraph(pi: ExtensionAPI) {
537
550
  }
538
551
 
539
552
  // Config setup happens in every mode; background spawning is TUI/RPC only.
553
+ if (gen !== sessionGen || signal.aborted) return;
540
554
  await ensureGlobalConfig();
555
+ if (gen !== sessionGen || signal.aborted) return;
541
556
  const indexedRoot = findIndexRoot(ctx.cwd);
542
557
  const projectRoot = indexedRoot ?? ctx.cwd;
543
- const globalCfg = await readConfigFile(globalConfigPath());
544
- const projectCfg = await readConfigFile(path.join(projectRoot, ".pi", "codegraph.json"));
558
+ const [globalCfg, projectCfg] = await Promise.all([
559
+ readConfigFile(globalConfigPath()),
560
+ readConfigFile(path.join(projectRoot, ".pi", "codegraph.json")),
561
+ ]);
545
562
  const config: CgConfig = {
546
563
  autoInit: boolOr(projectCfg, globalCfg, "autoInit"),
547
564
  syncOnSettle: boolOr(projectCfg, globalCfg, "syncOnSettle"),
548
565
  };
549
- if (gen !== sessionGen) return;
566
+ if (gen !== sessionGen || signal.aborted) return;
550
567
  state = { config, projectRoot, indexed: indexedRoot !== null };
551
568
 
569
+ // A manual init/sync requested during setup already owns the writer slot.
570
+ if (currentOpToken !== 0) return;
552
571
  if (indexedRoot !== null) {
553
572
  // Startup sync on the index owner (not cwd — cwd may be a subdir).
554
573
  if (ctx.hasUI) spawnOp("sync", ctx, gen, projectRoot);
555
574
  } else if (config.autoInit && ctx.hasUI && !isHomeOrRoot(ctx.cwd)) {
556
575
  spawnOp("init", ctx, gen, ctx.cwd);
557
576
  }
577
+ }
578
+
579
+ pi.on("session_start", (_event, ctx) => {
580
+ runtimeAbort.abort();
581
+ runtimeAbort = new AbortController();
582
+ const signal = runtimeAbort.signal;
583
+ const gen = ++sessionGen;
584
+ cancelRetry();
585
+ retriesExhausted = false;
586
+ state = null;
587
+ latestCtx = ctx;
588
+ currentOpToken = 0;
589
+ pendingSync = false;
590
+ cliCheck = null;
591
+ status(ctx, gen, undefined);
592
+
593
+ // Startup never waits; early tool/command calls share this setup promise.
594
+ initialization = Promise.resolve().then(() => initialize(ctx, gen, signal));
595
+ void initialization.catch((error) => {
596
+ if (!signal.aborted) reportError(ctx, gen, "CodeGraph startup failed", error instanceof Error ? error.message : String(error));
597
+ });
558
598
  });
559
599
 
560
600
  // ── agent_settled: single-flight sync after each completed turn ────────
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-compact-tools",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Groups consecutive tool calls into compact expandable transcript cards.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "src",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-decisions",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -11,6 +11,7 @@
11
11
  "src",
12
12
  "examples",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-load-pi-dotenv",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Loads environment variables from the Pi agent directory without replacing existing environment values.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "src",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-model-go",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-prestart-working",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Show a labelled Working spinner while before_agent_start hooks run.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "src",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-root-guard",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Blocks selected write/edit and simple bash writes into Pi and Claude configuration roots.",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0-only",
@@ -11,6 +11,7 @@
11
11
  "files": [
12
12
  "src",
13
13
  "README.md",
14
+ "CHANGELOG.md",
14
15
  "NOTICE.md",
15
16
  "LICENSE"
16
17
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-session-finder",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-session-id",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-session-nav",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.4]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.3]
14
+
15
+ ### Fixed
16
+
17
+ - Classify the package as an extension in the Pi package gallery.
18
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-session-rename",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],
@@ -0,0 +1,15 @@
1
+ # Session retention
2
+
3
+ ## Startup contract
4
+
5
+ Automatic maintenance is background work, not a prerequisite for startup. The session-start handler only schedules it; a busy agent defers the launch until `agent_settled`. After launch, work may overlap an agent run, so automatic discovery offers `/session-cleanup` in a notification rather than opening an approval dialog. The explicit command owns first approval; previously approved stores retain daily automatic cleanup.
6
+
7
+ The original operational READMEs describe the older startup approval dialog. Use the contract above for current startup behavior; preserve the existing daily schedule, pause state and explicit commands.
8
+
9
+ ## Lifecycle safety
10
+
11
+ Queued timers are cancelled on shutdown or explicit maintenance. Running work holds the existing per-store lock, protects the current session family and checks other Pi processes. Switches and forks remain blocked while maintenance runs. Shutdown aborts and drains the complete background task and any file operation before the context can be replaced. Retain graph revalidation and filesystem safety checks even when optimizing scans.
12
+
13
+ ## Verification
14
+
15
+ Run `node --test packages/pi-session-retention/test/*.test.mjs` from the repository root. Startup tests use controlled timers and a gated real-store scan to assert non-blocking dispatch, idle deferral, lock ownership during shutdown and explicit approval. Fixtures stay in temporary directories; live retention approval can authorize moves and permanent purges, so interactive checks require an isolated agent home.
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ Release notes are recorded from 0.1.3 onward.
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.1.5]
8
+
9
+ ### Added
10
+
11
+ - Include package release notes in Pi 1.5.0's Extension Updates.
12
+
13
+ ## [0.1.4]
14
+
15
+ ### Fixed
16
+
17
+ - Schedule automatic maintenance outside the awaited session-start handler; defer launch while the agent is busy.
18
+ - Offer `/session-cleanup` for first approval without interrupting startup, retaining store locking, protected sessions, and shutdown draining.
19
+
20
+ ## [0.1.3]
21
+
22
+ ### Fixed
23
+
24
+ - Classify the package as an extension in the Pi package gallery.
25
+ - Show the package screenshot as its gallery preview.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saifymatteo/pi-session-retention",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "license": "AGPL-3.0-only",
5
5
  "type": "module",
6
6
  "keywords": [
@@ -10,6 +10,7 @@
10
10
  "files": [
11
11
  "src",
12
12
  "README.md",
13
+ "CHANGELOG.md",
13
14
  "NOTICE.md",
14
15
  "LICENSE"
15
16
  ],