dsh-codex-subscription 1.13.1 → 1.14.0

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/lib/index.js CHANGED
@@ -1303,7 +1303,7 @@ function openaiCodexSubscriptionProvider({ resolveSpeedMode = () => void 0, reso
1303
1303
  }
1304
1304
  //#endregion
1305
1305
  //#region src/version.js
1306
- const PACKAGE_VERSION = "1.13.1";
1306
+ const PACKAGE_VERSION = "1.14.0";
1307
1307
  const USER_AGENT = `dsh-codex-subscription/${PACKAGE_VERSION}`;
1308
1308
  //#endregion
1309
1309
  //#region src/model-catalog.js
@@ -1734,9 +1734,10 @@ async function editImages(values, attachments, signal) {
1734
1734
  return images;
1735
1735
  }
1736
1736
  function imageContent(value) {
1737
+ const label = typeof value.size === "string" && value.size.length > 0 ? `Generated a ${value.size} image.` : "Generated an image.";
1737
1738
  return [{
1738
1739
  type: "text",
1739
- text: typeof value.size === "string" && value.size.length > 0 ? `Generated a ${value.size} image.` : "Generated an image."
1740
+ text: value.localPath === void 0 ? label : `${label}\nOriginal PNG saved on the DSH host at: ${JSON.stringify(value.localPath)}. Read this file or copy it to the workspace with a .png extension; this host path is not a browser URL.`
1740
1741
  }, {
1741
1742
  type: "image",
1742
1743
  attachment: imageReference(value.image)
@@ -1813,6 +1814,11 @@ function imageOutputSchema() {
1813
1814
  }
1814
1815
  },
1815
1816
  background: { type: "string" },
1817
+ localPath: {
1818
+ type: "string",
1819
+ required: true,
1820
+ description: "Absolute path to the original PNG on the DSH host."
1821
+ },
1816
1822
  quality: { type: "string" },
1817
1823
  size: { type: "string" }
1818
1824
  }
@@ -1973,6 +1979,7 @@ function createCodexImageTool(options) {
1973
1979
  const result = {
1974
1980
  image: imageReference(ref),
1975
1981
  original,
1982
+ localPath: options.originalImages.originalPath(original.assetId),
1976
1983
  ...metadata.background === void 0 ? {} : { background: metadata.background },
1977
1984
  ...metadata.quality === void 0 ? {} : { quality: metadata.quality },
1978
1985
  ...metadata.size === void 0 ? {} : { size: metadata.size }
@@ -2045,6 +2052,9 @@ var OriginalImageStore = class {
2045
2052
  if (!ORIGINAL_IMAGE_ID_PATTERN.test(assetId)) throw new TypeError("invalid original image asset id");
2046
2053
  return join(this.root, assetId.slice(4, 6), assetId);
2047
2054
  }
2055
+ originalPath(assetId) {
2056
+ return join(this.directory(assetId), "original");
2057
+ }
2048
2058
  async save(sessionId, data, name = "codex-generated-original.png") {
2049
2059
  if (!validSessionId(sessionId) || !(data instanceof Uint8Array) || data.byteLength === 0 || data.byteLength > 48 * 1024 * 1024) throw new TypeError("invalid original image input");
2050
2060
  const { width, height } = pngDimensions(data);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-codex-subscription",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "Use ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -17,7 +17,6 @@
17
17
  "README.en.md",
18
18
  "README.zh-CN.md",
19
19
  "DIRECTORY.md",
20
- "AGENTS.md",
21
20
  "compatibility.json",
22
21
  "LICENSE",
23
22
  "SECURITY.md",
package/AGENTS.md DELETED
@@ -1,93 +0,0 @@
1
- # Agent installation guide
2
-
3
- Use this guide when a user asks an Agent to install, update, verify, or remove
4
- `dsh-codex-subscription` in a selected DeepSeek Harness profile.
5
-
6
- ## Safety
7
-
8
- - Confirm the target DSH installation and profile. Use `web` only when it is the user's target.
9
- - Use the exact `1.13.1` package below; do not install a moving branch.
10
- - Never print OAuth credentials, account IDs, authorization callbacks, or credential-store contents.
11
- - Preserve the DSH profile, unrelated plugins, sessions, and saved sign-in.
12
- - Do not start, stop, or restart DSH without explicit permission.
13
- - If more than one DSH installation exists, ask which one is the target before changing it.
14
-
15
- ## Locate DSH
16
-
17
- On Windows, check the standard DSH and official npm entry points without recursively scanning disks:
18
-
19
- ```powershell
20
- Get-Command dsh -ErrorAction SilentlyContinue
21
- Get-Command npx -ErrorAction SilentlyContinue
22
- Get-CimInstance Win32_Process -Filter "Name = 'node.exe'" |
23
- Where-Object { $_.CommandLine -match '@deepseek-ai[\\/]dsh[\\/]lib[\\/]bin\.js' } |
24
- Select-Object ExecutablePath, CommandLine
25
- ```
26
-
27
- DSH-Portable exposes the same standard `dsh plugin` contract. Missing system pnpm is normal; do not
28
- install it globally for this plugin. If several targets remain possible, stop and ask the user which one
29
- to change.
30
-
31
- ## Install or update
32
-
33
- For an official DSH installation run through npm, keep the complete `npx` prefix because the official
34
- run command does not create a global `dsh` command:
35
-
36
- ```sh
37
- npx -y @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web add dsh-codex-subscription@1.13.1
38
- ```
39
-
40
- With an existing global `dsh` command:
41
-
42
- ```sh
43
- dsh plugin --profile web add dsh-codex-subscription@1.13.1
44
- ```
45
-
46
- Use the same `add` command to update or repair. This is the complete package-changing operation.
47
- Do not download pnpm, create a second package store, save profile snapshots, add a resident manager,
48
- or restart DSH automatically. The DSH CLI owns package resolution, locking, and profile composition.
49
-
50
- ## Verify
51
-
52
- Use the same executable selected above:
53
-
54
- ```sh
55
- dsh plugin --profile web list dsh-codex-subscription --depth 0
56
- dsh --profile web --dump-config
57
- ```
58
-
59
- For the official npm route, run the same checks with `npx -y @deepseek-ai/dsh@0.1.2-rc.1` in place of `dsh`.
60
-
61
- 1. `dsh-codex-subscription` version `1.13.1` appears exactly once.
62
- 2. `codex-subscription` appears exactly once in the composed config.
63
- 3. No unrelated plugin or profile was changed and DSH was not restarted.
64
-
65
- With permission to restart DSH, open **Settings -> Codex** and verify the settings page loads. Confirm
66
- that search offers **Auto**, **DSH default**, and **Codex subscription**, the composer quota switch defaults
67
- to off, and `codex_image_generate` is available. Do not consume quota merely to test installation unless
68
- the user explicitly asks for a live model, search, or image-generation check.
69
-
70
- ## Uninstall
71
-
72
- ```sh
73
- dsh plugin --profile web remove dsh-codex-subscription
74
- ```
75
-
76
- For the official npm route:
77
-
78
- ```sh
79
- npx -y @deepseek-ai/dsh@0.1.2-rc.1 plugin --profile web remove dsh-codex-subscription
80
- ```
81
-
82
- Uninstall removes only this plugin. It must preserve the profile, sessions, other plugins, and saved
83
- ChatGPT sign-in. Signing out is a separate action and requires explicit permission.
84
-
85
- ## Failure handling
86
-
87
- Distinguish command discovery, network, HTTP/TLS, package-manager, profile-lock, version, and peer
88
- dependency failures. Do not disable TLS validation, delete a lock owned by a live process, install a
89
- second package manager, wipe a profile, expose credentials, or switch to another paid route.
90
-
91
- On failure, report the sanitized command error, DSH version, selected profile, requested plugin version,
92
- installation mode, what changed, and what remains unverified. A successful CLI exit is not live UI
93
- acceptance.