opencode-gpt-imagegen 0.1.6 → 0.1.7
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/README.md +3 -4
- package/dist/index.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
[](https://www.npmjs.com/package/opencode-gpt-imagegen)
|
|
9
9
|
[](https://github.com/yuji-hatakeyama/opencode-gpt-imagegen/actions/workflows/ci.yml)
|
|
10
10
|
[](./LICENSE)
|
|
11
|
-
[](#roadmap)
|
|
12
11
|
|
|
13
12
|
| Auth path | Status | Billing |
|
|
14
13
|
|---|---|---|
|
|
@@ -35,7 +34,7 @@ OpenCode auto-installs the package via Bun on next launch — no separate `npm i
|
|
|
35
34
|
|
|
36
35
|
## Usage
|
|
37
36
|
|
|
38
|
-
Just ask your agent in natural language and `
|
|
37
|
+
Just ask your agent in natural language and `gpt_imagegen` will be picked up.
|
|
39
38
|
|
|
40
39
|
The three examples below are the **actual outputs of this repo's e2e test suite** — see [`tests/e2e.test.ts`](./tests/e2e.test.ts) for the exact prompts and assertions.
|
|
41
40
|
|
|
@@ -47,7 +46,7 @@ The three examples below are the **actual outputs of this repo's e2e test suite*
|
|
|
47
46
|
|
|
48
47
|
### Example B — auto-versioning
|
|
49
48
|
|
|
50
|
-
`
|
|
49
|
+
`gpt_imagegen` never overwrites an existing file: when the `out` path is already taken, it picks `-v2`, `-v3`, … instead.
|
|
51
50
|
|
|
52
51
|
> Now do the same path but make it a woman in a yellow yukata holding a red wagasa, in a moonlit garden with fireflies. Landscape 1536x1024.
|
|
53
52
|
|
|
@@ -67,7 +66,7 @@ Pass any number of image paths via the `images` argument and the model uses them
|
|
|
67
66
|
|
|
68
67
|
| Version | Auth path | Scope | Status |
|
|
69
68
|
|---|---|---|---|
|
|
70
|
-
| **v0.1.0** | ChatGPT subscription | `
|
|
69
|
+
| **v0.1.0** | ChatGPT subscription | `gpt_imagegen` with optional reference images (generation + reference-guided edits via prompting) | **Released** |
|
|
71
70
|
| **v0.2.0** | OpenAI API key | Adds the API-key billing path: both `generate` (`/v1/images/generations`) and `edit` (`/v1/images/edits`) with reference images | Next |
|
|
72
71
|
| **v0.3.0** | OpenAI API key | Adds **pixel-precise mask inpainting** via `/v1/images/edits` (binary PNG alpha mask) | Planned |
|
|
73
72
|
|
package/dist/index.js
CHANGED
|
@@ -147,13 +147,13 @@ async function saveGeneratedImage(out, ctxDir, base64) {
|
|
|
147
147
|
var GptImagePlugin = async (_input) => {
|
|
148
148
|
return {
|
|
149
149
|
tool: {
|
|
150
|
-
|
|
150
|
+
gpt_imagegen: tool({
|
|
151
151
|
description: [
|
|
152
152
|
"Generate raster images using OpenAI's hosted image_generation tool.",
|
|
153
153
|
"Use for AI-created bitmap visuals such as photos, illustrations, textures, sprites, and mockups.",
|
|
154
154
|
"Do not use when the task is better handled by editing existing SVG/vector/code-native assets, extending an established icon or logo system, or building the visual directly in HTML/CSS/canvas.",
|
|
155
155
|
"Reference images may be attached through `images`; label each image's role inline in `prompt`, for example: 'Image 1: reference image'.",
|
|
156
|
-
"For many distinct assets, invoke
|
|
156
|
+
"For many distinct assets, invoke gpt_imagegen once per requested asset rather than relying on multi-image output; gpt_imagegen returns one image per call.",
|
|
157
157
|
"Requires OpenCode to be authenticated with ChatGPT OAuth. Returns the absolute path of the saved PNG."
|
|
158
158
|
].join(" "),
|
|
159
159
|
args: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-gpt-imagegen",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "OpenCode plugin for GPT Image 2 generation through your ChatGPT subscription, with reference images and safe PNG output.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|