@narumitw/pi-codex-imagegen 0.2.1 → 0.2.2

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
@@ -1,5 +1,13 @@
1
1
  # @narumitw/pi-codex-imagegen
2
2
 
3
+ ## 0.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - e46b610: Reduce Pi startup work by loading unused BTW and Codex Imagegen UI on first use. Preserve command registration, settings, tool exposure, and session cleanup.
8
+ - Updated dependencies [4f79c28]
9
+ - @narumitw/pi-tui-kit@0.69.1
10
+
3
11
  ## 0.2.1
4
12
 
5
13
  ### Patch Changes
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Generate images from Pi through the Codex image endpoint, without starting Codex CLI, an agent, or its plugins.
8
8
 
9
- > **Endpoint:** The request contract is confirmed against [OpenAI Codex source](./docs/protocol.md#source-mapping). This uses an internal ChatGPT endpoint, not the public OpenAI Images API. Real account access and transparent output have not been verified. The endpoint can change or reject third-party clients. Do not publish the initial package until the [live checks](./docs/verification.md) pass and publication is explicitly approved.
9
+ > **Endpoint:** The request contract is confirmed against [OpenAI Codex source](./docs/protocol.md#source-mapping). This uses an internal ChatGPT endpoint, not the public OpenAI Images API. Real account access and transparent output have not been verified. The endpoint can change or reject third-party clients. See the [verification guide](./docs/verification.md) for the remaining live checks.
10
10
 
11
11
  ## ✨ Features
12
12
 
@@ -17,7 +17,19 @@ Generate images from Pi through the Codex image endpoint, without starting Codex
17
17
 
18
18
  ## 📦 Install
19
19
 
20
- This new package is currently source-only; registry installation is unavailable before its first approved publication. Extensions run with Pi's permissions. Review the source before loading it.
20
+ Extensions run with Pi's permissions. Review the source before installing or loading it.
21
+
22
+ Install from npm:
23
+
24
+ ```bash
25
+ pi install npm:@narumitw/pi-codex-imagegen
26
+ ```
27
+
28
+ Try it for one invocation:
29
+
30
+ ```bash
31
+ pi -e npm:@narumitw/pi-codex-imagegen
32
+ ```
21
33
 
22
34
  From the repository root:
23
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-codex-imagegen",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Pi image generation through the Codex image endpoint, without a Codex agent.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "typecheck": "tsc --noEmit"
32
32
  },
33
33
  "dependencies": {
34
- "@narumitw/pi-tui-kit": "^0.69.0"
34
+ "@narumitw/pi-tui-kit": "^0.69.1"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@earendil-works/pi-coding-agent": "*",
@@ -14,7 +14,7 @@ import { Container, Image, Text } from "@earendil-works/pi-tui";
14
14
  import { Type } from "typebox";
15
15
  import { decodeImage, preflightOutput, publishImage } from "./artifacts.js";
16
16
  import { generateImageRequest, getImageAuthStatus, MAX_PROMPT_CHARS } from "./image-client.js";
17
- import { showImagegenMenu } from "./menu.js";
17
+ import type { showImagegenMenu } from "./menu.js";
18
18
  import { type ImagegenSettings, SettingsStore } from "./settings.js";
19
19
 
20
20
  const TOOL_NAME = "codex_imagegen";
@@ -82,7 +82,11 @@ export function createImagegenExtension(overrides: Partial<Dependencies> = {}) {
82
82
  const dependencies: Dependencies = {
83
83
  request: generateImageRequest,
84
84
  publish: publishImage,
85
- menu: showImagegenMenu,
85
+ menu: async (ctx, owner) => {
86
+ const { showImagegenMenu } = await import("./menu.js");
87
+ if (owner.signal.aborted || !owner.isCurrent()) return;
88
+ await showImagegenMenu(ctx, owner);
89
+ },
86
90
  ...overrides,
87
91
  };
88
92
  return (pi: ExtensionAPI) => {