@oh-my-pi/pi-mnemopi 17.3.7 → 17.3.8

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,12 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [17.3.8] - 2026-08-19
6
+
7
+ ### Added
8
+
9
+ - Added optional task metadata to the runtime LLM completion interface so hosts can tell an extraction call from a consolidation call and choose the matching prompt
10
+
5
11
  ## [17.3.5] - 2026-08-16
6
12
 
7
13
  ### Fixed
@@ -1,10 +1,15 @@
1
1
  import type { Api, ApiKey, Model } from "@oh-my-pi/pi-ai";
2
+ export type MnemopiLlmCompletionTask = {
3
+ kind: "memory-extraction";
4
+ input: string;
5
+ };
2
6
  export interface MnemopiLlmCompleteOptions {
3
7
  maxTokens?: number;
4
8
  temperature?: number;
5
9
  timeout?: number;
6
10
  provider?: string | null;
7
11
  model?: string | null;
12
+ task?: MnemopiLlmCompletionTask;
8
13
  }
9
14
  export type MnemopiLlmCompletion = (prompt: string, opts?: MnemopiLlmCompleteOptions) => string | null | Promise<string | null>;
10
15
  /**
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-mnemopi",
4
- "version": "17.3.7",
4
+ "version": "17.3.8",
5
5
  "description": "Local SQLite memory engine for Oh My Pi agents",
6
6
  "homepage": "https://omp.sh",
7
7
  "author": "Can Boluk",
@@ -39,10 +39,10 @@
39
39
  "fmt": "biome format --write ."
40
40
  },
41
41
  "dependencies": {
42
- "@oh-my-pi/pi-ai": "17.3.7",
43
- "@oh-my-pi/pi-catalog": "17.3.7",
44
- "@oh-my-pi/pi-natives": "17.3.7",
45
- "@oh-my-pi/pi-utils": "17.3.7"
42
+ "@oh-my-pi/pi-ai": "17.3.8",
43
+ "@oh-my-pi/pi-catalog": "17.3.8",
44
+ "@oh-my-pi/pi-natives": "17.3.8",
45
+ "@oh-my-pi/pi-utils": "17.3.8"
46
46
  },
47
47
  "peerDependencies": {
48
48
  "fastembed": "2.1.0",
@@ -387,7 +387,10 @@ export async function extractFactCategories(
387
387
  if (configuredLlmWillHandleCall()) {
388
388
  diag.recordAttempt("host");
389
389
  try {
390
- const raw = await callConfiguredCompletion(prompt, 0, { maxTokens: llmMaxTokens() });
390
+ const raw = await callConfiguredCompletion(prompt, 0, {
391
+ maxTokens: llmMaxTokens(),
392
+ task: { kind: "memory-extraction", input: text },
393
+ });
391
394
  if (typeof raw === "string" && raw.trim() !== "") {
392
395
  const extracted = parseExtractedFactCategories(raw);
393
396
  const count = countExtractedFactCategories(extracted);
@@ -180,6 +180,7 @@ export async function callConfiguredCompletion(
180
180
  timeout: opts.timeout,
181
181
  provider: opts.provider,
182
182
  model: opts.model,
183
+ task: opts.task,
183
184
  });
184
185
  return typeof raw === "string" ? raw : null;
185
186
  }
@@ -1,12 +1,18 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
2
  import type { Api, ApiKey, Model } from "@oh-my-pi/pi-ai";
3
3
 
4
+ export type MnemopiLlmCompletionTask = {
5
+ kind: "memory-extraction";
6
+ input: string;
7
+ };
8
+
4
9
  export interface MnemopiLlmCompleteOptions {
5
10
  maxTokens?: number;
6
11
  temperature?: number;
7
12
  timeout?: number;
8
13
  provider?: string | null;
9
14
  model?: string | null;
15
+ task?: MnemopiLlmCompletionTask;
10
16
  }
11
17
 
12
18
  export type MnemopiLlmCompletion = (