Mario Zechner
fa946c68fc
Add session migration script for #320
2025-12-26 03:15:46 +01:00
Mario Zechner
7be4d52635
Add empty Unreleased section to changelog
2025-12-26 03:14:27 +01:00
Mario Zechner
9dcb0bdba4
Release v0.30.1
...
fixes #320
2025-12-26 03:13:37 +01:00
Mario Zechner
fbfdeb2c2e
Fix custom system prompts missing context, skills, date/time, cwd
...
fixes #321
2025-12-26 03:06:10 +01:00
Mario Zechner
9652072f20
Merge pull request #319 from kaofelix/main
...
Use consistent model comparison including provider everywhere
2025-12-26 02:58:26 +01:00
Mario Zechner
3239a4a11a
Add session version field and migrate-on-load strategy
2025-12-25 22:52:04 +01:00
Mario Zechner
013b6814e4
Clarify compaction in tree format: marker in chain, not a branch
2025-12-25 22:49:26 +01:00
Mario Zechner
64e7c80c7e
Update session tree design to use UUIDs instead of indices
2025-12-25 21:19:02 +01:00
Mario Zechner
351faef604
Add session tree format design doc
2025-12-25 21:06:44 +01:00
Mario Zechner
6d97d212d5
Release v0.30.0
2025-12-25 20:35:14 +01:00
Mario Zechner
2369c09b95
docs: Add changelog entry for reverse model cycling and Ctrl+L selector
2025-12-25 20:30:57 +01:00
Mario Zechner and scutifer
911963e777
feat(coding-agent): Add --session-dir flag for custom session directory
...
- Add --session-dir CLI flag to specify custom session directory
- SessionManager API: second param of create(), continueRecent(), list(), open()
changed from agentDir to sessionDir (direct directory, no cwd encoding)
- When omitted, uses default (~/.pi/agent/sessions/<encoded-cwd>/)
- --session now derives sessionDir from file's parent if --session-dir not provided
- list() validates session header before processing files
- Closes #313
Co-authored-by: scutifer <scutifer@users.noreply.github.com >
2025-12-25 20:27:41 +01:00
Mario Zechner
667301bde4
docs: add Shift+Ctrl+P and Ctrl+L keyboard shortcuts to README
...
Follow-up to #315
2025-12-25 18:32:45 +01:00
Mario Zechner
19dde0a988
Release v0.29.1
2025-12-25 18:10:11 +01:00
Mario Zechner
3f0ffc6064
Merge branch 'fix-311'
2025-12-25 18:08:59 +01:00
Mario Zechner
66d19ac9c8
Fix jiti alias for typebox subpath imports in custom tools/hooks
...
fixes #311
2025-12-25 18:07:42 +01:00
Mario Zechner
f8d3b0e34d
Auto-load SYSTEM.md as custom system prompt
...
Closes #309
2025-12-25 18:04:22 +01:00
Mario Zechner
c09f80755b
Add /settings to CHANGELOG
2025-12-25 15:41:52 +01:00
Mario Zechner
b4f7a957c4
Add /settings command with unified settings menu ( #312 )
...
* Add /settings command with unified settings menu
- Add SettingsList component to tui package with support for:
- Inline value cycling (Enter/Space toggles)
- Submenus for complex selections
- Selection preservation when returning from submenu
- Add /settings slash command consolidating:
- Auto-compact (toggle)
- Show images (toggle)
- Queue mode (cycle)
- Hide thinking (toggle)
- Collapse changelog (toggle)
- Thinking level (submenu)
- Theme (submenu with preview)
- Update AGENTS.md to clarify no inline imports rule
Fixes #310
* Add /settings to README slash commands table
* Remove old settings slash commands, consolidate into /settings
- Remove /thinking, /queue, /theme, /autocompact, /show-images commands
- Remove unused selector methods and imports
- Update README references to use /settings
2025-12-25 15:39:42 +01:00
Mario Zechner
c53b22db43
Add /settings command with unified settings menu
...
- Add SettingsList component to tui package with support for:
- Inline value cycling (Enter/Space toggles)
- Submenus for complex selections
- Selection preservation when returning from submenu
- Add /settings slash command consolidating:
- Auto-compact (toggle)
- Show images (toggle)
- Queue mode (cycle)
- Hide thinking (toggle)
- Collapse changelog (toggle)
- Thinking level (submenu)
- Theme (submenu with preview)
- Update AGENTS.md to clarify no inline imports rule
Fixes #310
2025-12-25 15:35:06 +01:00
Mario Zechner
58c02ce02b
Add [Unreleased] section to changelogs
2025-12-25 04:17:41 +01:00
Mario Zechner
b48a0c9328
Release v0.29.0
2025-12-25 04:16:42 +01:00
Mario Zechner
454ea1d36a
Rename /clear to /new, update hook events to before_new/new
...
Closes #305 - took direct rename approach instead of alias system
Thanks @mitsuhiko for the nudge!
2025-12-25 04:15:10 +01:00
Mario Zechner
fa716246ea
Release v0.28.0
2025-12-25 03:57:41 +01:00
Mario Zechner
1059d39d54
Add removeRuntimeApiKey to AuthStorage
2025-12-25 03:57:20 +01:00
Mario Zechner
b5b2ed65d4
Update changelogs for #296
2025-12-25 03:52:46 +01:00
Mario Zechner
54018b6cc0
Refactor OAuth/API key handling: AuthStorage and ModelRegistry
...
- Add AuthStorage class for credential storage (auth.json)
- Add ModelRegistry class for model management with API key resolution
- Add discoverAuthStorage() and discoverModels() discovery functions
- Add migration from legacy oauth.json and settings.json apiKeys to auth.json
- Remove configureOAuthStorage, defaultGetApiKey, findModel, discoverAvailableModels
- Remove apiKeys from Settings type and SettingsManager methods
- Rename getOAuthPath to getAuthPath
- Update SDK, examples, docs, tests, and mom package
Fixes #296
2025-12-25 03:48:36 +01:00
Mario Zechner
9f97f0c8da
getApiKeyFromEnv -> getEnvApiKey
2025-12-25 02:38:10 +01:00
Mario Zechner
bf022d2581
WIP: Add auth-storage.ts for credential management
...
- AuthStorage class for reading/writing auth.json
- Supports both api_key and oauth credential types
- getApiKey() priority: auth.json api_key > auth.json oauth > env var
2025-12-25 01:23:45 +01:00
Mario Zechner
1c31d91c83
WIP: Rename model-config.ts to models-json.ts
...
- loadCustomModels now takes file path instead of agentDir
2025-12-25 01:15:17 +01:00
Mario Zechner
0ae23f19fe
WIP: Add CLI for OAuth login, update README
...
- Add src/cli.ts with login command for OAuth providers
- Add bin entry to package.json for 'npx @mariozechner/pi-ai'
- Update README: remove setApiKey docs, rewrite OAuth section
- OAuth storage is caller's responsibility, not library's
- Use getOAuthProviders() instead of duplicating provider list
2025-12-25 01:09:27 +01:00
Mario Zechner
030788140a
WIP: Remove global state from pi-ai OAuth/API key handling
...
- Remove setApiKey, resolveApiKey, and global apiKeys Map from stream.ts
- Rename getApiKey to getApiKeyFromEnv (only checks env vars)
- Remove OAuth storage layer (storage.ts deleted)
- OAuth login/refresh functions now return credentials instead of saving
- getOAuthApiKey/refreshOAuthToken now take credentials as params
- Add test/oauth.ts helper for ai package tests
- Simplify root npm run check (single biome + tsgo pass)
- Remove redundant check scripts from most packages
- Add web-ui and coding-agent examples to biome/tsgo includes
coding-agent still has compile errors - needs refactoring for new API
2025-12-25 01:01:03 +01:00
Mario Zechner
d93cbf8c32
WIP: remove setApiKey, resolveApiKey
2025-12-24 23:34:23 +01:00
Mario Zechner
385e7aff62
Add changelog entry for #304
2025-12-24 22:47:42 +01:00
Mario Zechner
756b14dc48
Skip over exact duplicate skills ( closes #304 )
2025-12-24 22:45:23 +01:00
Mario Zechner
61cd977926
Add empty Unreleased section
2025-12-24 21:26:15 +01:00
Mario Zechner
8fdd77b652
Release v0.27.9
2025-12-24 21:25:20 +01:00
Mario Zechner
ac5f4a77cc
Fix model selector not showing models with settings.json API keys
...
Fixes #295
2025-12-24 21:23:44 +01:00
Mario Zechner
a96b9201f9
Add empty Unreleased section
2025-12-24 20:53:23 +01:00
Mario Zechner
a965b6f160
Release v0.27.8 - OAuth takes priority over settings.json API keys
2025-12-24 20:52:22 +01:00
Mario Zechner
60768b90f3
Add [Unreleased] section for next cycle
2025-12-24 18:31:13 +01:00
Mario Zechner
89630b0d44
Release v0.27.7
2025-12-24 18:30:53 +01:00
Mario Zechner
29379ea0a6
Fix thinking tag leakage by converting unsigned blocks to plain text
...
Closes #302
2025-12-24 18:15:19 +01:00
Mario Zechner
2b22c3ce75
Add [Unreleased] section to changelog
2025-12-24 14:00:04 +01:00
Mario Zechner
3eb460ee50
Release v0.27.6
2025-12-24 13:59:09 +01:00
Mario Zechner
43add86ebf
Remove duplicate Custom Compaction example, reference main docs
2025-12-24 13:56:00 +01:00
Mario Zechner
705ba5d4f2
Improve compaction hooks: add signal, no timeout, SessionManager cleanup, docs
2025-12-24 13:54:05 +01:00
Mario Zechner
a2664ba38a
Use clearer abbreviations in compaction diagrams
2025-12-24 12:59:45 +01:00
Mario Zechner
3c5f4920c0
Improve compaction diagrams with legend and realistic message types
2025-12-24 12:58:00 +01:00
Mario Zechner
27250c860b
Add reference to compaction.ts source file
2025-12-24 12:55:47 +01:00
Mario Zechner
35a40b2197
Clarify that cut point is always user/assistant/bash, never tool result
2025-12-24 12:55:15 +01:00
Mario Zechner
5f41a384cc
Add split turn diagram to compaction docs
2025-12-24 12:53:23 +01:00
Mario Zechner
699702e366
Clarify keepRecentTokens is configurable
2025-12-24 12:51:41 +01:00
Mario Zechner
51aa1339ef
Add LLM context diagram to compaction docs
2025-12-24 12:49:45 +01:00
Mario Zechner
ea3ab718ea
Fix compaction ASCII diagram to show append-only behavior
2025-12-24 12:49:09 +01:00
Mario Zechner
ea16af8b72
Add ASCII diagram to compaction docs
2025-12-24 12:48:16 +01:00
Mario Zechner
403faafdbe
Add previousSummary to before_compact hook event
2025-12-24 12:47:12 +01:00
Mario Zechner
97bbd7a642
Clarify messagesToSummarize starts after last compaction
2025-12-24 12:44:05 +01:00
Mario Zechner
ee0befdfe1
Improve custom compaction docs in hooks.md
2025-12-24 12:43:04 +01:00
Mario Zechner
d9a542763a
Improve before_compact hook: add messagesToKeep, replace apiKey with resolveApiKey
2025-12-24 12:41:22 +01:00
Mario Zechner
e4283294c8
Update full-compaction example to use resolveApiKey
2025-12-24 12:30:00 +01:00
Mario Zechner
43a5447a80
Add resolveApiKey to before_compact hook event
2025-12-24 12:28:51 +01:00
Mario Zechner
5aa53ded11
Add full-compaction hook example
2025-12-24 12:25:36 +01:00
Mario Zechner
bf313d2713
Release v0.27.5
2025-12-24 12:18:51 +01:00
Mario Zechner
31dc58d43b
Add changelog entry for Ghostty tmux fix
2025-12-24 12:17:31 +01:00
Mario Zechner
6fde3f4d93
Remove test output file
2025-12-24 12:15:47 +01:00
Mario Zechner
9851ee3bdb
Add syntax highlighting to HTML export using highlight.js
2025-12-24 12:13:56 +01:00
Mario Zechner
20b24cf5a4
Fix symlinked skill directories not being discovered
...
Release v0.27.4
2025-12-24 03:32:54 +01:00
Mario Zechner
f8619c1564
Release v0.27.3
2025-12-24 02:46:23 +01:00
Mario Zechner
81b10f2fa0
List all provider keys in README settings example
2025-12-24 02:42:41 +01:00
Mario Zechner
541758fbe0
Use injected resolveApiKey in AgentSession for settings.json support
2025-12-24 02:35:42 +01:00
Mario Zechner
144d9d93de
Update README with settings.json API keys
2025-12-24 02:14:02 +01:00
Mario Zechner
bb1da1ec51
Add API keys in settings.json, fixes #295
2025-12-24 02:11:17 +01:00
Mario Zechner
e234e8d18f
Allow startup without API keys, fixes #288
2025-12-24 01:52:59 +01:00
Mario Zechner
fb9c25f51e
docs: changelog entry for #287
2025-12-23 13:07:05 +01:00
Mario Zechner
c57ed89110
Release v0.27.2
2025-12-23 03:48:52 +01:00
Mario Zechner
4492a3f304
Release v0.27.1
2025-12-22 19:28:26 +01:00
Mario Zechner
093bcecf95
Add [Unreleased] section for next cycle
2025-12-22 18:21:15 +01:00
Mario Zechner
b9b44f4cf4
Release v0.27.0
2025-12-22 18:20:10 +01:00
Mario Zechner
42d7d9d9b6
Add before/after session events with cancellation support
...
- Merge branch event into session with before_branch/branch reasons
- Add before_switch, before_clear, shutdown reasons
- before_* events can be cancelled with { cancel: true }
- Update RPC commands to return cancelled status
- Add shutdown event on process exit
- New example hooks: confirm-destructive, dirty-repo-guard, auto-commit-on-exit
fixes #278
2025-12-22 18:18:38 +01:00
Mario Zechner
99081fce30
Add changelog entry for #280
2025-12-22 17:02:23 +01:00
Mario Zechner
7ad8a8c447
Fix bash tool visual line truncation
...
Use visual line counting (accounting for line wrapping) instead of logical
line counting for bash tool output in collapsed mode. Now consistent with
bash-execution.ts behavior.
- Add shared truncateToVisualLines utility
- Update tool-execution.ts to use Box for bash with visual truncation
- Update bash-execution.ts to use shared utility
- Pass TUI to ToolExecutionComponent for terminal width access
Fixes #275
2025-12-22 17:01:04 +01:00
Mario Zechner
31f4a588fd
TUI: Improve file completion display ( fixes #280 )
2025-12-22 16:36:42 +01:00
Mario Zechner
7e1b632596
Release v0.26.1
2025-12-22 16:19:19 +01:00
Mario Zechner
face745f3d
Fix SDK tools to respect cwd option
...
Core tools now properly use the cwd passed to createAgentSession().
Added tool factory functions for SDK users who specify custom cwd with explicit tools.
Fixes #279
2025-12-22 16:17:55 +01:00
Mario Zechner
42bc368e70
Release v0.26.0
2025-12-22 12:53:58 +01:00
Mario Zechner
207c2cd566
Merge sdk-272: Add SDK for programmatic usage
...
- createAgentSession() factory with full control
- SessionManager/SettingsManager static factories
- Project-specific settings support
- 12 examples and comprehensive docs
Fixes #272
2025-12-22 12:46:32 +01:00
Mario Zechner
9473659bda
Add CHANGELOG entries for SDK and settings changes
2025-12-22 12:45:49 +01:00
Mario Zechner
f835f031eb
SDK docs: add links to specific examples in each section
2025-12-22 12:44:41 +01:00
Mario Zechner
519688cb35
README: clarify TUI settings save to global preferences only
2025-12-22 12:40:42 +01:00
Mario Zechner
e5f74a1ad9
Update README: document project-specific settings, add SettingsManager to SDK list
2025-12-22 12:34:08 +01:00
Mario Zechner
5d290f048e
Fix SDK docs: AgentSession interface, findModel usage, settings example
2025-12-22 12:32:25 +01:00
Mario Zechner
1e6a23ab3d
Update SDK docs for SettingsManager changes
2025-12-22 12:24:58 +01:00
Mario Zechner
62c64a286b
Add project-specific settings and SettingsManager factories
...
- SettingsManager now loads .pi/settings.json from cwd (project settings)
- Project settings merge with global settings (deep merge for objects)
- Setters only modify global settings, project settings are read-only
- Add static factories: SettingsManager.create(cwd?, agentDir?), SettingsManager.inMemory(settings?)
- Add applyOverrides() for programmatic overrides
- Replace 'settings' option with 'settingsManager' in CreateAgentSessionOptions
- Update examples to use new pattern
Incorporates PR #276 approach
2025-12-22 12:23:02 +01:00
Mario Zechner
05e1f31feb
Add SDK documentation
...
- docs/sdk.md: comprehensive SDK reference
- Core concepts (createAgentSession, AgentSession, Agent, events)
- All options with examples
- Discovery functions
- Complete example
- README.md: add SDK section with brief overview and links
2025-12-22 03:20:09 +01:00
Mario Zechner
56121dcac1
Add SDK usage examples
...
12 examples showing increasing levels of customization:
- 01-minimal: all defaults
- 02-custom-model: model and thinking level
- 03-custom-prompt: replace or modify prompt
- 04-skills: discover, filter, merge skills
- 05-tools: built-in tools, custom tools
- 06-hooks: logging, blocking, result modification
- 07-context-files: AGENTS.md files
- 08-slash-commands: file-based commands
- 09-api-keys-and-oauth: API key resolution, OAuth config
- 10-settings: compaction, retry, terminal settings
- 11-sessions: persistence options
- 12-full-control: replace everything
Also exports FileSlashCommand type from index.ts
2025-12-22 03:14:30 +01:00
Mario Zechner
86cfe6a436
Remove unused SessionHeader import from mom/context.ts
2025-12-22 02:52:18 +01:00
Mario Zechner
184c648334
Fix session persistence: flush all buffered entries on first assistant message
...
- SessionManager: add flushed flag, _persist() flushes all entries when first assistant seen
- SessionManager: reset() now creates session header
- MomSessionManager: same pattern, remove pendingEntries/sessionInitialized/startSession/shouldInitializeSession
2025-12-22 02:51:56 +01:00
Mario Zechner
974c8f57e5
Remove unused AgentState import from session-manager.ts
2025-12-22 02:43:56 +01:00
Mario Zechner
0faadfcd00
Fix session-manager simplification issues
...
- Remove unused inspector import from session-manager.ts
- Remove dead code in _persist()
- Update tests for simplified SessionHeader
- Update mom context.ts: remove unused AgentState import, fix startSession(), rename isEnabled to isPersisted
2025-12-22 02:43:38 +01:00