codex-copilot-dx 1.3.16 → 1.3.18
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 -0
- package/docs/ARCHITECTURE.md +14 -0
- package/docs/REFERENCE.md +16 -1
- package/package.json +1 -1
- package/src/atomic-file.mjs +42 -0
- package/src/bounded-file.mjs +16 -0
- package/src/claude-gateway.mjs +24 -4
- package/src/cli-command-spec.mjs +2 -2
- package/src/cli-image.mjs +6 -3
- package/src/codex-image-host.mjs +146 -33
- package/src/connection-runtime.mjs +4 -3
- package/src/conversation-source-guard.mjs +32 -28
- package/src/dashboard/console.js +2 -2
- package/src/dashboard/features.js +12 -1
- package/src/dashboard/flow.js +4 -0
- package/src/dashboard/index.html +3 -0
- package/src/dashboard/language.js +17 -0
- package/src/image-control.mjs +42 -0
- package/src/image-host-state.mjs +26 -0
- package/src/lock.mjs +6 -6
- package/src/management-routes.mjs +2 -0
- package/src/messages-history-transfer.mjs +34 -27
- package/src/models.mjs +3 -3
- package/src/native-images.mjs +9 -1
- package/src/providers/api.mjs +6 -3
- package/src/providers/m365-conversation-accounts.mjs +29 -16
- package/src/providers/m365.mjs +2 -2
- package/src/responses-byte-budget.mjs +2 -1
- package/src/responses-handler.mjs +4 -2
- package/src/service-control.mjs +9 -4
- package/src/stream-performance.mjs +6 -2
- package/src/terminal-console.mjs +3 -1
|
@@ -260,9 +260,13 @@ export function createStreamPerformanceMetrics({ now = () => performance.now(),
|
|
|
260
260
|
let stopReason = null;
|
|
261
261
|
const elapsed = (time) => time === null ? null : Number(Math.max(0, time - requestStartedAt).toFixed(1));
|
|
262
262
|
if (activeRequests.size < MAX_ACTIVE_REQUESTS) activeRequests.set(activeId, () => ({
|
|
263
|
-
request_id: safeRequestId, application: client, route: routeName, provider, model, phase,
|
|
263
|
+
request_id: safeRequestId, session_id: session ? session.slice(0, 16) : null, application: client, route: routeName, provider, model, phase,
|
|
264
264
|
started_at: at, elapsed_ms: elapsed(now()), first_output_ms: elapsed(firstOutputAt),
|
|
265
265
|
upstream_attempts: attempts, terminal_outcome: terminalOutcome,
|
|
266
|
+
previous_request: session ? (() => {
|
|
267
|
+
const previous = recentRequests.findLast(row => row.session_id === session.slice(0, 16) && row.application === client && row.provider === provider);
|
|
268
|
+
return previous ? { request_id: previous.request_id, stop_reason: previous.stop_reason || null, outcome: previous.outcome, elapsed_ms: previous.timings_ms.finished } : null;
|
|
269
|
+
})() : null,
|
|
266
270
|
attempts: attemptTimings.map(attempt => ({ ...attempt })),
|
|
267
271
|
}));
|
|
268
272
|
changes.changed();
|
|
@@ -404,7 +408,7 @@ export function createStreamPerformanceMetrics({ now = () => performance.now(),
|
|
|
404
408
|
finished: finishedAt, request_id: safeRequestId, outcome, context, cached_input_tokens: cachedInput });
|
|
405
409
|
// Only scalar, allowlisted metadata survives the request; never retain payloads.
|
|
406
410
|
recentRequests.push({
|
|
407
|
-
request_id: safeRequestId, application: client,
|
|
411
|
+
request_id: safeRequestId, ...(session ? { session_id: session.slice(0, 16) } : {}), application: client,
|
|
408
412
|
at, route: routeName, model, outcome, origin, phase,
|
|
409
413
|
...(["ccdx_model_not_selected", "ccdx_client_source_disabled"].includes(rejectionReason) ? { rejection_reason: rejectionReason } : {}),
|
|
410
414
|
...(stopReason ? { stop_reason: stopReason } : {}),
|
package/src/terminal-console.mjs
CHANGED
|
@@ -15,6 +15,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
|
|
|
15
15
|
snapshot = () => ({}), subscribe, preferences = () => ({}), baseUrl = "", verbose = false,
|
|
16
16
|
timers = { setTimeout, clearTimeout }, now = Date.now } = {}) {
|
|
17
17
|
let running = false, timer = null, lines = 0, frame = 0, lastRead = 0, data = {}, projection = projectTerminalState();
|
|
18
|
+
let imageRuntime = null;
|
|
18
19
|
let notices = 0, lastNotice = "", lastPrintedNotice = "", previous = [];
|
|
19
20
|
let content = [], dirty = true, readFailed = false, updatedAt = null, fits = true;
|
|
20
21
|
let current = { theme: DEFAULT_TERMINAL_ANIMATION_THEME, color_theme: "green", terminal_animation_enabled: true };
|
|
@@ -87,7 +88,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
|
|
|
87
88
|
const appSize = width < 64 ? 13 : 15, setupSize = Math.max(10, Math.min(20, width - appSize - 7));
|
|
88
89
|
const appRows = view.clients.map(client => `${clip(client.name, appSize - 1).padEnd(appSize)}${clip(client.setup, setupSize - 1).padEnd(setupSize)}${String(readFailed || client.active === null ? "—" : client.active).padStart(6)}`);
|
|
89
90
|
const issue = view.issue?.label;
|
|
90
|
-
const notice = notices ? `${notices} ${notices === 1 ? "notice" : "notices"}${issue ? ` · last model issue: ${issue}` : " · ccdx status --details"}` : issue ? `Last model issue: ${issue}` : "
|
|
91
|
+
const notice = notices ? `${notices} ${notices === 1 ? "notice" : "notices"}${issue ? ` · last model issue: ${issue}` : " · ccdx status --details"}` : issue ? `Last model issue: ${issue}` : `Image evidence: ${imageRuntime?.tool_registration === "observed" ? "tool registered" : imageRuntime?.connected ? "host connected" : "unconfirmed"} · ccdx app codex image repair`;
|
|
91
92
|
content = [clip(heading, width), clip(webAddress, width), sourceHeader,
|
|
92
93
|
...(view.sources ? wrap(view.sources.map(source => source.name).join(" · "), width) : []),
|
|
93
94
|
`${"App".padEnd(appSize)}${"Setup".padEnd(setupSize)}${"Active".padStart(6)}`, ...appRows,
|
|
@@ -144,6 +145,7 @@ export function createTerminalConsole({ output = process.stdout, errorOutput = p
|
|
|
144
145
|
});
|
|
145
146
|
},
|
|
146
147
|
pause() { running = false;unsubscribe?.();unsubscribe = null;if (timer) timers.clearTimeout(timer);timer = null;if (lines) output.write("\n");lines = 0;previous = [];dirty = true; },
|
|
148
|
+
image(value) { imageRuntime = value;dirty = true; },
|
|
147
149
|
beginRequest() { dirty = true;return () => { dirty = true; }; },
|
|
148
150
|
log(method, args) {
|
|
149
151
|
const message = redactDiagnosticText(format(...args));
|