pi-codex-image-gen 0.1.7 → 0.1.9

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,19 @@ This project follows the spirit of [Keep a Changelog](https://keepachangelog.com
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.9] - 2026-05-20
10
+
11
+ ### Changed
12
+
13
+ - Moved package source to the `jvm/pi-mono` monorepo.
14
+ - Updated npm metadata to point at the monorepo package directory.
15
+
16
+ ## [0.1.8] - 2026-05-10
17
+
18
+ ### Fixed
19
+
20
+ - Disable install/update telemetry automatically in CI environments.
21
+
9
22
  ## [0.1.7] - 2026-05-10
10
23
 
11
24
  ### Added
package/CONTRIBUTING.md CHANGED
@@ -18,7 +18,7 @@ Install this checkout into a temporary Pi project:
18
18
  ```bash
19
19
  mkdir -p <test-project>
20
20
  cd <test-project>
21
- pi package add -l /path/to/pi-codex-image-gen
21
+ pi install -l /path/to/pi-mono/packages/pi-codex-image-gen
22
22
  pi
23
23
  ```
24
24
 
@@ -27,7 +27,7 @@ Then run `/login` for `openai-codex` and ask Pi to generate an image.
27
27
  For a one-off run without changing settings:
28
28
 
29
29
  ```bash
30
- pi -e /path/to/pi-codex-image-gen/index.ts
30
+ pi -e /path/to/pi-mono/packages/pi-codex-image-gen
31
31
  ```
32
32
 
33
33
  To validate the Python CLI fallback without an API key:
package/NOTICE ADDED
@@ -0,0 +1,20 @@
1
+ pi-codex-image-gen includes imagegen skill helper files derived from OpenAI Codex.
2
+
3
+ OpenAI Codex
4
+ Copyright 2025 OpenAI
5
+ Licensed under the Apache License, Version 2.0.
6
+ Source: https://github.com/openai/codex
7
+
8
+ The following files are vendored from the OpenAI Codex imagegen skill and remain under the Apache License, Version 2.0:
9
+
10
+ - skills/imagegen/scripts/image_gen.py
11
+ - skills/imagegen/scripts/remove_chroma_key.py
12
+ - skills/imagegen/references/cli.md
13
+ - skills/imagegen/references/codex-network.md
14
+ - skills/imagegen/references/image-api.md
15
+ - skills/imagegen/references/prompting.md
16
+ - skills/imagegen/references/sample-prompts.md
17
+ - skills/imagegen/SKILL.md
18
+ - skills/imagegen/LICENSE.txt
19
+ - skills/imagegen/assets/imagegen-small.svg
20
+ - skills/imagegen/assets/imagegen.png
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # pi-codex-image-gen
2
2
 
