pi-codex-compaction 0.2.0 → 0.2.1

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
@@ -6,6 +6,12 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-10-09
10
+
11
+ ### Fixed
12
+
13
+ - Resolve Pi AI helpers relative to its root entry to avoid Pi's extension-loader alias rewriting submodule imports into invalid paths. Include Pi AI as a runtime dependency and test loading outside the monorepo.
14
+
9
15
  ## [0.2.0] - 2026-10-09
10
16
 
11
17
  ### Added
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-codex-compaction",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Keep Pi sessions flowing with automatic server-side compaction on public OpenAI Responses.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -65,6 +65,7 @@
65
65
  "node": ">=22.19.0"
66
66
  },
67
67
  "dependencies": {
68
+ "@earendil-works/pi-ai": "1.1.0",
68
69
  "@mocito/install-telemetry": "0.1.1"
69
70
  }
70
71
  }
@@ -1,8 +1,10 @@
1
1
  import { createHash, createHmac, randomUUID } from "node:crypto";
2
2
  import type { Model } from "@earendil-works/pi-ai";
3
- import { convertResponsesMessages } from "@earendil-works/pi-ai/api/openai-responses-shared";
4
- import { createGrammarToolInputProperties } from "@earendil-works/pi-ai/api/constrained-sampling";
5
- import { getCurrentSystemMessage, normalizeContext } from "@earendil-works/pi-ai/utils/transcript";
3
+ // Resolve before importing: Pi's jiti root alias also matches subpaths.
4
+ const aiEntry = import.meta.resolve("@earendil-works/pi-ai");
5
+ const { convertResponsesMessages } = await import(new URL("./api/openai-responses-shared.js", aiEntry).href) as typeof import("@earendil-works/pi-ai/api/openai-responses-shared");
6
+ const { createGrammarToolInputProperties } = await import(new URL("./api/constrained-sampling.js", aiEntry).href) as typeof import("@earendil-works/pi-ai/api/constrained-sampling");
7
+ const { getCurrentSystemMessage, normalizeContext } = await import(new URL("./utils/transcript.js", aiEntry).href) as typeof import("@earendil-works/pi-ai/utils/transcript");
6
8
  import {
7
9
  convertToLlm,
8
10
  serializeConversation,