codex-copilot-dx 1.3.12 → 1.3.14
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 +2 -2
- package/bin/cli.mjs +5 -10
- package/docs/ARCHITECTURE.md +11 -6
- package/docs/REFERENCE.md +21 -37
- package/package.json +1 -1
- package/src/access-settings.mjs +2 -1
- package/src/adapter.mjs +14 -4
- package/src/claude-capability-config.mjs +2 -2
- package/src/claude-client-config.mjs +5 -3
- package/src/cli-command-spec.mjs +4 -11
- package/src/cli-image.mjs +24 -180
- package/src/cli-management.mjs +21 -6
- package/src/cli-options.mjs +1 -1
- package/src/cli-secret.mjs +39 -0
- package/src/cli-tools.mjs +1 -1
- package/src/client-integration.mjs +13 -12
- package/src/client-model-plan.mjs +3 -1
- package/src/config.mjs +9 -54
- package/src/connection-runtime.mjs +24 -3
- package/src/copilot-client.mjs +16 -1
- package/src/dashboard/connections.js +41 -10
- package/src/dashboard/console.js +6 -4
- package/src/dashboard/features.js +19 -29
- package/src/dashboard/index.html +3 -3
- package/src/dashboard/language.js +8 -7
- package/src/dashboard/ui.css +6 -0
- package/src/dashboard/ui.js +11 -2
- package/src/dashboard/usage.js +10 -5
- package/src/dashboard-api.mjs +2 -1
- package/src/doctor.mjs +4 -5
- package/src/image-models.mjs +20 -0
- package/src/image-retirement.mjs +33 -0
- package/src/image-setup.mjs +16 -105
- package/src/legacy-image-guidance.mjs +73 -0
- package/src/live-models.mjs +2 -1
- package/src/native-images.mjs +111 -0
- package/src/observability.mjs +2 -0
- package/src/optional-routes.mjs +4 -13
- package/src/privacy-detection.mjs +2 -2
- package/src/privacy-model.mjs +3 -3
- package/src/provider-metadata.mjs +5 -4
- package/src/provider-runtime.mjs +2 -1
- package/src/service-control.mjs +6 -7
- package/src/service-worker.mjs +2 -2
- package/src/image-mcp.mjs +0 -328
- package/src/image-provider-config.mjs +0 -194
- package/src/image-provider.mjs +0 -369
- package/src/image-readiness.mjs +0 -55
- package/src/image-references.mjs +0 -50
- package/src/image-skill/SKILL.md +0 -28
- package/src/image-skill/references/editing.md +0 -15
- package/src/image-skill/references/helper.md +0 -27
- package/src/image-skill.mjs +0 -142
- package/src/image-tool-client.mjs +0 -150
package/README.md
CHANGED
|
@@ -60,10 +60,10 @@ Use `ccdx help` or `ccdx <command> --help` for options. The CLI uses English; th
|
|
|
60
60
|
|
|
61
61
|
## Features and maintenance
|
|
62
62
|
|
|
63
|
-
Use the Web UI for accounts, APIs, models, client access, input suggestions,
|
|
63
|
+
Use the Web UI for accounts, APIs, models, client access, input suggestions, native images, local masking, appearance, diagnostics and updates. CLI commands remain available for automation and recovery. See the [control reference](docs/REFERENCE.md#webui-and-cli-controls).
|
|
64
64
|
|
|
65
65
|
- **Input suggestions:** new integrations attempt setup by default when Codex is closed. Saved off choices are retained. The Web UI can enable, disable, finish setup, open Codex and repair the bridge. Setup synchronizes Show predictions, adds App-profile trust and locally decrypts the prediction hosts' HTTPS traffic. App/thread eligibility still applies. [Details](docs/REFERENCE.md#optional-native-predictions).
|
|
66
|
-
- **Images:**
|
|
66
|
+
- **Images:** Codex’s built-in image tool uses the selected available GitHub image model, with GPT Image 2.5 Flare as the default. Images start enabled; saved off choices are retained. The Web UI provides model selection without an extra API key, MCP or CCDX image skill. [Details](docs/REFERENCE.md#native-image-generation).
|
|
67
67
|
- **Updates:** Settings → Install update downloads and verifies a stable release, then switches the installed service when idle. Busy work postpones the switch. Unmanaged launches require the installer or an installed command. [Details](docs/REFERENCE.md#installation-and-updates).
|
|
68
68
|
|
|
69
69
|
Web UI activity updates through server push; the terminal uses the same in-process activity feed. Reconnecting restores current state and bounded recent records.
|
package/bin/cli.mjs
CHANGED
|
@@ -76,25 +76,18 @@ if (CLI.command === "animation") {
|
|
|
76
76
|
}
|
|
77
77
|
if (CLI.command === "image") {
|
|
78
78
|
try {
|
|
79
|
-
|
|
80
|
-
const { pauseServiceFeature } = await import("../src/cli-tools.mjs");
|
|
81
|
-
const address = parseAdapterAddressOptions(process.env);
|
|
82
|
-
console.log(await pauseServiceFeature({ feature: "image", action: CLI.action, host: address.adapterHost, port: address.adapterPort }));
|
|
83
|
-
process.exit(0);
|
|
84
|
-
}
|
|
85
|
-
const address = CLI.action === "enable"
|
|
86
|
-
? parseAdapterAddressOptions(process.env)
|
|
87
|
-
: { adapterPort: 2026, adapterHost: "127.0.0.1" };
|
|
79
|
+
const address = parseAdapterAddressOptions(process.env);
|
|
88
80
|
const { runImageCommand } = await import("../src/cli-image.mjs");
|
|
89
81
|
const lines = [], structured = CLI.outputFormat === "json";
|
|
90
82
|
const result = await runImageCommand({
|
|
91
83
|
action: CLI.action,
|
|
84
|
+
model: CLI.imageModel,
|
|
92
85
|
commandName: CLI_NAME,
|
|
93
86
|
adapterPort: address.adapterPort,
|
|
94
87
|
adapterHost: address.adapterHost,
|
|
95
88
|
...(structured ? { output: { write: text => lines.push(String(text)) } } : {}),
|
|
96
89
|
});
|
|
97
|
-
if (structured) console.log(JSON.stringify({ client: "codex", feature: "image",
|
|
90
|
+
if (structured) console.log(JSON.stringify({ client: "codex", feature: "image", ...result, details: lines.join("").trim() }));
|
|
98
91
|
process.exit(0);
|
|
99
92
|
} catch (e) {
|
|
100
93
|
if (CLI.outputFormat === "json") console.log(JSON.stringify({ error: { code: e.code || "ccdx_image_status_failed", message: e.message } }));
|
|
@@ -466,6 +459,7 @@ try {
|
|
|
466
459
|
githubCredentialFingerprint: () => profileRuntime.codexCredentialFingerprint,
|
|
467
460
|
log: (kind, message) => console.log(startupComplete ? status(kind, message) : startupCheck(kind, "M365", message)) });
|
|
468
461
|
const codexEnabled = providerRuntime.connections().clients.find(client => client.id === "codex").enabled;
|
|
462
|
+
if (!codexEnabled && !serviceWorker?.warming && !serviceWorker?.preserving) earlyIntegration.retireImages();
|
|
469
463
|
const predictionSetup = codexEnabled && !serviceWorker?.warming ? runInBackground(() => earlyIntegration.start({ autoSetup: !serviceWorker?.preserving })) : Promise.resolve(null);
|
|
470
464
|
const m365Setup = runInBackground(() => providerRuntime.start());
|
|
471
465
|
if (providerRuntime.selection().codex === "github") {
|
|
@@ -617,6 +611,7 @@ try {
|
|
|
617
611
|
activate: async () => {
|
|
618
612
|
await LOGGING.cleanup();try { LOGGING = configureLogging(); } catch { LOGGING = configureLogging({ env: { ...process.env, CCDX_LOG_PATH: "" } }); }
|
|
619
613
|
terminalConsole.start();LOGGING.setTerminalSink((method, args) => terminalConsole.log(method, args));
|
|
614
|
+
earlyIntegration.retireImages();
|
|
620
615
|
},
|
|
621
616
|
inspect: () => {
|
|
622
617
|
const data = activeServer.ccdxSnapshot(), routes = data.requests.by_route;
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -11,7 +11,7 @@ Client integration, image tools and the dashboard are not a general plugin frame
|
|
|
11
11
|
| Provider composition | `provider-runtime.mjs`, `connection-runtime.mjs`, provider/access settings | Explicit selection, lifecycle, history namespaces and snapshots |
|
|
12
12
|
| Claude clients | `claude-gateway.mjs`, `claude-client-lifecycle.mjs`, `claude-client-config.mjs`, `claude-models.mjs` | Native Messages relay and field-owned reversible client setup |
|
|
13
13
|
| Client integration | `client-integration.mjs`, Codex config, native prediction | Client setup, optional start/stop, diagnostic snapshots |
|
|
14
|
-
|
|
|
14
|
+
| Native images | Images routes, GHC client, preference controls and legacy retirement | Native Codex generation/editing through the existing GitHub account; no image MCP or separate credential |
|
|
15
15
|
| Management | CLI, dashboard, observability, package updates | Bounded metadata and explicit user actions |
|
|
16
16
|
| Shared foundations | Codex paths, file locks, atomic files, network routes | No dependency on inference or dashboard rendering |
|
|
17
17
|
|
|
@@ -257,7 +257,7 @@ management/MCP routes separate from the Responses path.
|
|
|
257
257
|
`management-routes.mjs` owns status, health, cache control and prediction repair
|
|
258
258
|
HTTP checks. It receives a snapshot callback and the existing explicit repair
|
|
259
259
|
action, not a model client or a second recovery lifecycle.
|
|
260
|
-
`optional-routes.mjs` owns lazy WebUI/API and image-MCP
|
|
260
|
+
`optional-routes.mjs` owns lazy WebUI/API dispatch and the retired image-MCP HTTP 410 response. `native-images.mjs` owns separate Images API validation, admission, prompt masking, cancellation and operation stats.
|
|
261
261
|
The adapter remains the HTTP composition root; neither extracted route module
|
|
262
262
|
imports it. Native prediction belongs to client integration, WebUI to management,
|
|
263
263
|
and terminal animation to presentation. Input-image optimization remains core
|
|
@@ -846,8 +846,7 @@ validation; rollback resumes it rather than rebuilding a cold directory. GitHub
|
|
|
846
846
|
identity comparisons ignore refreshed verification timestamps.
|
|
847
847
|
|
|
848
848
|
`response-history.mjs` validates complete acyclic source-namespaced history and
|
|
849
|
-
its byte/entry budget before publication. `
|
|
850
|
-
provider-scoped image handles before importing its bounded LRU. `api-secrets.mjs` permits private transfer only of cached references still allowed
|
|
849
|
+
its byte/entry budget before publication. Retired image handles are discarded; saved image files remain user artifacts. `api-secrets.mjs` permits private transfer only of cached references still allowed
|
|
851
850
|
by the unchanged configuration. Those plaintext in-memory values remain confined
|
|
852
851
|
to inherited IPC; they are never written to a checkpoint, UI snapshot or log. The snapshot is consumed and released during
|
|
853
852
|
private handoff; no plaintext disk checkpoint or key-store rewrite is added.
|
|
@@ -1076,9 +1075,9 @@ Claude passthrough now holds incomplete SSE frames and validates complete data b
|
|
|
1076
1075
|
|
|
1077
1076
|
`service-control.mjs` serializes management actions and projects saved/effective state. WebUI and CLI prediction/update commands call this same boundary. `prediction-control.mjs` coordinates existing native setup, bridge lifecycle and App launch; `prediction-preference.mjs` owns the closed-App display-setting transaction across desktop TOML and legacy state. A pending display write is explicit and never reported as visible-suggestion proof. Fresh default setup runs only before App launch and preserves saved off choices.
|
|
1078
1077
|
|
|
1079
|
-
`image-setup.mjs`
|
|
1078
|
+
`image-setup.mjs` projects native GHC image availability and selection; `service-control.mjs` serializes toggle and model-selection changes. `image-retirement.mjs` removes the independent image credential, recognizable old MCP declarations and unmodified guidance. Customized files are preserved with a warning. Codex’s native image extension sends separate JSON generation/edit requests through its configured provider, saves the resulting pixels and emits image items to the App; CCDX reuses GHC authentication and maps the native alias to the saved GHC image selection. `image-models.mjs` interprets declared image capabilities independently of conversation picker flags; `clients.codex.image_model` is the canonical selection shared by controls, model configuration and the Images route. Image-only selection does not change conversation bindings or history isolation. The browser has no image API address/key form. The model compatibility action uses `doctor-compat.mjs` through local tools and requires explicit quota confirmation.
|
|
1080
1079
|
|
|
1081
|
-
The existing supervisor accepts a bounded manual update request as well as its optional nightly scheduler. Both use the same staged package verification, immutable worker, state-transfer, installation commit and rollback path. Manual and scheduled updates are mutually exclusive; settings operations contribute to busy state and
|
|
1080
|
+
The existing supervisor accepts a bounded manual update request as well as its optional nightly scheduler. Both use the same staged package verification, immutable worker, state-transfer, installation commit and rollback path. Manual and scheduled updates are mutually exclusive; settings operations contribute to busy state and stable prediction intent/trust participate in the state fingerprint; the legacy image credential path remains in this fingerprint for old-worker compatibility, and legacy image cleanup runs only after activation; native port allocation and App stat bookkeeping do not. Warm handoff suppresses first-time prediction setup and pending display writes. Explicit prediction reconfiguration replaces the old bridge after committing trust. An unowned installation falls back to the existing standalone launch and exposes that self-update is unavailable. No inference protocol, privacy transport or native authentication path is changed by these controls.
|
|
1082
1081
|
|
|
1083
1082
|
Native discovery, configuration and startup environment inspection run in bounded temporary `prediction-operations.mjs` workers. PowerShell, certificate and filesystem work do not block the gateway event loop. Registered-App discovery precedes default trust/proxy setup; missing Apps leave core startup available. Private environment results feed only bridge initialization and are not returned by WebUI actions.
|
|
1084
1083
|
|
|
@@ -1103,3 +1102,9 @@ Publication requires the explicit complete platform/Node/browser CI matrix on th
|
|
|
1103
1102
|
WebUI copy keeps its existing layout, controls, fonts and icons. Redundant branding and Codex-only tags are omitted in their existing contexts. Switches retain pending/error and saved-versus-effective distinctions; applicable scope, restart prerequisites and operation consequences remain visible. Local-masking sections use localized accessible names after the redundant category heading is removed. TUI/CLI commands retain explicit states and share the same control service.
|
|
1104
1103
|
|
|
1105
1104
|
Performance comparison is separate from runtime logic and reports paired timing without blocking publication. Each paired sample runs its JS detector and native helper in fresh processes, with copied model files at the same owned path. An exact binomial interval on paired medians retains uncertain and regressing observations. Classifier-result and reuse assertions remain blocking. The separate qualification workflow is manual only. Completely cached detection bypasses waiting machinery; uncached work retains its original bounded wait and physical acknowledgement.
|
|
1105
|
+
|
|
1106
|
+
The 1.3.13 native helper groups uncached short CPU sequences under the existing shared core budget. Groups retain at most 512 total tokens and 16 KiB text. The existing core budget is divided between sequence workers, including its remainder, instead of repeatedly creating a full-budget partition for every short field. Tokenization, position IDs, attention scope and dynamic quantization remain per sequence. Already-known windows and single uncached sequences retain their previous paths; long and accelerator-eligible windows use the existing reader. Cancellation waits for physical acknowledgement, completed windows remain reusable, and the complete check still precedes upstream calls. Status advertises cpu_short_batch and reports cpu_batch_groups/cpu_batch_windows without retaining values.
|
|
1107
|
+
|
|
1108
|
+
Claude App 3.x and 4.x share the inspected effort-capable adapter. Later unknown major versions retain conservative routes and preserve existing shared capability settings. Supported contiguous effort declarations select the source-qualified reasoning route; prior route spellings remain accepted for existing conversations. Resynchronization carries long-context preference and model order between the two known source-qualified spellings, and replaces only owned shared capability fields. Non-contiguous upstream effort sets remain limited without adding undeclared levels. The sidebar brand places its shared atom icon and text in one grid row so the intro icon's two-row span cannot offset the label.
|
|
1109
|
+
|
|
1110
|
+
Usage presentation maps configured api_ identifiers to current provider labels after aggregation. Rows, chart filters and historical statistics keep their original keys. Provider-label changes refresh only the table/model labels, preserving the selected raw model key, day and existing chart nodes. The native capability replay disables usage persistence and gives its process a temporary usage path; no production filter recognizes test model names or response IDs.
|
package/docs/REFERENCE.md
CHANGED
|
@@ -27,7 +27,7 @@ For installation and first use, start with the [README](../README.md). This refe
|
|
|
27
27
|
| `ccdx app <id> sync` | Write client settings owned by CCDX |
|
|
28
28
|
| `ccdx app <id> enable` / `disable` | Change access without quitting the app |
|
|
29
29
|
| `ccdx app codex prediction …` | Native suggestion setup and diagnostics |
|
|
30
|
-
| `ccdx app codex image …` |
|
|
30
|
+
| `ccdx app codex image …` | Native image controls and model selection |
|
|
31
31
|
| `ccdx app codex review status` / `select` | Read or choose the review model |
|
|
32
32
|
| `ccdx config show [--effective]` | Read saved preferences and effective state |
|
|
33
33
|
| `ccdx config set <key> <value>` | Save a validated preference |
|
|
@@ -211,7 +211,7 @@ heuristic or original-vendor limit is applied to an arbitrary relay deployment.
|
|
|
211
211
|
|
|
212
212
|
Claude configuration and gateway catalogs use the same compiled model plan.
|
|
213
213
|
Explicit App bindings use opaque source-qualified aliases and actual model/source
|
|
214
|
-
labels. Verified 3.x App adapters can use a reasoning-compatible route when the
|
|
214
|
+
labels. Verified 3.x and 4.x App adapters can use a reasoning-compatible route when the
|
|
215
215
|
advertised levels form a client-expressible contiguous set. Older compatibility
|
|
216
216
|
routes remain resolvable for that authorized deployment. Gapped or unexpressible
|
|
217
217
|
levels are reported as limited; unsupported effort requests fail explicitly.
|
|
@@ -257,7 +257,7 @@ Normal management belongs in the WebUI. CLI provides the same backend operations
|
|
|
257
257
|
| Delete a disabled, unbound API | `source <id> remove` | Shared impact revision; selected consumers block deletion |
|
|
258
258
|
| Input suggestions: enable/disable | `app codex prediction enable/disable` | Synchronize bridge preference and native Show predictions |
|
|
259
259
|
| Prediction setup/remove/repair/open | `app codex prediction setup/remove/repair/open` | Shared control; App closure may be required |
|
|
260
|
-
| Images:
|
|
260
|
+
| Images: enable/disable/select | `app codex image enable/disable/select` | Native GHC images; no independent image credential |
|
|
261
261
|
| Install a stable update | `update apply --yes` | Same supervisor request; download, verify and idle service handoff |
|
|
262
262
|
| Local masking: prepare/disable/delete | `config privacy enable/disable/remove` | Same verified model lifecycle; existing protected replies retain restoration |
|
|
263
263
|
| Local masking status and personal information | `config privacy status`, `config set privacy_personal true/false` | Read readiness or change the personal-information choice |
|
|
@@ -575,49 +575,31 @@ unknown candidate-visibility value. A successful recovery only means the bridge
|
|
|
575
575
|
was recreated on the original address, not that gray text appeared.
|
|
576
576
|
|
|
577
577
|
|
|
578
|
-
##
|
|
578
|
+
## Native image generation
|
|
579
579
|
|
|
580
|
-
|
|
580
|
+
Codex’s built-in `image_gen.imagegen` tool uses the current CCDX address for separate Images API requests. CCDX serves `POST /v1/images/generations` and `POST /v1/images/edits`, reuses the existing GitHub Copilot authentication, and maps the native client’s `gpt-image-2` request to the selected available GHC image model. GPT Image 2.5 Flare is the default when advertised. The `X-CCDX-Image-Model` response header identifies the actual model. Image usage counts toward the GitHub account’s image credits; organization model policies still apply. The image model does not replace the selected conversation model.
|
|
581
581
|
|
|
582
|
-
|
|
583
|
-
ccdx app codex image setup
|
|
584
|
-
```
|
|
585
|
-
|
|
586
|
-
The command accepts an HTTPS base URL or a full `/images/generations` endpoint, then asks for an API key without echoing the key. A bare origin such as `https://api.example` expands to `/v1/images/generations`; `https://api.example/v1` expands to the same endpoint. Custom base paths are retained, and existing full endpoints remain unchanged. CCDX uses GET for the corresponding `/models` catalog and POST for image requests; there is no endpoint-search or automatic fallback. It asks for a numeric model selection only when multiple image models are available, then detects either the standard OpenAI Images request format or the supported `input.messages` format for the selected model only. Its single validation request omits the prompt and does not generate an image.
|
|
587
|
-
|
|
588
|
-
An empty key answer retains the saved key only when the normalized endpoint has the same origin (scheme, host, and port). Changing origins requires explicitly entering a key before any provider request; the old key is never automatically sent to a new origin.
|
|
589
|
-
|
|
590
|
-
The provider credential is stored in `~/.config/codex-copilot-dx/image-provider.json`, or under `XDG_CONFIG_HOME`, with mode `0600`. The API key is never written to `~/.codex/config.toml`; that file receives only a marked local MCP entry pointing to the running CCDX adapter with a 210-second tool timeout. Only after enabling, CCDX installs `ccdx-image` guidance under `~/.codex/skills`, with a self-contained Node helper. The concise `SKILL.md` keeps operation selection, safety, and final-image delivery rules; editing details and helper instructions live in references read only for those operations. Codex uses the MCP tool directly, including through deferred tool search; an already-open task without that tool can use the helper to call the same local service and display the saved image. Neither route requires Python, an OpenAI SDK, or copying credentials. Built-in skills and unrelated tools are not modified.
|
|
591
|
-
|
|
592
|
-
The enable command verifies the local MCP handshake and generation-tool directory without generating an image. It reports provider configuration separately from local service readiness; it cannot assert that every running Codex task has refreshed its catalog. Codex normally detects changed skills; restart Codex App once if an open task has not refreshed them. Normal CCDX startup installs or updates this guidance only for an already-enabled provider, without repeating API setup. Without image setup, it installs neither this skill nor the MCP registration. Unchanged guidance is not rewritten. The existing adapter can remain running because provider settings are loaded when the tool is invoked.
|
|
593
|
-
|
|
594
|
-
For Qwen-style image responses, CCDX accepts canonical PNG, JPEG, or WebP `data:image/...;base64,` output within the existing 32 MiB image limit. Public HTTPS image URLs still use the same pinned-DNS download checks; HTTP, private-network targets, and URLs with embedded credentials remain rejected.
|
|
582
|
+
Codex owns native progress events, previews, saved output files and references for subsequent edits. CCDX returns the Images API JSON with base64 pixels. No separate image address or key, MCP registration, CCDX image skill, helper command, or adapter-managed edit handle is required. Native image tool availability still depends on the installed client and thread. A successful direct API request alone does not establish visible App behavior.
|
|
595
583
|
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
Direct MCP generations and edits retain their original inline image content and editing ID, and also save the exact image bytes privately under `~/.local/share/codex-copilot-dx/images`. The result includes ready-to-use image Markdown for Codex's final chat reply, so the image appears as a clickable thumbnail instead of only inside a tool result. Files use unique names and are not overwritten or removed on adapter restart. Asking to show the same image again reuses its existing Markdown, not a new generation or edit. If saving fails, CCDX still returns the generated image content, reports the delivery failure, and does not retry the provider or invent a file path. The bundled helper continues saving once at its existing output location, without a second adapter-side copy. Existing enabled users receive updated, unmodified CCDX-owned guidance on the next CCDX startup; no new setup command is needed.
|
|
599
|
-
|
|
600
|
-
Inspect or disable the optional provider with:
|
|
584
|
+
The WebUI’s image switch is on by default and pauses or resumes new requests. A previously saved off choice is preserved. Available GHC image models appear below the switch; multiple models use one radio selection. The same image purpose appears in Model sources and Codex model configuration. Image models stay out of Codex’s conversation-model picker and conversation default selection. Saved pause choices survive upgrades, and active calls may finish. The CLI uses the same preference:
|
|
601
585
|
|
|
602
586
|
```bash
|
|
603
587
|
ccdx app codex image status
|
|
604
|
-
ccdx app codex image
|
|
588
|
+
ccdx app codex image models
|
|
589
|
+
ccdx app codex image select --id gpt-image-2.5-flare
|
|
590
|
+
ccdx app codex image enable
|
|
591
|
+
ccdx app codex image disable
|
|
605
592
|
```
|
|
606
593
|
|
|
607
|
-
`
|
|
608
|
-
|
|
609
|
-
Generated image downloads must use public HTTPS addresses, do not follow redirects, are DNS-checked against private and reserved addresses, and are capped at 32 MiB. Well-known NAT64 `64:ff9b::/96` addresses apply the same IPv4 public/private rules to the embedded address, without rejecting legitimate public translations. DNS resolution and downloading share one deadline and respond to cancellation; a late DNS result cannot start a cancelled download. The local MCP route accepts calls only from the same device and permits at most two concurrent image operations. Host must name loopback, the actual local socket address (including equivalent IPv6/IPv4-mapped forms), or the explicitly configured bind hostname. Missing Host remains compatible with HTTP/1.0 and in-process clients. It requires `application/json` and rejects browser `Origin` headers; native Codex and Node clients do not send an Origin. The tool supports new-image generation at `1024x1024`, `1536x1024`, or `1024x1536`.
|
|
594
|
+
`enable` and `disable` change only the image preference; the GitHub account and selected model are retained. `models` reads the running service's available image catalog; `select --id` saves one advertised GHC image model. `status` can fall back to local configuration when the service is stopped, without a model request. The old `setup`, `remove`, `pause` and `resume` image commands are retired. GitHub must remain enabled and allowed for Codex, regardless of which source supplies the conversation model.
|
|
610
595
|
|
|
611
|
-
|
|
596
|
+
The selected image model is stored as `clients.codex.image_model` in CCDX's connections configuration. Codex model configuration and sync previews include this image selection, while native client configuration retains a conversation model as its `model`. Native Images requests use the saved image selection through the existing gateway address. No unsupported image-model setting is written into Codex TOML. A saved image model that disappears from the available catalog fails explicitly rather than switching models.
|
|
612
597
|
|
|
613
|
-
|
|
598
|
+
Requests accept one generated image, `auto` or the three existing sizes (`1024x1024`, `1536x1024`, `1024x1536`), `auto`/`low`/`medium`/`high` quality, and `auto`/`opaque`/`transparent` backgrounds. Edits accept one to five inline PNG, JPEG or WebP images, each at most 10 MiB. Remote URLs, ChatGPT file IDs, masks, GIF output and unrecognized fields fail explicitly. Output is bounded at 32 MiB per image. Upstream capabilities remain authoritative; unsupported options fail without silently changing the requested operation or model.
|
|
614
599
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
With `qwen-image-3.0-pro` or `qwen-image-3.0` using either supported protocol, CCDX also exposes `edit_image`. Ask Codex to modify a specific CCDX-generated image; it passes that image's returned `image_id` and the edit instruction to the same configured provider. Each edit returns a new image and ID while preserving the original; omitting `size` retains the source's requested dimensions. The Qwen request contains the source image again on every edit, as required by its [single-turn image editing API](https://help.aliyun.com/zh/model-studio/qwen-image-generation-and-editing-api-reference).
|
|
618
|
-
|
|
619
|
-
Editing references are opaque IDs bound to the provider configuration, not paths or URLs. Source images up to 10 MiB are kept in a 64 MiB byte-bounded in-memory LRU. IDs expire on eviction, provider/credential changes, or adapter restart; restarting Codex App alone does not clear them. A missing or expired ID fails before upstream dispatch. This feature does not import arbitrary local images or provide masks, transparent output, or an `/images/edits` endpoint. Other providers retain their existing generation behavior. The helper accepts `--image-id` for the same edit operation; its stdout remains the saved absolute file path and stderr reports the new ID. Normal host approvals still apply, and failed edits are never replaced with an automatic new generation.
|
|
600
|
+
Both routes require native local clients and JSON, reject browser Origin headers, share request-body admission, enforce at most two active image operations, and propagate cancellation. Prompt text uses the existing local masking policy; pixels are outside text masking’s scope. CCDX uses a 180-second deadline and never retries image inference or follows redirects. Usage and operation counts use the existing status/usage paths without logging prompts or pixels.
|
|
620
601
|
|
|
602
|
+
The old external image provider, Qwen-specific generation/editing, `/mcp/image`, adapter-held edit IDs, image setup form and skill/helper installer are retired. `/mcp/image` returns HTTP 410, including cached calls from old tasks. Startup deletes the old `image-provider.json` credential without reading it and removes recognizable CCDX-owned MCP configuration and unmodified guidance. Customized declarations and modified guidance are preserved with a warning; review them manually. Existing image files remain user artifacts and are never deleted by retirement. Core startup remains available if optional legacy cleanup cannot complete.
|
|
621
603
|
|
|
622
604
|
## Security
|
|
623
605
|
|
|
@@ -625,7 +607,7 @@ Editing references are opaque IDs bound to the provider configuration, not paths
|
|
|
625
607
|
- Enabling LAN binding exposes a Copilot-backed API to other reachable machines. Provide your own host firewall and network isolation; do not expose the listener to an untrusted network.
|
|
626
608
|
- Inference POSTs reject any browser `Origin` header before reading the body or contacting upstream, including simple `text/plain` requests. Native Codex/Node requests without Origin and deliberately enabled native LAN clients keep their existing access. This is not authentication or protection against untrusted local native programs.
|
|
627
609
|
- Explicit auth tools store GitHub OAuth credentials at `~/.local/share/ccdx/github_token`, with precedence over the compatible legacy `~/.local/share/copilot-api/github_token` store. Short-lived Copilot service tokens remain in process memory and are refreshed as needed. First-time local discovery hands its verified service token to the startup client when the saved credential and account match and more than a minute of validity remains, avoiding a duplicate exchange. Existing cached tokens, refreshes in flight and account bindings are retained. See Account and repair tools for safe replacement/sign-out behavior.
|
|
628
|
-
-
|
|
610
|
+
- Native image requests use the existing GitHub credential. The retired independent image credential is removed during legacy cleanup.
|
|
629
611
|
- Runtime status and usage records retain metadata by default; explicitly enabled HTTP error excerpts can contain private context. Diagnostic logging records status and error messages; it is not a general redaction layer for arbitrary error text. See Debug logging before sharing logs.
|
|
630
612
|
- Request/response bodies, request-admission queues, retained history, image work, SSE buffers, log queues, retries, and shutdown have explicit limits. These component limits are not a single process-wide memory ceiling; completed image files are persistent user artifacts, not an automatically evicted cache.
|
|
631
613
|
|
|
@@ -789,7 +771,7 @@ Rules and a local model replace detected values with stable placeholders. Replie
|
|
|
789
771
|
|
|
790
772
|
Tool data is interpreted in its own context: ordinary argument fields named `id`, `signature`, `data` or `type` are restored, while protocol identifiers and signed blocks remain unchanged. Streaming restoration retains SSE event metadata and restores Responses custom-tool text across fragments. Incomplete parameters are discarded when the upstream emits a failure rather than replacing that failure with a restoration error.
|
|
791
773
|
|
|
792
|
-
Each request pins its masking choice, including compatibility retries. Checks normally wait up to 15 seconds; a plan with at least one 16 KiB batch of uncached or in-flight text, or more than one pending native window, receives a bounded 60-second wait. A request still exceeding its wait is rejected before any upstream call. Submitted native batches finish and remain reusable; callers share in-flight work, and unused queued work stops. The 1.3.
|
|
774
|
+
Each request pins its masking choice, including compatibility retries. Checks normally wait up to 15 seconds; a plan with at least one 16 KiB batch of uncached or in-flight text, or more than one pending native window, receives a bounded 60-second wait. A request still exceeding its wait is rejected before any upstream call. Submitted native batches finish and remain reusable; callers share in-flight work, and unused queued work stops. The 1.3.13 component reuses exact natural token-window predictions. Independent short CPU sequences run in bounded groups, with at most 512 total tokens including sequence markers and 16 KiB text. Each sequence keeps its tokenization, positions, attention and quantization scale; fields are not joined into a shared context. A single uncached sequence and accelerator-eligible windows retain their previous execution path. CPU batch-group and computed-window counts are exposed in the existing status metadata. Sparse non-O labels and exact scores use a separate 4 MiB/5,000-entry memory cache; original tokenization, window overlaps and current-text byte offsets are unchanged. Up to two text batches run concurrently, toward 16 KiB or 64 entries, keeping a larger individual text whole. Exact completed texts retain hot aliases. When the last waiter leaves, supporting components finish current windows, cache them and acknowledge cancellation before releasing the native slot. A waiter joining during cancellation resumes after acknowledgement; older compatible components finish whole batches as before. No request uses an incomplete model check. A native job retains its five-minute deadline and the native eight-job/16 MiB limits; the detection queue adds a 16 MiB/8,192-entry bound. Cache metadata remains within 5,000 entries/4 MiB, without storing detection history on disk. Cold-check cost and recovery are measured separately from hot reuse. Fully cached checks do not create native-work wait timers or cancellation listeners; they still honor caller cancellation before returning. CPU intermediate matrices are reused only within one inference. CoreML reuses one C-owned input array/provider per model under its existing mutex and clears its buffers after every successful or failed prediction. Go input memory is not retained by CoreML; classification mathematics and thread budgets are unchanged.
|
|
793
775
|
|
|
794
776
|
Streaming restoration emits argument fragments incrementally with JSON string escaping, keeps protocol identities and signed state opaque, and validates completion against argument snapshots or incremental JSON syntax. Only unfinished placeholder tails and structural metadata are retained; raw argument bytes per channel remain capped at 8 MiB, retained tails/metadata/validator state at 32 MiB and active channels at 1,024. Added tail deltas preserve increasing Responses sequence numbers. An incomplete or failed upstream response does not manufacture a completed tool call. Successful frame bytes remain unchanged when restoration is unnecessary. A timeout or busy check reports that nothing was sent, with `Retry-After` for temporary waits. Model readiness, the latest check and the latest protected reply are separate. WebUI and `ccdx config privacy status` report pending detection and reply-restoration errors; the CLI retains explicit enabled/disabled values, while graphical switches omit duplicate normal-state labels; request details retain bounded error/event/channel codes and buffer quantities, never their values. A loaded model or HTTP 200 does not establish that a request or client tool completed.
|
|
795
777
|
|
|
@@ -801,6 +783,8 @@ Try locally sends sample text only to the local component. Request records show
|
|
|
801
783
|
|
|
802
784
|
Privacy failures have a separate local diagnostic origin. Response-restoration failures report that the response was stopped; request-check failures report that nothing was sent. When the latest Messages input explicitly contains failed tool results, request details show their count without retaining their content. HTTP success describes the model response, not proof that a client executed its tools successfully.
|
|
803
785
|
|
|
804
|
-
The optional component is pinned to v1.3.
|
|
786
|
+
The optional component is pinned to v1.3.13. Verified older components, including 1.3.10, retain their original whole-text behavior. ABI 1 is unchanged; window reuse, advisory window plans and acknowledged cancellation are advertised capabilities. Plans contain only text indices and window counts, never request text. Startup retains its previous inexpensive preflight; accelerator initialization remains lazy. Native CI checks both cold detection and startup-plus-cold cost. Verified 1.3.6 and 1.3.9 installations remain compatible. New component receipts bind their protocol ABI and model revision before older versioned components can be reused. On Intel Macs where CoreML selects CPU, windows below 128 tokens use the existing native int8 reader; longer windows, GPU, Neural Engine and ARM selection retain their prior policy. Its source and license notices are in `native/privacy-guard` and `src/privacy-notices.txt`. AstrLink Guard model files use their publisher's Apache-2.0 license.
|
|
805
787
|
|
|
806
788
|
Paired timing comparisons report cold, startup-plus-first-check, append and hot-check observations without blocking publication. Classifier correctness, byte verification and reuse assertions remain blocking. Real-use request records expose local-check duration and errors for observation after upgrading; fixed-machine results do not establish sustained real-use performance.
|
|
789
|
+
|
|
790
|
+
Usage tables and analytics model selectors display the current saved name for a configured custom API source. Filtering and aggregation retain the stable provider/model keys. Renaming a source updates its label without merging records; a deleted or unknown source keeps its ID. Existing historical records are not rewritten.
|
package/package.json
CHANGED
package/src/access-settings.mjs
CHANGED
|
@@ -78,10 +78,11 @@ export function checkedAccessSettings(value) {
|
|
|
78
78
|
}
|
|
79
79
|
for (const id of CLIENT_IDS) {
|
|
80
80
|
const client = value.clients[id];
|
|
81
|
-
if (!fields(client, ["enabled", "allowed", "source", "model", "auto_review_model", "auto_review_effort", "history_isolation", "deployments", "default_model", "auto_sync"])
|
|
81
|
+
if (!fields(client, ["enabled", "allowed", "source", "model", "auto_review_model", "auto_review_effort", "history_isolation", "deployments", "default_model", "auto_sync", "image_model"])
|
|
82
82
|
|| typeof client.enabled !== "boolean" || !Array.isArray(client.allowed) || client.allowed.length > 18 || new Set(client.allowed).size !== client.allowed.length
|
|
83
83
|
|| client.allowed.some(source => !ids.has(source)) || client.source !== null && !client.allowed.includes(client.source)
|
|
84
84
|
|| ["model", "auto_review_model"].some(key => client[key] !== undefined && !modelId(client[key]))
|
|
85
|
+
|| client.image_model !== undefined && (id !== "codex" || !modelId(client.image_model))
|
|
85
86
|
|| client.auto_sync !== undefined && typeof client.auto_sync !== "boolean"
|
|
86
87
|
|| client.default_model !== undefined && client.default_model !== null && !modelId(client.default_model)
|
|
87
88
|
|| client.deployments !== undefined && client.deployments !== null && (!Array.isArray(client.deployments) || client.deployments.length > 1000
|
package/src/adapter.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { imageModelCatalog } from "./image-models.mjs";
|
|
1
2
|
import http from "node:http";
|
|
3
|
+
import { createNativeImagesHandler } from "./native-images.mjs";
|
|
2
4
|
import { defaultCopilotClient } from "./copilot.mjs";
|
|
3
5
|
import { buildCodexModelResponse } from "./codex-model-catalog.mjs";
|
|
4
6
|
import { isValidModelList } from "./model-cache.mjs";
|
|
@@ -178,6 +180,10 @@ export function createAdapterHandler(options = {}) {
|
|
|
178
180
|
const responseFailures = options.responseFailures || createResponseFailureDiagnostics();
|
|
179
181
|
const privacy = options.privacy || options.providerRuntime?.privacy || createLocalPrivacy({ env: options.env, home: options.dashboardOptions?.home });
|
|
180
182
|
const httpErrors = createHttpFailureDiagnostics();
|
|
183
|
+
const nativeImages = createNativeImagesHandler({ client: codexClient, acquireRequest, privacy, env: options.env, home: options.dashboardOptions?.home,
|
|
184
|
+
models: options.imageModels || (() => options.providerRuntime?.imageModels?.().models || imageModelCatalog(codexModelRegistry?.models)),
|
|
185
|
+
selection: options.imageSelection || (options.providerRuntime?.imageModels ? () => options.providerRuntime.imageModels().selected_model : undefined),
|
|
186
|
+
requestBodyTimeoutMs, timeoutMs: options.imageTimeoutMs, enabled: options.imagesEnabled, allowed: options.imagesAllowed });
|
|
181
187
|
const optionalRoutes = createOptionalRoutes({ ...options, dashboardOptions: { ...options.dashboardOptions,
|
|
182
188
|
privacy,
|
|
183
189
|
contextSnapshotFn: () => {
|
|
@@ -193,7 +199,7 @@ export function createAdapterHandler(options = {}) {
|
|
|
193
199
|
const activityEvents = createActivityEvents({
|
|
194
200
|
sources: [requestMetrics, streamPerformanceMetrics, options.providerRuntime?.claudePerformance, privacy],
|
|
195
201
|
snapshot: () => {
|
|
196
|
-
const requests = requestMetrics.snapshot(), image =
|
|
202
|
+
const requests = requestMetrics.snapshot(), image = nativeImages.stats();
|
|
197
203
|
const active = ["responses", "responses_compact", "messages"].reduce((sum, route) => sum + requests.by_route[route].active, image?.active || 0);
|
|
198
204
|
const claude = options.providerRuntime?.claudePerformance?.activitySnapshot?.();
|
|
199
205
|
return { ...adapterHealthPayload(), scope: "activity", uptime_ms: Math.round(process.uptime() * 1000), local_privacy: privacy.snapshot(),
|
|
@@ -209,7 +215,7 @@ export function createAdapterHandler(options = {}) {
|
|
|
209
215
|
nativePredictionPac: options.nativePredictionPac, fixPrediction: options.fixPrediction, requestBodyTimeoutMs,
|
|
210
216
|
statusSnapshot: statusSnapshot = () => {
|
|
211
217
|
const snapshot = runtimeStatusPayload({ metrics: requestMetrics, streamPerformance: streamPerformanceMetrics, admission: acquireRequest,
|
|
212
|
-
imagePressure, responseFailures, imageGeneration:
|
|
218
|
+
imagePressure, responseFailures, imageGeneration: nativeImages.stats(),
|
|
213
219
|
modelRegistry: codexModelRegistry, codexClient, codexModelRegistry, codexModelCatalog,
|
|
214
220
|
clientIntegrations: options.clientIntegrationSnapshot?.() });
|
|
215
221
|
const providers = options.providerRuntime?.snapshot();
|
|
@@ -314,6 +320,10 @@ export function createAdapterHandler(options = {}) {
|
|
|
314
320
|
sendJsonError(res, error, 403);
|
|
315
321
|
return;
|
|
316
322
|
}
|
|
323
|
+
if (["/v1/images/generations", "/v1/images/edits"].includes(pathname)) {
|
|
324
|
+
if (req.method !== "POST") { res.setHeader?.("Allow", "POST");sendJsonError(res, httpError("Images require POST", 405));return; }
|
|
325
|
+
return nativeImages(req, res, pathname.split("/").at(-1));
|
|
326
|
+
}
|
|
317
327
|
if (isOptionalRoute(req.method, pathname)) return optionalRoutes.handle(req, res, pathname);
|
|
318
328
|
if (isManagementRoute(req.method, pathname)) return managementHandler(req, res, pathname);
|
|
319
329
|
if (pathname === PROVIDER_MANAGEMENT_PATH) return handleProviderManagement(req, res, options.providerRuntime);
|
|
@@ -437,7 +447,7 @@ export function createAdapterHandler(options = {}) {
|
|
|
437
447
|
const complete = trackRequest ? requestMetrics.begin(routeName) : () => {};
|
|
438
448
|
const streamPerformance = trackRequest && !isDiscoveryRequest(req.method, pathname) ? streamPerformanceMetrics.begin(routeName, { requestId, application: requestApplication(req.headers) }) : null;
|
|
439
449
|
let finishTerminalActivity = () => {};
|
|
440
|
-
if (trackRequest && !isDiscoveryRequest(req.method, pathname) && ["responses", "responses_compact", "messages", "image_mcp"].includes(routeName)) {
|
|
450
|
+
if (trackRequest && !isDiscoveryRequest(req.method, pathname) && ["responses", "responses_compact", "messages", "images", "image_mcp"].includes(routeName)) {
|
|
441
451
|
try {
|
|
442
452
|
const finish = options.terminalActivity?.beginRequest?.();
|
|
443
453
|
if (typeof finish === "function") finishTerminalActivity = finish;
|
|
@@ -451,7 +461,7 @@ export function createAdapterHandler(options = {}) {
|
|
|
451
461
|
if (trackRequest && (statusCode >= 400 || httpEvidence.model_error === true)) {
|
|
452
462
|
try { httpErrors.record(buildHttpFailureDetails({ ...httpEvidence, statusCode, route: routeName, requestId, model: context?.model || context?.requestedModel,
|
|
453
463
|
method: ["GET", "HEAD", "POST", "PUT", "DELETE", "OPTIONS", "PATCH"].includes(req.method) ? req.method : "OTHER",
|
|
454
|
-
target: ["/v1/responses", "/v1/responses/compact", "/anthropic/v1/messages", "/anthropic/v1/messages/count_tokens", "/anthropic/v1/models", "/mcp/image", "/.well-known/oauth-authorization-server", "/.well-known/oauth-protected-resource", "/.well-known/oauth-protected-resource/mcp/image"].includes(pathname) ? pathname : "unrecognized_path",
|
|
464
|
+
target: ["/v1/images/generations", "/v1/images/edits", "/v1/responses", "/v1/responses/compact", "/anthropic/v1/messages", "/anthropic/v1/messages/count_tokens", "/anthropic/v1/models", "/mcp/image", "/.well-known/oauth-authorization-server", "/.well-known/oauth-protected-resource", "/.well-known/oauth-protected-resource/mcp/image"].includes(pathname) ? pathname : "unrecognized_path",
|
|
455
465
|
request_options: context?.requestOptions, upstream_attempts: streamPerformance?.attemptCount?.() ?? context?.upstreamAttempts ?? 0,
|
|
456
466
|
attempt_timings: streamPerformance?.attemptTimings?.(),
|
|
457
467
|
requested_model: context?.requestedModel, provider: context?.provider, application: context?.application || requestApplication(req.headers),
|
|
@@ -21,9 +21,9 @@ export function inspectClaudeCapabilitySupport({ platform = process.platform, en
|
|
|
21
21
|
if (!appVersion && platform === "darwin") {
|
|
22
22
|
try { appVersion = /<key>CFBundleShortVersionString<\/key>\s*<string>([^<]+)<\/string>/.exec(readBoundedFileSync("/Applications/Claude.app/Contents/Info.plist", { maxBytes: 65536, encoding: "utf8" }))?.[1]; } catch { /* Unknown builds keep the conservative alias. */ }
|
|
23
23
|
}
|
|
24
|
-
// The 3.x App schema/host
|
|
24
|
+
// The 3.x and 4.x App schema/host were independently inspected. Other versions keep
|
|
25
25
|
// working catalogs without claiming adoption of undocumented host controls.
|
|
26
|
-
return { app_version: appVersion || null, app: /^
|
|
26
|
+
return { app_version: appVersion || null, app: /^[34]\./.test(appVersion || ""), code_version: codeVersion || null, code: /^2\.1\./.test(codeVersion || "") && Number(codeVersion.split(".")[2]) >= 293 };
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export function claudeSharedCapabilityPlan({ app = [], code = [], support = {} } = {}) {
|
|
@@ -9,6 +9,7 @@ import { atomicWriteFileSync } from "./atomic-file.mjs";
|
|
|
9
9
|
import { withFileLockSync } from "./lock.mjs";
|
|
10
10
|
import { m365Paths, readM365Json, writeM365Json } from "./m365-settings.mjs";
|
|
11
11
|
import { claudeClientModelId, claudeModelEntries } from "./claude-models.mjs";
|
|
12
|
+
import { claudeRouteAliases } from "./clients/claude-models.mjs";
|
|
12
13
|
|
|
13
14
|
export const M365_CLAUDE_PROFILE_ID = "00000000-0000-4000-8000-000000202700";
|
|
14
15
|
const M365_CLAUDE_PROFILE_NAME = "CCDX Microsoft 365";
|
|
@@ -266,12 +267,13 @@ export function configureClaudeClients({ baseUrl, apiKey, models, desktopInstall
|
|
|
266
267
|
return [typeof name === "string" ? claudeClientModelId(name) : "", index];
|
|
267
268
|
}));
|
|
268
269
|
const previousByName = new Map((Array.isArray(previousModels) ? previousModels : []).filter(model => model && typeof model === "object").map(model => [model.name, model]));
|
|
269
|
-
const
|
|
270
|
-
|
|
270
|
+
const previousNames = models.map(model => model.route_id ? claudeRouteAliases(model, model.route_id, true).slice(2) : []);
|
|
271
|
+
const desktopEntries = (desktopAliases ? claudeModelEntries(models, { desktopAliases }) : entries).map((entry, index) => {
|
|
272
|
+
const previous = previousByName.get(entry.name) || previousNames[index].map(name => previousByName.get(name)).find(Boolean);
|
|
271
273
|
return entry.supports1m ? { ...entry, prefer1m: typeof previous?.prefer1m === "boolean" ? previous.prefer1m : true } : entry;
|
|
272
274
|
});
|
|
273
275
|
for (let index = 0; index < models.length; index++) {
|
|
274
|
-
const old = order.get(claudeClientModelId(models[index].id));
|
|
276
|
+
const old = previousNames[index].map(name => order.get(name)).find(value => value !== undefined) ?? order.get(claudeClientModelId(models[index].id));
|
|
275
277
|
if (old !== undefined && !order.has(desktopEntries[index].name)) order.set(desktopEntries[index].name, old);
|
|
276
278
|
}
|
|
277
279
|
const orderedEntries = [...desktopEntries].sort((left, right) => defaultModel && (left.name === defaultModel || right.name === defaultModel)
|
package/src/cli-command-spec.mjs
CHANGED
|
@@ -132,17 +132,10 @@ export const MANAGED_COMMANDS = [
|
|
|
132
132
|
action: { setup: "on", remove: "off", repair: "fix" }[action] || action,
|
|
133
133
|
}))
|
|
134
134
|
),
|
|
135
|
-
|
|
136
|
-
command: "image",
|
|
137
|
-
action: "status",
|
|
138
|
-
outputFormat: flags.format,
|
|
139
|
-
})),
|
|
140
|
-
...["setup", "remove", "pause", "resume"].map(action =>
|
|
141
|
-
command(`app codex image ${action}`, "Manage the Codex image integration", {}, () => ({
|
|
142
|
-
command: "image",
|
|
143
|
-
action: { setup: "enable", remove: "disable" }[action] || action,
|
|
144
|
-
}))
|
|
135
|
+
...["status", "models", "enable", "disable"].map(action =>
|
|
136
|
+
command(`app codex image ${action}`, ({ status: "Show native image status", models: "List available GitHub image models", enable: "Enable native images", disable: "Disable native images" })[action], read, flags => ({ command: "image", action, outputFormat: flags.format }))
|
|
145
137
|
),
|
|
138
|
+
command("app codex image select", "Choose the native image model", { "--id": "value", ...read }, flags => ({ command: "image", action: "select", imageModel: flags.id, outputFormat: flags.format })),
|
|
146
139
|
command("app codex review status", "Show the Codex Auto-review selection", read),
|
|
147
140
|
command("app codex review select", "Choose the Codex Auto-review model", {}, () => ({
|
|
148
141
|
command: "auto-review-model",
|
|
@@ -260,7 +253,7 @@ export function parseManagedCommand(args) {
|
|
|
260
253
|
ids = pathMatch(definition.path, words);
|
|
261
254
|
if (values.login && !/^[a-z\d_-]{1,39}$/i.test(values.login))
|
|
262
255
|
throw new Error("Enter a GitHub account name");
|
|
263
|
-
if (values.id && !/^[a-f0-9]{64}$/.test(values.id))
|
|
256
|
+
if (words.join(" ") === "source m365 account" && values.id && !/^[a-f0-9]{64}$/.test(values.id))
|
|
264
257
|
throw new Error("Use an account ID from source m365 accounts");
|
|
265
258
|
if (
|
|
266
259
|
words.join(" ") === "doctor cache" &&
|