3
- Image generation for [Pi](https://github.com/badlogic/pi-mono) using the ChatGPT Images 2.0 model via the OpenAI Codex Responses backend.
3
+ Image generation for [Pi](https://pi.dev) using the ChatGPT Images 2.0 model via the OpenAI Codex Responses backend.
4
4
 
5
5
  ## Install
6
6
 
@@ -8,6 +8,18 @@ Image generation for [Pi](https://github.com/badlogic/pi-mono) using the ChatGPT
8
8
  pi install npm:pi-codex-image-gen
9
9
  ```
10
10
 
11
+ During local development from this monorepo:
12
+
13
+ ```sh
14
+ pi install /path/to/pi-mono/packages/pi-codex-image-gen
15
+ ```
16
+
17
+ For a one-off test run without installing:
18
+
19
+ ```sh
20
+ pi -e /path/to/pi-mono/packages/pi-codex-image-gen
21
+ ```
22
+
11
23
  To uninstall:
12
24
 
13
25
  ```sh
@@ -110,4 +122,6 @@ Project config overrides global config. Example:
110
122
 
111
123
  ## License
112
124
 
113
- Apache-2.0
125
+ Apache-2.0. See [LICENSE](./LICENSE).
126
+
127
+ This package includes imagegen skill helper files derived from [OpenAI Codex](https://github.com/openai/codex), including `skills/imagegen/scripts/image_gen.py`. Those files remain under the Apache License, Version 2.0. See [NOTICE](./NOTICE) and `skills/imagegen/LICENSE.txt`.
package/index.ts CHANGED
@@ -24,6 +24,21 @@ const MAX_RETRIES = 3;
24
24
  const BASE_DELAY_MS = 1000;
25
25
  const INSTALL_TELEMETRY_URL = "https://mocito.dev/api/report-install";
26
26
  const INSTALL_TELEMETRY_TIMEOUT_MS = 5000;
27
+ const CI_ENV_VARS = [
28
+ "CI",
29
+ "GITHUB_ACTIONS",
30
+ "GITLAB_CI",
31
+ "CIRCLECI",
32
+ "BUILDKITE",
33
+ "JENKINS_URL",
34
+ "TEAMCITY_VERSION",
35
+ "TF_BUILD",
36
+ "BITBUCKET_BUILD_NUMBER",
37
+ "APPVEYOR",
38
+ "TRAVIS",
39
+ "DRONE",
40
+ "CODEBUILD_BUILD_ID",
41
+ ] as const;
27
42
 
28
43
  const SAVE_MODES = ["none", "project", "global", "custom"] as const;
29
44
  type SaveMode = (typeof SAVE_MODES)[number];
@@ -159,7 +174,15 @@ function isTruthyEnvFlag(value: string | undefined): boolean {
159
174
  return value === "1" || value.toLowerCase() === "true" || value.toLowerCase() === "yes";
160
175
  }
161
176
 
177
+ function isCiEnvironment(): boolean {
178
+ return CI_ENV_VARS.some((name) => {
179
+ const value = process.env[name];
180
+ return value !== undefined && value !== "" && value !== "0" && value.toLowerCase() !== "false";
181
+ });
182
+ }
183
+
162
184
  function isInstallTelemetryEnabled(): boolean {
185
+ if (isCiEnvironment()) return false;
163
186
  if (isTruthyEnvFlag(process.env.PI_OFFLINE)) return false;
164
187
  if (process.env.PI_TELEMETRY !== undefined) return isTruthyEnvFlag(process.env.PI_TELEMETRY);
165
188
  const settings = readConfigFile(join(getAgentDir(), "settings.json")) as { enableInstallTelemetry?: unknown };
package/package.json CHANGED
@@ -1,18 +1,19 @@
1
1
  {
2
2
  "name": "pi-codex-image-gen",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Image generation for Pi using the ChatGPT Images 2.0 model.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
7
7
  "author": "jvm",
8
8
  "repository": {
9
9
  "type": "git",
10
- "url": "git+https://github.com/jvm/pi-codex-image-gen.git"
10
+ "url": "git+https://github.com/jvm/pi-mono.git",
11
+ "directory": "packages/pi-codex-image-gen"
11
12
  },
12
13
  "bugs": {
13
- "url": "https://github.com/jvm/pi-codex-image-gen/issues"
14
+ "url": "https://github.com/jvm/pi-mono/issues"
14
15
  },
15
- "homepage": "https://github.com/jvm/pi-codex-image-gen#readme",
16
+ "homepage": "https://github.com/jvm/pi-mono/tree/main/packages/pi-codex-image-gen#readme",
16
17
  "keywords": [
17
18
  "pi-package",
18
19
  "pi-extension",
@@ -26,6 +27,7 @@
26
27
  "skills",
27
28
  "README.md",
28
29
  "LICENSE",
30
+ "NOTICE",
29
31
  "CHANGELOG.md",
30
32
  "SECURITY.md",
31
33
  "CONTRIBUTING.md",
@@ -36,8 +38,12 @@
36
38
  "pack:dry-run": "npm pack --dry-run"
37
39
  },
38
40
  "pi": {
39
- "extensions": ["./index.ts"],
40
- "skills": ["./skills"]
41
+ "extensions": [
42
+ "./index.ts"
43
+ ],
44
+ "skills": [
45
+ "./skills"
46
+ ]
41
47
  },
42
48
  "peerDependencies": {
43
49
  "@earendil-works/pi-ai": "*",