@cortexkit/pi-openai-auth 0.6.3 → 0.6.5

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -1,5 +1,18 @@
1
1
  import { createAssistantMessageEventStream } from '@earendil-works/pi-ai';
2
- import { streamSimple as streamSimpleOpenAICodexResponses } from '@earendil-works/pi-ai/api/openai-codex-responses';
2
+ // Imported from `/compat` rather than the deep `/api/openai-codex-responses`
3
+ // path. Pi's extension loader rewrites pi-ai specifiers so extensions share its
4
+ // SDK instance, and its alias table has entries only for the bare root,
5
+ // `/compat`, `/oauth`, and `/providers/all`. A deep path prefix-matches the root
6
+ // entry, so the remainder is appended to that alias target — a single file —
7
+ // producing `dist/compat.js/api/openai-codex-responses` and failing the whole
8
+ // extension load. The deep import is valid under the package's own exports map,
9
+ // so this only breaks under pi's loader.
10
+ //
11
+ // `/compat` is the specifier that works in both places: it is aliased
12
+ // explicitly by the loader, and it resolves to the same file under plain Node.
13
+ // The bare root does NOT work outside pi — it resolves to `dist/index.js`,
14
+ // which does not export `streamSimple`.
15
+ import { streamSimple as streamSimpleOpenAICodexResponses } from '@earendil-works/pi-ai/compat';
3
16
  import { RawWebSocket } from './raw-ws-node.js';
4
17
  const BASE_URL = 'https://chatgpt.com/backend-api';
5
18
  class PiRawCodexWebSocket extends RawWebSocket {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-openai-auth",
3
- "version": "0.6.3",
3
+ "version": "0.6.5",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {