@oh-my-pi/pi-coding-agent 12.2.0 → 12.3.0
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 +15 -0
- package/package.json +7 -7
- package/src/config/settings-schema.ts +46 -0
- package/src/config/settings.ts +1 -0
- package/src/extensibility/slash-commands.ts +11 -0
- package/src/memories/index.ts +1102 -0
- package/src/memories/storage.ts +563 -0
- package/src/modes/controllers/command-controller.ts +46 -0
- package/src/modes/controllers/input-controller.ts +5 -0
- package/src/modes/interactive-mode.ts +4 -0
- package/src/modes/types.ts +1 -0
- package/src/prompts/memories/consolidation.md +30 -0
- package/src/prompts/memories/read_path.md +11 -0
- package/src/prompts/memories/stage_one_input.md +7 -0
- package/src/prompts/memories/stage_one_system.md +21 -0
- package/src/sdk.ts +12 -0
- package/src/session/agent-session.ts +8 -0
- package/src/system-prompt.ts +8 -9
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [12.3.0] - 2026-02-14
|
|
6
|
+
### Added
|
|
7
|
+
|
|
8
|
+
- Added autonomous memory extraction and consolidation system with configurable settings
|
|
9
|
+
- Added `/memory` slash command with subcommands: `view`, `clear`, `reset`, `enqueue`, `rebuild`
|
|
10
|
+
- Added memory injection payload that automatically includes learned context in system prompts
|
|
11
|
+
- Added two-phase memory pipeline: Stage 1 extracts durable knowledge from session history, Phase 2 consolidates into reusable skills and guidance
|
|
12
|
+
- Added memory storage layer with SQLite-backed job queue for distributed memory processing
|
|
13
|
+
- Added configurable memory settings: concurrency limits, lease timeouts, token budgets, and rollout age constraints
|
|
14
|
+
|
|
15
|
+
### Changed
|
|
16
|
+
|
|
17
|
+
- Modified system prompt building to inject memory guidance when memories are enabled
|
|
18
|
+
- Changed `resolvePromptInput` to handle multiline input and improve error handling for file reads
|
|
19
|
+
|
|
5
20
|
## [12.2.0] - 2026-02-13
|
|
6
21
|
|
|
7
22
|
### Added
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oh-my-pi/pi-coding-agent",
|
|
3
|
-
"version": "12.
|
|
3
|
+
"version": "12.3.0",
|
|
4
4
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -84,12 +84,12 @@
|
|
|
84
84
|
},
|
|
85
85
|
"dependencies": {
|
|
86
86
|
"@mozilla/readability": "0.6.0",
|
|
87
|
-
"@oh-my-pi/omp-stats": "12.
|
|
88
|
-
"@oh-my-pi/pi-agent-core": "12.
|
|
89
|
-
"@oh-my-pi/pi-ai": "12.
|
|
90
|
-
"@oh-my-pi/pi-natives": "12.
|
|
91
|
-
"@oh-my-pi/pi-tui": "12.
|
|
92
|
-
"@oh-my-pi/pi-utils": "12.
|
|
87
|
+
"@oh-my-pi/omp-stats": "12.3.0",
|
|
88
|
+
"@oh-my-pi/pi-agent-core": "12.3.0",
|
|
89
|
+
"@oh-my-pi/pi-ai": "12.3.0",
|
|
90
|
+
"@oh-my-pi/pi-natives": "12.3.0",
|
|
91
|
+
"@oh-my-pi/pi-tui": "12.3.0",
|
|
92
|
+
"@oh-my-pi/pi-utils": "12.3.0",
|
|
93
93
|
"@sinclair/typebox": "^0.34.48",
|
|
94
94
|
"@xterm/headless": "^6.0.0",
|
|
95
95
|
"ajv": "^8.17.1",
|
|
@@ -303,6 +303,33 @@ export const SETTINGS_SCHEMA = {
|
|
|
303
303
|
},
|
|
304
304
|
"branchSummary.reserveTokens": { type: "number", default: 16384 },
|
|
305
305
|
|
|
306
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
307
|
+
// Memories settings
|
|
308
|
+
// ─────────────────────────────────────────────────────────────────────────
|
|
309
|
+
"memories.enabled": {
|
|
310
|
+
type: "boolean",
|
|
311
|
+
default: false,
|
|
312
|
+
ui: {
|
|
313
|
+
tab: "agent",
|
|
314
|
+
label: "Memories",
|
|
315
|
+
description: "Enable autonomous memory extraction and consolidation",
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
"memories.maxRolloutsPerStartup": { type: "number", default: 64 },
|
|
319
|
+
"memories.maxRolloutAgeDays": { type: "number", default: 30 },
|
|
320
|
+
"memories.minRolloutIdleHours": { type: "number", default: 12 },
|
|
321
|
+
"memories.threadScanLimit": { type: "number", default: 300 },
|
|
322
|
+
"memories.maxRawMemoriesForGlobal": { type: "number", default: 200 },
|
|
323
|
+
"memories.stage1Concurrency": { type: "number", default: 8 },
|
|
324
|
+
"memories.stage1LeaseSeconds": { type: "number", default: 120 },
|
|
325
|
+
"memories.stage1RetryDelaySeconds": { type: "number", default: 120 },
|
|
326
|
+
"memories.phase2LeaseSeconds": { type: "number", default: 180 },
|
|
327
|
+
"memories.phase2RetryDelaySeconds": { type: "number", default: 180 },
|
|
328
|
+
"memories.phase2HeartbeatSeconds": { type: "number", default: 30 },
|
|
329
|
+
"memories.rolloutPayloadPercent": { type: "number", default: 0.7 },
|
|
330
|
+
"memories.fallbackTokenLimit": { type: "number", default: 16000 },
|
|
331
|
+
"memories.summaryInjectionTokenLimit": { type: "number", default: 5000 },
|
|
332
|
+
|
|
306
333
|
// ─────────────────────────────────────────────────────────────────────────
|
|
307
334
|
// Retry settings
|
|
308
335
|
// ─────────────────────────────────────────────────────────────────────────
|
|
@@ -952,6 +979,24 @@ export interface RetrySettings {
|
|
|
952
979
|
baseDelayMs: number;
|
|
953
980
|
}
|
|
954
981
|
|
|
982
|
+
export interface MemoriesSettings {
|
|
983
|
+
enabled: boolean;
|
|
984
|
+
maxRolloutsPerStartup: number;
|
|
985
|
+
maxRolloutAgeDays: number;
|
|
986
|
+
minRolloutIdleHours: number;
|
|
987
|
+
threadScanLimit: number;
|
|
988
|
+
maxRawMemoriesForGlobal: number;
|
|
989
|
+
stage1Concurrency: number;
|
|
990
|
+
stage1LeaseSeconds: number;
|
|
991
|
+
stage1RetryDelaySeconds: number;
|
|
992
|
+
phase2LeaseSeconds: number;
|
|
993
|
+
phase2RetryDelaySeconds: number;
|
|
994
|
+
phase2HeartbeatSeconds: number;
|
|
995
|
+
rolloutPayloadPercent: number;
|
|
996
|
+
fallbackTokenLimit: number;
|
|
997
|
+
summaryInjectionTokenLimit: number;
|
|
998
|
+
}
|
|
999
|
+
|
|
955
1000
|
export interface TodoCompletionSettings {
|
|
956
1001
|
enabled: boolean;
|
|
957
1002
|
maxReminders: number;
|
|
@@ -1028,6 +1073,7 @@ export interface BashInterceptorRule {
|
|
|
1028
1073
|
export interface GroupTypeMap {
|
|
1029
1074
|
compaction: CompactionSettings;
|
|
1030
1075
|
retry: RetrySettings;
|
|
1076
|
+
memories: MemoriesSettings;
|
|
1031
1077
|
branchSummary: BranchSummarySettings;
|
|
1032
1078
|
skills: SkillsSettings;
|
|
1033
1079
|
commit: CommitSettings;
|
package/src/config/settings.ts
CHANGED
|
@@ -145,6 +145,17 @@ const BUILTIN_SLASH_COMMAND_DEFS: ReadonlyArray<BuiltinSlashCommand> = [
|
|
|
145
145
|
{ name: "resume", description: "Resume a different session" },
|
|
146
146
|
{ name: "background", description: "Detach UI and continue running in background" },
|
|
147
147
|
{ name: "debug", description: "Write debug log (TUI state and messages)" },
|
|
148
|
+
{
|
|
149
|
+
name: "memory",
|
|
150
|
+
description: "Inspect and operate memory maintenance",
|
|
151
|
+
subcommands: [
|
|
152
|
+
{ name: "view", description: "Show current memory injection payload" },
|
|
153
|
+
{ name: "clear", description: "Clear persisted memory data and artifacts" },
|
|
154
|
+
{ name: "reset", description: "Alias for clear" },
|
|
155
|
+
{ name: "enqueue", description: "Enqueue memory consolidation maintenance" },
|
|
156
|
+
{ name: "rebuild", description: "Alias for enqueue" },
|
|
157
|
+
],
|
|
158
|
+
},
|
|
148
159
|
{ name: "move", description: "Move session to a different working directory", inlineHint: "<path>" },
|
|
149
160
|
{ name: "exit", description: "Exit the application" },
|
|
150
161
|
{ name: "quit", description: "Quit the application" },
|