@canonmsg/codex-plugin 0.18.1 → 0.18.2
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.js +13 -4
- package/package.json +1 -1
package/dist/host.js
CHANGED
|
@@ -586,10 +586,14 @@ export async function main() {
|
|
|
586
586
|
if (session.state.permissionMode !== undefined) {
|
|
587
587
|
controlState.permissionMode = { value: session.state.permissionMode, source: 'applied', appliedAt };
|
|
588
588
|
}
|
|
589
|
+
if (session.state.effort !== undefined) {
|
|
590
|
+
controlState.effort = { value: session.state.effort, source: 'applied', appliedAt };
|
|
591
|
+
}
|
|
589
592
|
runtimeState.writeSessionState(session.conversationId, {
|
|
590
593
|
lastError: session.state.lastError,
|
|
591
594
|
model: session.state.model,
|
|
592
595
|
permissionMode: session.state.permissionMode,
|
|
596
|
+
effort: session.state.effort,
|
|
593
597
|
controlState,
|
|
594
598
|
cwd: session.cwd,
|
|
595
599
|
executionMode: session.environment.mode,
|
|
@@ -655,9 +659,6 @@ export async function main() {
|
|
|
655
659
|
if (text !== null) {
|
|
656
660
|
session.turnLiveText = text;
|
|
657
661
|
}
|
|
658
|
-
else if (status !== 'thinking' && session.turnLiveText === 'Thinking…') {
|
|
659
|
-
session.turnLiveText = '';
|
|
660
|
-
}
|
|
661
662
|
runtimeState.writeStreaming(session.conversationId, {
|
|
662
663
|
text: session.turnLiveText,
|
|
663
664
|
status,
|
|
@@ -1361,7 +1362,9 @@ export async function main() {
|
|
|
1361
1362
|
writeState(session);
|
|
1362
1363
|
writeTurn(session);
|
|
1363
1364
|
startVisibleWorkSignal(session);
|
|
1364
|
-
|
|
1365
|
+
// Status-only seed: 'thinking' renders as a working filament row on the
|
|
1366
|
+
// clients; text here would be bubbled as speech (v4 register rule).
|
|
1367
|
+
writeCodexStreaming(session, '', 'thinking');
|
|
1365
1368
|
try {
|
|
1366
1369
|
const modelGuard = buildCodexModelGuardMessage(session.state.model, codexCliStatus);
|
|
1367
1370
|
if (modelGuard) {
|
|
@@ -1657,6 +1660,10 @@ export async function main() {
|
|
|
1657
1660
|
}
|
|
1658
1661
|
if (control.permissionMode) {
|
|
1659
1662
|
console.error(`[canon-codex] [${conversationId.slice(0, 8)}] approval mode is session-creation-only; ignoring mid-session change request (${control.permissionMode})`);
|
|
1663
|
+
// Convergence contract: a consumed session control must always be
|
|
1664
|
+
// answered. Re-publish the currently applied state so clients settle on
|
|
1665
|
+
// the authoritative value instead of holding the composer until timeout.
|
|
1666
|
+
writeState(session);
|
|
1660
1667
|
}
|
|
1661
1668
|
if (control.effort) {
|
|
1662
1669
|
if (CODEX_EFFORT_VALUES.has(control.effort)) {
|
|
@@ -1667,6 +1674,8 @@ export async function main() {
|
|
|
1667
1674
|
}
|
|
1668
1675
|
else {
|
|
1669
1676
|
console.error(`[canon-codex] [${conversationId.slice(0, 8)}] Ignoring unknown effort level (${control.effort})`);
|
|
1677
|
+
// Same contract: ignored values still get an authoritative re-publish.
|
|
1678
|
+
writeState(session);
|
|
1670
1679
|
}
|
|
1671
1680
|
}
|
|
1672
1681
|
}
|