@canonmsg/codex-plugin 0.18.1 → 0.18.3
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/dist/host.d.ts +17 -0
- package/dist/host.js +15 -5
- package/package.json +1 -1
package/dist/host.d.ts
CHANGED
|
@@ -1,2 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/** GPT reasoning-effort levels, applied next turn via model_reasoning_effort. */
|
|
3
|
+
export declare const CODEX_EFFORT_OPTIONS: readonly [{
|
|
4
|
+
readonly value: "minimal";
|
|
5
|
+
readonly label: "Minimal";
|
|
6
|
+
}, {
|
|
7
|
+
readonly value: "low";
|
|
8
|
+
readonly label: "Low";
|
|
9
|
+
}, {
|
|
10
|
+
readonly value: "medium";
|
|
11
|
+
readonly label: "Medium";
|
|
12
|
+
}, {
|
|
13
|
+
readonly value: "high";
|
|
14
|
+
readonly label: "High";
|
|
15
|
+
}, {
|
|
16
|
+
readonly value: "xhigh";
|
|
17
|
+
readonly label: "Extra high";
|
|
18
|
+
}];
|
|
2
19
|
export declare function main(): Promise<void>;
|
package/dist/host.js
CHANGED
|
@@ -69,11 +69,12 @@ let workspaceOptions = [];
|
|
|
69
69
|
let workspaceRoots = [];
|
|
70
70
|
let workspaceRootMetadata = [];
|
|
71
71
|
/** GPT reasoning-effort levels, applied next turn via model_reasoning_effort. */
|
|
72
|
-
const CODEX_EFFORT_OPTIONS = [
|
|
72
|
+
export const CODEX_EFFORT_OPTIONS = [
|
|
73
73
|
{ value: 'minimal', label: 'Minimal' },
|
|
74
74
|
{ value: 'low', label: 'Low' },
|
|
75
75
|
{ value: 'medium', label: 'Medium' },
|
|
76
76
|
{ value: 'high', label: 'High' },
|
|
77
|
+
{ value: 'xhigh', label: 'Extra high' },
|
|
77
78
|
];
|
|
78
79
|
const CODEX_EFFORT_VALUES = new Set(CODEX_EFFORT_OPTIONS.map((option) => option.value));
|
|
79
80
|
function buildCodexRuntimeDescriptor(input) {
|
|
@@ -586,10 +587,14 @@ export async function main() {
|
|
|
586
587
|
if (session.state.permissionMode !== undefined) {
|
|
587
588
|
controlState.permissionMode = { value: session.state.permissionMode, source: 'applied', appliedAt };
|
|
588
589
|
}
|
|
590
|
+
if (session.state.effort !== undefined) {
|
|
591
|
+
controlState.effort = { value: session.state.effort, source: 'applied', appliedAt };
|
|
592
|
+
}
|
|
589
593
|
runtimeState.writeSessionState(session.conversationId, {
|
|
590
594
|
lastError: session.state.lastError,
|
|
591
595
|
model: session.state.model,
|
|
592
596
|
permissionMode: session.state.permissionMode,
|
|
597
|
+
effort: session.state.effort,
|
|
593
598
|
controlState,
|
|
594
599
|
cwd: session.cwd,
|
|
595
600
|
executionMode: session.environment.mode,
|
|
@@ -655,9 +660,6 @@ export async function main() {
|
|
|
655
660
|
if (text !== null) {
|
|
656
661
|
session.turnLiveText = text;
|
|
657
662
|
}
|
|
658
|
-
else if (status !== 'thinking' && session.turnLiveText === 'Thinking…') {
|
|
659
|
-
session.turnLiveText = '';
|
|
660
|
-
}
|
|
661
663
|
runtimeState.writeStreaming(session.conversationId, {
|
|
662
664
|
text: session.turnLiveText,
|
|
663
665
|
status,
|
|
@@ -1361,7 +1363,9 @@ export async function main() {
|
|
|
1361
1363
|
writeState(session);
|
|
1362
1364
|
writeTurn(session);
|
|
1363
1365
|
startVisibleWorkSignal(session);
|
|
1364
|
-
|
|
1366
|
+
// Status-only seed: 'thinking' renders as a working filament row on the
|
|
1367
|
+
// clients; text here would be bubbled as speech (v4 register rule).
|
|
1368
|
+
writeCodexStreaming(session, '', 'thinking');
|
|
1365
1369
|
try {
|
|
1366
1370
|
const modelGuard = buildCodexModelGuardMessage(session.state.model, codexCliStatus);
|
|
1367
1371
|
if (modelGuard) {
|
|
@@ -1657,6 +1661,10 @@ export async function main() {
|
|
|
1657
1661
|
}
|
|
1658
1662
|
if (control.permissionMode) {
|
|
1659
1663
|
console.error(`[canon-codex] [${conversationId.slice(0, 8)}] approval mode is session-creation-only; ignoring mid-session change request (${control.permissionMode})`);
|
|
1664
|
+
// Convergence contract: a consumed session control must always be
|
|
1665
|
+
// answered. Re-publish the currently applied state so clients settle on
|
|
1666
|
+
// the authoritative value instead of holding the composer until timeout.
|
|
1667
|
+
writeState(session);
|
|
1660
1668
|
}
|
|
1661
1669
|
if (control.effort) {
|
|
1662
1670
|
if (CODEX_EFFORT_VALUES.has(control.effort)) {
|
|
@@ -1667,6 +1675,8 @@ export async function main() {
|
|
|
1667
1675
|
}
|
|
1668
1676
|
else {
|
|
1669
1677
|
console.error(`[canon-codex] [${conversationId.slice(0, 8)}] Ignoring unknown effort level (${control.effort})`);
|
|
1678
|
+
// Same contract: ignored values still get an authoritative re-publish.
|
|
1679
|
+
writeState(session);
|
|
1670
1680
|
}
|
|
1671
1681
|
}
|
|
1672
1682
|
}
|