Skip to content

Commit abada55

Browse files
committed
1.3.9
1 parent 8f48677 commit abada55

1 file changed

Lines changed: 69 additions & 7 deletions

File tree

CHANGELOG.md

Lines changed: 69 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,84 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010

1111
### Added
1212

13+
- **soul: Configurable persistence modes** (`shared/soul-config.ts`, `shared/soul-core.ts`)
14+
- New `soul-config.json` config file (`~/.pi/agent/soul-config.json`) with `persistence` and `autoLoad` settings
15+
- Three persistence modes: `global` (default, single active soul), `session` (per-directory soul), `none` (in-memory only)
16+
- `autoLoad` controls whether persisted soul auto-applies on fresh Pi startup; explicit `/soul` and `--soul` always work regardless
17+
- Session mode stores per-directory soul mappings in `.active-soul.json` under a `sessions[]` array keyed by `process.cwd()`
18+
- Global mode uses top-level `soul` field (original behavior, fully backward-compatible)
19+
- Project-level override via `.pi/soul-config.json` (shallow-merges over global config)
20+
21+
- **soul: `--soul` and `--soul-level` CLI flags** (`shared/soul-core.ts`)
22+
- `pi --soul <name>` starts Pi with a specific soul activated
23+
- `pi --soul <name> --soul-level 3` sets disclosure level at launch
24+
- `pi --soul off` clears the persisted soul
25+
- Flags are processed before `autoLoad`, so `--soul` always wins
26+
27+
- **soul: Enhanced `/soul` command** (`shared/soul-core.ts`)
28+
- `/soul status` shows currently active soul name and level
29+
- `/soul` (no args) opens an interactive picker to choose a soul and disclosure level (1-3) when UI supports `ctx.ui.select()`
30+
- Non-interactive terminals fall back to the existing text list behavior
31+
32+
- **soul: Lifecycle events for companion extensions** (`shared/soul-core.ts`)
33+
- `soul:activated` event with payload: soul, displayName, level, manifest, persistence, autoLoad, source
34+
- `soul:deactivated` event with payload: previousSoul, source, persistence, autoLoad
35+
- Enables companion extensions (e.g. Telegram autoconnect) to react to soul changes without polling
36+
37+
- **soul: Unit tests** (`tests/extension-soul.test.ts`)
38+
- Full test suite using `node:test` with `--experimental-test-module-mocks`
39+
- Covers: registration, resources_discover, session_start (reload/new/resume/fork), autoLoad semantics, `--soul` flag handling, `/soul` command, `soul:activated`/`soul:deactivated` events
40+
41+
- **build: `@earendil-works/*` externals** (`scripts/build-tgz.sh`)
42+
- Added `--external:@earendil-works/*` to esbuild bundle command alongside existing `@mariozechner/*`
43+
- Prevents build failures when extension code imports from `@earendil-works/pi-coding-agent` or `@earendil-works/pi-ai`
44+
45+
- **build: New shared exports** (`shared/package.json`)
46+
- Added `./path-utils`, `./soul-config`, and `./soul-core` to the `@vtstech/pi-shared` exports map
47+
48+
### Changed
49+
50+
- **soul: Refactored persistence into shared module** (`extensions/soul.ts`)
51+
- `saveActiveSoul`/`loadActiveSoul`/`clearActiveSoul` now delegate to `ActiveSoulStore` from `shared/soul-config.ts`
52+
- CLI flag handling and interactive picker extracted to `shared/soul-core.ts`
53+
- `expandHome` moved to `shared/path-utils.ts` (was duplicated in soul.ts)
54+
- `session_start` handler now restores soul on reload/resume/fork regardless of `autoLoad` setting
55+
56+
- **test: Updated test runner** (`package.json`)
57+
- Test script now uses `tsx --experimental-test-module-mocks --test tests/*.test.ts` to support `mock.module()` in test files
58+
59+
- **deps: Added type-checking devDependencies** (`package.json`)
60+
- Added `@earendil-works/pi-ai`, `@earendil-works/pi-coding-agent`, and `typebox` as devDependencies for CI type-checking
61+
62+
- **soul: Added `@earendil-works/pi-ai` peer dependency** (`individual-packages/pi-soul/package.json`)
63+
- Required for `StringEnum` import used in tool parameter schemas
64+
65+
### Fixed
66+
67+
- **soul: Interactive picker status selection no longer falls through to usage error** (`shared/soul-core.ts`)
68+
- Selecting status in the interactive picker now correctly returns info instead of triggering the no-args usage message
69+
70+
- **soul: autoLoad applies to session mode** (`extensions/soul.ts`)
71+
- Session-mode souls are now correctly auto-loaded on startup when `autoLoad: true`
72+
73+
- **soul: Moved `soul-core.ts` from `extensions/` to `shared/`** (`shared/soul-core.ts`)
74+
- Pi auto-discovers all `.ts` files in `extensions/` as extension entry points; `soul-core.ts` has no factory export and was causing a load error
75+
- Moved to `shared/` so it's treated as a utility module, not an extension
76+
77+
## [1.3.9] - 05-24-2026 2:08:55 PM
78+
79+
### Added
80+
1381
- **diag: Added --full-prompt parameter** (`extensions/diag.ts`)
1482
- New `/diag --full-prompt` command shows the complete untruncated system prompt
1583
- `self_diagnostic` tool now supports `fullPrompt: boolean` parameter
1684
- Useful for debugging and inspecting the complete system prompt sent to models
1785

18-
### Changed
19-
2086
- **diag: Removed unused parameters** (`extensions/diag.ts`)
2187
- Removed `--quick`, `--security`, and `--performance` parameters (were not fully implemented)
2288
- Kept `--help` as the only parameter alongside the new `--full-prompt`
2389
- Simplified the command interface to match actual functionality
24-
25-
## [1.3.9] - 05-24-2026 2:08:55 PM
26-
27-
### Added
28-
90+
2991
- **hex-edit: Added promptSnippet to hex_edit tool** (`extensions/hex-edit.ts`)
3092
- Added `promptSnippet` property to `hex_edit` tool registration for LLM discoverability
3193
- Tool now appears in system prompt's "Available tools" list for LLMs

0 commit comments

Comments
 (0)