@yandy0725/pi-memory 1.3.3 → 1.3.4

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/index.ts CHANGED
@@ -46,7 +46,7 @@ export default function (pi: ExtensionAPI) {
46
46
  config = await loadConfig(ctx);
47
47
  if (!config.enabled) return;
48
48
  memoryDir = await resolveMemoryDir(config, ctx.cwd);
49
- indexSnapshot = await loadIndexSnapshot(memoryDir, config.memIndexMaxLines, config.memIndexMaxBytes);
49
+ indexSnapshot = await loadIndexSnapshot(memoryDir, config.memIndexInjectMaxLines, config.memIndexInjectMaxBytes);
50
50
 
51
51
  // register memory tool once
52
52
  if (!toolRegistered) {
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "1.3.3",
6
+ "version": "1.3.4",
7
7
  "description": "File-system driven persistent memory layer for pi coding agent",
8
8
  "license": "MIT",
9
9
  "repository": {
package/src/config.ts CHANGED
@@ -40,8 +40,14 @@ export interface MemoryConfig {
40
40
  /** Shared defaults for model and sessionPersistence. Per-task configs override. */
41
41
  defaults?: DefaultsConfig;
42
42
  memoryDir: string;
43
+ /** Write capacity: max entries in MEMORY.md index. */
43
44
  memIndexMaxLines: number;
45
+ /** Write capacity: max bytes of serialized MEMORY.md index. */
44
46
  memIndexMaxBytes: number;
47
+ /** Injection truncation: max lines of MEMORY.md injected into system prompt. */
48
+ memIndexInjectMaxLines: number;
49
+ /** Injection truncation: max bytes of MEMORY.md injected into system prompt. */
50
+ memIndexInjectMaxBytes: number;
45
51
  dream: {
46
52
  nudgeAfterSessions: number;
47
53
  nudgeAfterHours: number;
@@ -63,14 +69,16 @@ export const DEFAULT_CONFIG: MemoryConfig = {
63
69
  memoryDir: join(homedir(), CONFIG_DIR_NAME, "memory"),
64
70
  memIndexMaxLines: 200,
65
71
  memIndexMaxBytes: 25600,
72
+ memIndexInjectMaxLines: 20,
73
+ memIndexInjectMaxBytes: 3072,
66
74
  dream: { nudgeAfterSessions: 5, nudgeAfterHours: 24, thinkLevel: "high" },
67
75
  sessionSearch: { maxSessions: 10, maxMatches: 5 },
68
76
  autoSurfacing: {
69
77
  enabled: true,
70
78
  thinkLevel: "off",
71
- maxFiles: 5,
72
- maxTopicBytes: 4096,
73
- maxInjectionBytes: 20480,
79
+ maxFiles: 3,
80
+ maxTopicBytes: 3072,
81
+ maxInjectionBytes: 10240,
74
82
  },
75
83
  extractMemories: {
76
84
  enabled: true,