@ccpocket/bridge 1.39.1 → 1.41.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/dist/codex-process.d.ts +8 -0
- package/dist/codex-process.js +34 -2
- package/dist/codex-process.js.map +1 -1
- package/dist/parser.d.ts +5 -0
- package/dist/parser.js +9 -0
- package/dist/parser.js.map +1 -1
- package/dist/session.d.ts +2 -0
- package/dist/session.js +4 -0
- package/dist/session.js.map +1 -1
- package/dist/sessions-index.d.ts +1 -0
- package/dist/sessions-index.js +6 -0
- package/dist/sessions-index.js.map +1 -1
- package/dist/websocket.js +30 -5
- package/dist/websocket.js.map +1 -1
- package/package.json +1 -1
package/dist/websocket.js
CHANGED
|
@@ -31,6 +31,7 @@ const CLAUDE_MODELS = [
|
|
|
31
31
|
"claude-haiku-4-6",
|
|
32
32
|
];
|
|
33
33
|
const CODEX_MODELS = [
|
|
34
|
+
"gpt-5.5",
|
|
34
35
|
"gpt-5.4",
|
|
35
36
|
"gpt-5.4-mini",
|
|
36
37
|
"gpt-5.3-codex",
|
|
@@ -256,7 +257,7 @@ export class BridgeWebSocketServer {
|
|
|
256
257
|
};
|
|
257
258
|
}
|
|
258
259
|
buildSessionCreatedMessage(params) {
|
|
259
|
-
const { sessionId, provider, projectPath, session, permissionMode, executionMode, planMode, sandboxMode, slashCommands, skills, skillMetadata, apps, appMetadata, sourceSessionId, } = params;
|
|
260
|
+
const { sessionId, provider, projectPath, session, permissionMode, executionMode, planMode, approvalsReviewer, sandboxMode, slashCommands, skills, skillMetadata, apps, appMetadata, sourceSessionId, } = params;
|
|
260
261
|
const msg = {
|
|
261
262
|
type: "system",
|
|
262
263
|
subtype: "session_created",
|
|
@@ -268,6 +269,11 @@ export class BridgeWebSocketServer {
|
|
|
268
269
|
permissionMode: permissionMode,
|
|
269
270
|
}
|
|
270
271
|
: {}),
|
|
272
|
+
...((approvalsReviewer ?? session?.codexSettings?.approvalsReviewer)
|
|
273
|
+
? {
|
|
274
|
+
approvalsReviewer: approvalsReviewer ?? session?.codexSettings?.approvalsReviewer,
|
|
275
|
+
}
|
|
276
|
+
: {}),
|
|
271
277
|
...((executionMode ??
|
|
272
278
|
(session?.process instanceof SdkProcess
|
|
273
279
|
? session.process.permissionMode === "bypassPermissions"
|
|
@@ -540,6 +546,7 @@ export class BridgeWebSocketServer {
|
|
|
540
546
|
normalizeCodexApprovalPolicy(executionMode === "fullAccess"
|
|
541
547
|
? "never"
|
|
542
548
|
: "on-request"),
|
|
549
|
+
approvalsReviewer: msg.approvalsReviewer,
|
|
543
550
|
sandboxMode: sandboxModeToInternal(msg.sandboxMode),
|
|
544
551
|
model: msg.model,
|
|
545
552
|
modelReasoningEffort: msg.modelReasoningEffort ?? undefined,
|
|
@@ -572,6 +579,7 @@ export class BridgeWebSocketServer {
|
|
|
572
579
|
: executionMode,
|
|
573
580
|
planMode: provider === "claude" ? effectivePlanMode : planMode,
|
|
574
581
|
sandboxMode: msg.sandboxMode,
|
|
582
|
+
approvalsReviewer: createdSession?.codexSettings?.approvalsReviewer,
|
|
575
583
|
...(cached
|
|
576
584
|
? {
|
|
577
585
|
slashCommands: cached.slashCommands,
|
|
@@ -897,9 +905,13 @@ export class BridgeWebSocketServer {
|
|
|
897
905
|
: "default";
|
|
898
906
|
const currentApproval = session.process
|
|
899
907
|
.approvalPolicy;
|
|
908
|
+
const currentReviewer = session.process
|
|
909
|
+
.approvalsReviewer;
|
|
910
|
+
const newReviewer = msg.approvalsReviewer ?? currentReviewer;
|
|
900
911
|
const currentCollaboration = session.process
|
|
901
912
|
.collaborationMode;
|
|
902
913
|
if (newApproval === currentApproval &&
|
|
914
|
+
newReviewer === currentReviewer &&
|
|
903
915
|
newCollaboration === currentCollaboration) {
|
|
904
916
|
break; // No change needed
|
|
905
917
|
}
|
|
@@ -909,6 +921,9 @@ export class BridgeWebSocketServer {
|
|
|
909
921
|
if (newApproval !== currentApproval) {
|
|
910
922
|
process.setApprovalPolicy(newApproval);
|
|
911
923
|
}
|
|
924
|
+
if (newReviewer !== currentReviewer) {
|
|
925
|
+
process.setApprovalsReviewer(newReviewer);
|
|
926
|
+
}
|
|
912
927
|
if (newCollaboration !== currentCollaboration) {
|
|
913
928
|
process.setCollaborationMode(newCollaboration);
|
|
914
929
|
}
|
|
@@ -920,6 +935,7 @@ export class BridgeWebSocketServer {
|
|
|
920
935
|
permissionMode: legacyPermissionMode,
|
|
921
936
|
executionMode,
|
|
922
937
|
approvalPolicy: newApproval,
|
|
938
|
+
approvalsReviewer: newReviewer,
|
|
923
939
|
planMode,
|
|
924
940
|
});
|
|
925
941
|
this.broadcastSessionList();
|
|
@@ -927,12 +943,12 @@ export class BridgeWebSocketServer {
|
|
|
927
943
|
direction: "internal",
|
|
928
944
|
channel: "bridge",
|
|
929
945
|
type: "permission_mode_changed",
|
|
930
|
-
detail: `mode=${msg.mode} approval=${newApproval} collaboration=${newCollaboration} applied=in-place`,
|
|
946
|
+
detail: `mode=${msg.mode} approval=${newApproval} reviewer=${newReviewer} collaboration=${newCollaboration} applied=in-place`,
|
|
931
947
|
});
|
|
932
|
-
console.log(`[ws] set_permission_mode(codex): execution=${executionMode} plan=${planMode} → approval=${newApproval}, collaboration=${newCollaboration} (in-place)`);
|
|
948
|
+
console.log(`[ws] set_permission_mode(codex): execution=${executionMode} plan=${planMode} → approval=${newApproval}, reviewer=${newReviewer}, collaboration=${newCollaboration} (in-place)`);
|
|
933
949
|
break;
|
|
934
950
|
}
|
|
935
|
-
console.log(`[ws] set_permission_mode(codex): execution=${executionMode} plan=${planMode} → approval=${newApproval}, collaboration=${newCollaboration} (restart)`);
|
|
951
|
+
console.log(`[ws] set_permission_mode(codex): execution=${executionMode} plan=${planMode} → approval=${newApproval}, reviewer=${newReviewer}, collaboration=${newCollaboration} (restart)`);
|
|
936
952
|
const oldSessionId = session.id;
|
|
937
953
|
const threadId = session.claudeSessionId;
|
|
938
954
|
const projectPath = session.projectPath;
|
|
@@ -949,6 +965,7 @@ export class BridgeWebSocketServer {
|
|
|
949
965
|
? { existingWorktreePath: worktreePath, worktreeBranch }
|
|
950
966
|
: undefined, "codex", {
|
|
951
967
|
approvalPolicy: newApproval,
|
|
968
|
+
approvalsReviewer: newReviewer,
|
|
952
969
|
sandboxMode: oldSettings.sandboxMode,
|
|
953
970
|
model: oldSettings.model,
|
|
954
971
|
modelReasoningEffort: oldSettings.modelReasoningEffort,
|
|
@@ -970,6 +987,7 @@ export class BridgeWebSocketServer {
|
|
|
970
987
|
sandboxMode: oldSettings.sandboxMode
|
|
971
988
|
? sandboxModeToExternal(oldSettings.sandboxMode)
|
|
972
989
|
: undefined,
|
|
990
|
+
approvalsReviewer: newReviewer,
|
|
973
991
|
sourceSessionId: oldSessionId,
|
|
974
992
|
}));
|
|
975
993
|
this.broadcastSessionList();
|
|
@@ -1005,6 +1023,7 @@ export class BridgeWebSocketServer {
|
|
|
1005
1023
|
const newId = this.sessionManager.create(effectiveProjectPath, undefined, pastMessages, worktreeOpts, "codex", {
|
|
1006
1024
|
threadId,
|
|
1007
1025
|
approvalPolicy: newApproval,
|
|
1026
|
+
approvalsReviewer: newReviewer,
|
|
1008
1027
|
sandboxMode: oldSettings.sandboxMode,
|
|
1009
1028
|
model: oldSettings.model,
|
|
1010
1029
|
modelReasoningEffort: oldSettings.modelReasoningEffort,
|
|
@@ -1028,6 +1047,7 @@ export class BridgeWebSocketServer {
|
|
|
1028
1047
|
sandboxMode: oldSettings.sandboxMode
|
|
1029
1048
|
? sandboxModeToExternal(oldSettings.sandboxMode)
|
|
1030
1049
|
: undefined,
|
|
1050
|
+
approvalsReviewer: newReviewer,
|
|
1031
1051
|
sourceSessionId: oldSessionId,
|
|
1032
1052
|
}));
|
|
1033
1053
|
this.broadcastSessionList();
|
|
@@ -1037,7 +1057,7 @@ export class BridgeWebSocketServer {
|
|
|
1037
1057
|
direction: "internal",
|
|
1038
1058
|
channel: "bridge",
|
|
1039
1059
|
type: "permission_mode_changed",
|
|
1040
|
-
detail: `mode=${msg.mode} approval=${newApproval} collaboration=${newCollaboration} thread=${threadId} oldSession=${oldSessionId}`,
|
|
1060
|
+
detail: `mode=${msg.mode} approval=${newApproval} reviewer=${newReviewer} collaboration=${newCollaboration} thread=${threadId} oldSession=${oldSessionId}`,
|
|
1041
1061
|
});
|
|
1042
1062
|
console.log(`[ws] Permission mode change: created new session ${newId} (thread=${threadId}, mode=${msg.mode})`);
|
|
1043
1063
|
})
|
|
@@ -1674,6 +1694,7 @@ export class BridgeWebSocketServer {
|
|
|
1674
1694
|
profile: msg.profile,
|
|
1675
1695
|
approvalPolicy: codexApprovalPolicy ??
|
|
1676
1696
|
normalizeCodexApprovalPolicy(executionMode === "fullAccess" ? "never" : "on-request"),
|
|
1697
|
+
approvalsReviewer: msg.approvalsReviewer,
|
|
1677
1698
|
sandboxMode: sandboxModeToInternal(msg.sandboxMode),
|
|
1678
1699
|
model: msg.model,
|
|
1679
1700
|
modelReasoningEffort: msg.modelReasoningEffort ?? undefined,
|
|
@@ -1694,6 +1715,7 @@ export class BridgeWebSocketServer {
|
|
|
1694
1715
|
sandboxMode: createdSession?.codexSettings?.sandboxMode
|
|
1695
1716
|
? sandboxModeToExternal(createdSession.codexSettings.sandboxMode)
|
|
1696
1717
|
: undefined,
|
|
1718
|
+
approvalsReviewer: createdSession?.codexSettings?.approvalsReviewer,
|
|
1697
1719
|
permissionMode: legacyPermissionMode,
|
|
1698
1720
|
executionMode,
|
|
1699
1721
|
planMode,
|
|
@@ -3762,6 +3784,9 @@ export class BridgeWebSocketServer {
|
|
|
3762
3784
|
if (session.codexSettings.approvalPolicy !== undefined) {
|
|
3763
3785
|
msg.approvalPolicy = session.codexSettings.approvalPolicy;
|
|
3764
3786
|
}
|
|
3787
|
+
if (session.codexSettings.approvalsReviewer !== undefined) {
|
|
3788
|
+
msg.approvalsReviewer = session.codexSettings.approvalsReviewer;
|
|
3789
|
+
}
|
|
3765
3790
|
if (session.codexSettings.sandboxMode !== undefined) {
|
|
3766
3791
|
msg.sandboxMode = session.codexSettings.sandboxMode;
|
|
3767
3792
|
}
|