@oh-my-pi/pi-coding-agent 12.2.1 → 12.4.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 CHANGED
@@ -2,6 +2,36 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [12.4.0] - 2026-02-14
6
+ ### Changed
7
+
8
+ - Moved `sanitizeText` function from `@oh-my-pi/pi-utils` to `@oh-my-pi/pi-natives` for better code organization
9
+ - Replaced internal `#normalizeOutput` methods with `sanitizeText` utility function in bash and Python execution components
10
+ - Added line length clamping (4000 characters) to bash and Python execution output to prevent display of excessively long lines
11
+ - Modified memory storage to isolate memories by project working directory, preventing cross-project memory contamination
12
+
13
+ ### Fixed
14
+
15
+ - Fixed bash interactive tool to gracefully handle malformed output chunks by normalizing them before display
16
+ - Fixed fetch tool incorrectly treating HTML content as plain text or markdown
17
+ - Fixed output truncation notice displaying incorrect byte limit when maxBytes differs from outputBytes
18
+ - Fixed Cloudflare returning corrupted bytes when compression is negotiated in web scraper requests
19
+
20
+ ## [12.3.0] - 2026-02-14
21
+ ### Added
22
+
23
+ - Added autonomous memory extraction and consolidation system with configurable settings
24
+ - Added `/memory` slash command with subcommands: `view`, `clear`, `reset`, `enqueue`, `rebuild`
25
+ - Added memory injection payload that automatically includes learned context in system prompts
26
+ - Added two-phase memory pipeline: Stage 1 extracts durable knowledge from session history, Phase 2 consolidates into reusable skills and guidance
27
+ - Added memory storage layer with SQLite-backed job queue for distributed memory processing
28
+ - Added configurable memory settings: concurrency limits, lease timeouts, token budgets, and rollout age constraints
29
+
30
+ ### Changed
31
+
32
+ - Modified system prompt building to inject memory guidance when memories are enabled
33
+ - Changed `resolvePromptInput` to handle multiline input and improve error handling for file reads
34
+
5
35
  ## [12.2.0] - 2026-02-13
6
36
 
7
37
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oh-my-pi/pi-coding-agent",
3
- "version": "12.2.1",
3
+ "version": "12.4.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.2.1",
88
- "@oh-my-pi/pi-agent-core": "12.2.1",
89
- "@oh-my-pi/pi-ai": "12.2.1",
90
- "@oh-my-pi/pi-natives": "12.2.1",
91
- "@oh-my-pi/pi-tui": "12.2.1",
92
- "@oh-my-pi/pi-utils": "12.2.1",
87
+ "@oh-my-pi/omp-stats": "12.4.0",
88
+ "@oh-my-pi/pi-agent-core": "12.4.0",
89
+ "@oh-my-pi/pi-ai": "12.4.0",
90
+ "@oh-my-pi/pi-natives": "12.4.0",
91
+ "@oh-my-pi/pi-tui": "12.4.0",
92
+ "@oh-my-pi/pi-utils": "12.4.0",
93
93
  "@sinclair/typebox": "^0.34.48",
94
94
  "@xterm/headless": "^6.0.0",
95
95
  "ajv": "^8.17.1",
@@ -8,7 +8,7 @@ import {
8
8
  matchesKey,
9
9
  setEditorKeybindings,
10
10
  } from "@oh-my-pi/pi-tui";
11
- import { logger } from "@oh-my-pi/pi-utils";
11
+ import { isEnoent, logger } from "@oh-my-pi/pi-utils";
12
12
  import { getAgentDir } from "@oh-my-pi/pi-utils/dirs";
13
13
 
14
14
  /**
@@ -204,6 +204,7 @@ export class KeybindingsManager {
204
204
  try {
205
205
  return await Bun.file(path).json();
206
206
  } catch (error) {
207
+ if (isEnoent(error)) return {};
207
208
  logger.warn("Failed to parse keybindings config", { path, error: String(error) });
208
209
  return {};
209
210
  }
@@ -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;
@@ -42,6 +42,7 @@ export type {
42
42
  ExaSettings,
43
43
  GroupPrefix,
44
44
  GroupTypeMap,
45
+ MemoriesSettings,
45
46
  RetrySettings,
46
47
  SettingPath,
47
48
  SettingValue,
@@ -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" },
package/src/lsp/render.ts CHANGED
@@ -282,7 +282,7 @@ function renderHover(
282
282
  }
283
283
 
284
284
  /**
285
- * Syntax highlight code using native WASM highlighter.
285
+ * Syntax highlight code using native highlighter.
286
286
  */
287
287
  function highlightCode(codeText: string, language: string, theme: Theme): string[] {
288
288
  const validLang = language && supportsLanguage(language) ? language : undefined;