@codexhost/cli-darwin-x64 0.6.2 → 0.7.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/README.md +1 -1
- package/THIRD_PARTY_NOTICES.txt +4 -0
- package/app/codexhost-distribution.json +1 -1
- package/app/desktop-controller.mjs +3 -1
- package/app/host-runtime.mjs +665 -356
- package/app/plugins/antigravity/plugin.mjs +45 -198
- package/app/plugins/claude-code/plugin.mjs +223 -49
- package/app/plugins/codebuddy/assets/icon.svg +1 -0
- package/app/plugins/codebuddy/manifest.json +13 -0
- package/app/plugins/codebuddy/plugin.mjs +23045 -0
- package/app/plugins/cursor-cli/assets/icon.svg +1 -0
- package/app/plugins/cursor-cli/manifest.json +13 -0
- package/app/plugins/cursor-cli/plugin.mjs +22579 -0
- package/app/plugins/enabled.json +3 -1
- package/app/plugins/pi/plugin.mjs +0 -12
- package/app/renderer-extension.js +183 -51
- package/bin/codexhost +0 -0
- package/libexec/codexhost-shim +0 -0
- package/libexec/codexhost-updater +0 -0
- package/licenses/Agent-Client-Protocol-SDK-LICENSE.txt +191 -0
- package/package.json +1 -1
|
@@ -16,7 +16,9 @@
|
|
|
16
16
|
"grok",
|
|
17
17
|
"omp",
|
|
18
18
|
"antigravity",
|
|
19
|
-
"kiro-cli"
|
|
19
|
+
"kiro-cli",
|
|
20
|
+
"codebuddy",
|
|
21
|
+
"cursor-cli"
|
|
20
22
|
];
|
|
21
23
|
var DEFAULT_RENDERER_AGENTS = KNOWN_RENDERER_AGENTS;
|
|
22
24
|
function defaultIdFactory(sequence) {
|
|
@@ -126,13 +128,25 @@
|
|
|
126
128
|
if (agent === "codex" && codexAccountId) state.codexAccountId = codexAccountId;
|
|
127
129
|
else delete state.codexAccountId;
|
|
128
130
|
if (agent === "pi" && model) state.piModel = model;
|
|
131
|
+
else if (agent === "pi") delete state.piModel;
|
|
129
132
|
if (agent === "claude-code" && model) state.claudeModel = model;
|
|
133
|
+
else if (agent === "claude-code") delete state.claudeModel;
|
|
130
134
|
if (agent === "deepseek-harness" && model) state.deepSeekHarnessModel = model;
|
|
135
|
+
else if (agent === "deepseek-harness") delete state.deepSeekHarnessModel;
|
|
131
136
|
if (agent === "opencode" && model) state.openCodeModel = model;
|
|
137
|
+
else if (agent === "opencode") delete state.openCodeModel;
|
|
132
138
|
if (agent === "grok" && model) state.grokModel = model;
|
|
139
|
+
else if (agent === "grok") delete state.grokModel;
|
|
133
140
|
if (agent === "omp" && model) state.ompModel = model;
|
|
141
|
+
else if (agent === "omp") delete state.ompModel;
|
|
134
142
|
if (agent === "antigravity" && model) state.antigravityModel = model;
|
|
143
|
+
else if (agent === "antigravity") delete state.antigravityModel;
|
|
135
144
|
if (agent === "kiro-cli" && model) state.kiroCliModel = model;
|
|
145
|
+
else if (agent === "kiro-cli") delete state.kiroCliModel;
|
|
146
|
+
if (agent === "codebuddy" && model) state.codeBuddyModel = model;
|
|
147
|
+
else if (agent === "codebuddy") delete state.codeBuddyModel;
|
|
148
|
+
if (agent === "cursor-cli" && model) state.cursorCliModel = model;
|
|
149
|
+
else if (agent === "cursor-cli") delete state.cursorCliModel;
|
|
136
150
|
if (agent === "pi" && thinkingOptionId) state.piThinkingOptionId = thinkingOptionId;
|
|
137
151
|
else if (agent === "pi") delete state.piThinkingOptionId;
|
|
138
152
|
if (agent === "claude-code" && thinkingOptionId) {
|
|
@@ -151,6 +165,9 @@
|
|
|
151
165
|
if (agent === "kiro-cli" && thinkingOptionId) {
|
|
152
166
|
state.kiroCliThinkingOptionId = thinkingOptionId;
|
|
153
167
|
} else if (agent === "kiro-cli") delete state.kiroCliThinkingOptionId;
|
|
168
|
+
if (agent === "codebuddy" && thinkingOptionId) {
|
|
169
|
+
state.codeBuddyThinkingOptionId = thinkingOptionId;
|
|
170
|
+
} else if (agent === "codebuddy") delete state.codeBuddyThinkingOptionId;
|
|
154
171
|
if (agent !== "codex") {
|
|
155
172
|
const permissionModeByAgent = {};
|
|
156
173
|
for (const candidate of [
|
|
@@ -161,7 +178,9 @@
|
|
|
161
178
|
"grok",
|
|
162
179
|
"omp",
|
|
163
180
|
"antigravity",
|
|
164
|
-
"kiro-cli"
|
|
181
|
+
"kiro-cli",
|
|
182
|
+
"codebuddy",
|
|
183
|
+
"cursor-cli"
|
|
165
184
|
]) {
|
|
166
185
|
const current = state.permissionModeByAgent?.[candidate];
|
|
167
186
|
if (candidate !== agent && current) permissionModeByAgent[candidate] = current;
|
|
@@ -185,6 +204,8 @@
|
|
|
185
204
|
if (agent === "omp") return state.ompModel;
|
|
186
205
|
if (agent === "antigravity") return state.antigravityModel;
|
|
187
206
|
if (agent === "kiro-cli") return state.kiroCliModel;
|
|
207
|
+
if (agent === "codebuddy") return state.codeBuddyModel;
|
|
208
|
+
if (agent === "cursor-cli") return state.cursorCliModel;
|
|
188
209
|
return void 0;
|
|
189
210
|
}
|
|
190
211
|
thinkingOptionForAgent(composer, agent) {
|
|
@@ -196,6 +217,7 @@
|
|
|
196
217
|
if (agent === "omp") return state.ompThinkingOptionId;
|
|
197
218
|
if (agent === "antigravity") return state.antigravityThinkingOptionId;
|
|
198
219
|
if (agent === "kiro-cli") return state.kiroCliThinkingOptionId;
|
|
220
|
+
if (agent === "codebuddy") return state.codeBuddyThinkingOptionId;
|
|
199
221
|
return void 0;
|
|
200
222
|
}
|
|
201
223
|
permissionModeForAgent(composer, agent) {
|
|
@@ -219,6 +241,8 @@
|
|
|
219
241
|
else if (agent === "omp") state.ompModel = model;
|
|
220
242
|
else if (agent === "antigravity") state.antigravityModel = model;
|
|
221
243
|
else if (agent === "kiro-cli") state.kiroCliModel = model;
|
|
244
|
+
else if (agent === "codebuddy") state.codeBuddyModel = model;
|
|
245
|
+
else if (agent === "cursor-cli") state.cursorCliModel = model;
|
|
222
246
|
return state;
|
|
223
247
|
}
|
|
224
248
|
setPiConfiguration(composer, model, thinkingOptionId) {
|
|
@@ -259,6 +283,10 @@
|
|
|
259
283
|
state.kiroCliThinkingOptionId = thinkingOptionId;
|
|
260
284
|
} else if (agent === "kiro-cli") {
|
|
261
285
|
delete state.kiroCliThinkingOptionId;
|
|
286
|
+
} else if (agent === "codebuddy" && thinkingOptionId) {
|
|
287
|
+
state.codeBuddyThinkingOptionId = thinkingOptionId;
|
|
288
|
+
} else if (agent === "codebuddy") {
|
|
289
|
+
delete state.codeBuddyThinkingOptionId;
|
|
262
290
|
}
|
|
263
291
|
return state;
|
|
264
292
|
}
|
|
@@ -15841,6 +15869,12 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15841
15869
|
// src/assets/kiro-agent.svg
|
|
15842
15870
|
var kiro_agent_default = 'data:image/svg+xml,<svg width="1200" height="1200" viewBox="0 0 1200 1200" fill="none" xmlns="http://www.w3.org/2000/svg">%0A<rect width="1200" height="1200" rx="260" fill="%239046FF"/>%0A<mask id="mask0_1106_4856" style="mask-type:luminance" maskUnits="userSpaceOnUse" x="272" y="202" width="655" height="796">%0A<path d="M926.578 202.793H272.637V997.857H926.578V202.793Z" fill="white"/>%0A</mask>%0A<g mask="url(%23mask0_1106_4856)">%0A<path d="M398.554 818.914C316.315 1001.03 491.477 1046.74 620.672 940.156C658.687 1059.66 801.052 970.473 852.234 877.795C964.787 673.567 919.318 465.357 907.64 422.374C827.637 129.443 427.623 128.946 358.8 423.865C342.651 475.544 342.402 534.18 333.458 595.051C328.986 625.86 325.507 645.488 313.83 677.785C306.873 696.424 297.68 712.819 282.773 740.645C259.915 783.881 269.604 867.113 387.87 823.883L399.051 818.914H398.554Z" fill="white"/>%0A<path d="M636.123 549.353C603.328 549.353 598.359 510.097 598.359 486.742C598.359 465.623 602.086 448.977 609.293 438.293C615.504 428.852 624.697 424.131 636.123 424.131C647.555 424.131 657.492 428.852 664.447 438.541C672.398 449.474 676.623 466.12 676.623 486.742C676.623 525.998 661.471 549.353 636.375 549.353H636.123Z" fill="black"/>%0A<path d="M771.24 549.353C738.445 549.353 733.477 510.097 733.477 486.742C733.477 465.623 737.203 448.977 744.41 438.293C750.621 428.852 759.814 424.131 771.24 424.131C782.672 424.131 792.609 428.852 799.564 438.541C807.516 449.474 811.74 466.12 811.74 486.742C811.74 525.998 796.588 549.353 771.492 549.353H771.24Z" fill="black"/>%0A</g>%0A</svg>%0A';
|
|
15843
15871
|
|
|
15872
|
+
// src/assets/codebuddy-agent.svg
|
|
15873
|
+
var codebuddy_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40" fill="none"><g clip-path="url(%23clip0_4958_10776)"><rect x="-0.00146484" width="40" height="40" rx="8.63158" fill="%236C4DFF"></rect><path d="M30.5918 3.12856C30.984 2.77679 31.0078 2.7632 31.2955 2.74593C31.7615 2.71193 32.1882 2.93586 32.9147 3.59728C34.6119 5.13959 36.9755 8.30995 38.4449 11.0177L39.0125 12.0691L39.8143 12.4677C40.5885 12.8589 41.8587 13.6611 42.389 14.0913C42.6286 14.2894 42.6626 14.2934 42.912 14.1964C44.0375 13.7583 45.6494 14.3393 47.0714 15.7033C48.3516 16.9303 49.5781 19.0269 50.0478 20.7767C50.1164 21.0582 50.2074 21.6636 50.2405 22.1144C50.3477 23.6973 49.84 24.9617 48.8624 25.5341C48.6628 25.6493 48.6492 25.6807 48.6548 26.1783C48.6998 28.5492 48.0606 30.9165 46.7768 33.2244C45.3276 35.8156 42.7467 38.496 39.2544 41.0214C37.3789 42.3862 32.9421 44.9717 30.9361 45.8792C26.1304 48.0428 22.278 48.8718 18.9316 48.4618C16.9356 48.22 14.6761 47.4417 13.3392 46.5373C12.9873 46.294 12.9318 46.2791 12.6629 46.3561C11.2318 46.7671 9.35752 45.9219 7.76528 44.1544C7.13027 43.448 6.10508 41.7136 5.77273 40.7853C5.00409 38.6128 5.15721 36.6516 6.18105 35.4808C6.44522 35.1797 6.4538 35.1667 6.39603 34.6598C6.30065 33.8298 6.25703 32.6017 6.30061 31.809L6.33535 31.0683L5.22371 29.1019C3.50212 26.0386 2.40857 23.4663 1.98661 21.501C1.76389 20.4233 1.77734 19.9446 2.05091 19.5908C2.21741 19.3773 2.76347 19.1568 3.42155 19.0352C5.07869 18.7442 8.69327 19.0065 12.7142 19.7165L13.1316 19.789L14.0497 18.977C15.5733 17.6274 16.5858 16.8705 18.4518 15.707C20.3967 14.4901 22.5922 13.4895 25.064 12.6968L25.8564 12.4423L26.2926 11.2974C27.8535 7.17701 29.452 4.13917 30.5918 3.12856ZM17.5169 24.2439C15.7528 25.2625 14.8705 25.7716 14.2223 26.3423C11.5975 28.6536 10.6172 32.3151 11.7346 35.6292C12.0106 36.4475 12.5193 37.3301 13.5378 39.0941C14.5563 40.8582 15.0662 41.7401 15.637 42.3882C17.9483 45.0128 21.6091 45.9938 24.923 44.8764C25.7414 44.6004 26.6233 44.0909 28.3875 43.0724L38.5362 37.213C40.3004 36.1945 41.1826 35.6854 41.8308 35.1147C44.4555 32.8034 45.4363 29.1426 44.319 25.8286C44.043 25.0103 43.5343 24.1277 42.5158 22.3637C41.4974 20.5997 40.9873 19.7177 40.4166 19.0696C38.1053 16.4448 34.4441 15.4631 31.1301 16.5806C30.3118 16.8565 29.4297 17.3661 27.6656 18.3846L17.5169 24.2439Z" fill="white"></path><rect x="18.4944" y="31.334" width="4.00904" height="8.32646" rx="2.00452" transform="rotate(-30 18.4944 31.334)" fill="white"></rect><rect x="29.311" y="25.0898" width="4.00904" height="8.32646" rx="2.00452" transform="rotate(-30 29.311 25.0898)" fill="white"></rect></g><defs><clipPath id="clip0_4958_10776"><rect x="-0.00146484" width="40" height="40" rx="8.63158" fill="white"></rect></clipPath></defs></svg>';
|
|
15874
|
+
|
|
15875
|
+
// src/assets/cursor-agent.svg
|
|
15876
|
+
var cursor_agent_default = 'data:image/svg+xml,<svg fill="none" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><path d="m512 325.5c0 7.124 0 14.24-.041 21.364-.034 5.999-.103 11.998-.268 17.99-.356 13.068-1.124 26.245-3.448 39.169-2.359 13.109-6.205 25.306-12.266 37.222-5.958 11.703-13.746 22.419-23.029 31.709-9.29 9.29-20 17.072-31.71 23.03-11.909 6.061-24.113 9.907-37.222 12.266-12.923 2.324-26.101 3.092-39.169 3.448-5.999.165-11.991.233-17.99.268-7.123.048-14.24.041-21.364.041h-139c-7.124 0-14.24 0-21.364-.041-5.999-.035-11.998-.103-17.99-.268-13.068-.356-26.245-1.124-39.169-3.448-13.109-2.359-25.306-6.205-37.2219-12.266-11.7033-5.958-22.4194-13.746-31.7095-23.03-9.29-9.29-17.0717-19.999-23.0296-31.709-6.0608-11.909-9.90707-24.113-12.26557-37.222-2.32422-12.924-3.0921-26.101-3.448618-39.169-.164546-5.999-.2331071-11.991-.2673876-17.99-.0274244-7.124-.0274244-14.24-.0274244-21.364v-139c0-7.124 0-14.24.0411366-21.364.0342805-5.999.1028414-11.998.2673884-17.99.356517-13.068 1.124405-26.245 3.448615-39.169 2.3585-13.1091 6.20478-25.3061 12.26556-37.222 5.958-11.7034 13.7465-22.4195 23.0297-31.7095 9.29-9.29 19.9992-17.0717 31.7094-23.0296 11.9091-6.06084 24.1129-9.90711 37.2222-12.26561 12.923-2.32422 26.101-3.092104 39.169-3.448622 5.999-.164546 11.991-.233107 17.99-.2673875 7.117-.0342805 14.233-.0342805 21.357-.0342805h139c7.124 0 14.24 0 21.364.0411366 5.999.0342805 11.998.1028414 17.99.2673884 13.068.356517 26.245 1.124405 39.169 3.448615 13.109 2.3585 25.306 6.20478 37.222 12.26556 11.703 5.958 22.419 13.7465 31.709 23.0297 9.29 9.29 17.072 19.9992 23.03 31.7094 6.061 11.9091 9.907 24.1129 12.266 37.2222 2.324 12.923 3.092 26.101 3.448 39.169.165 5.999.233 11.991.268 17.99.048 7.123.041 14.24.041 21.364v139z" fill="%2314120b"/><path d="m186.5 4h139c7.125 0 14.231-.00004 21.341.04102 5.985.0342 11.952.10221 17.903.26562h.001c13.003.35475 25.943 1.11709 38.569 3.3877 12.775 2.29827 24.592 6.03146 36.118 11.89356v-.001c10.974 5.5867 21.052 12.8384 29.848 21.457l.847.8379c8.993 8.993 16.525 19.3594 22.292 30.6934v.001c5.678 11.1575 9.36 22.6023 11.674 34.9208l.219 1.195c2.129 11.837 2.932 23.95 3.316 36.132l.072 2.438c.164 5.958.232 11.919.266 17.904v.004c.048 7.107.041 14.207.041 21.337v129.344l-.007-.007v9.656c0 7.125 0 14.231-.041 21.341-.034 5.985-.102 11.952-.266 17.903v.001c-.354 13.003-1.117 25.943-3.387 38.569-2.227 12.376-5.8 23.853-11.351 35.037l-.543 1.08c-5.766 11.327-13.306 21.701-22.293 30.695-8.993 8.993-19.361 16.526-30.695 22.293-11.518 5.861-23.342 9.595-36.116 11.893-11.837 2.129-23.95 2.932-36.132 3.316l-2.438.072c-5.958.164-11.919.232-17.904.266h-.004c-7.107.048-14.207.041-21.337.041h-139c-7.125 0-14.231 0-21.341-.041-5.985-.034-11.952-.102-17.903-.266h-.001c-13.003-.355-25.944-1.117-38.57-3.388-12.7742-2.298-24.5914-6.031-36.1165-11.893h.001c-10.974-5.587-21.0534-12.837-29.8496-21.456l-.8467-.838c-8.7118-8.712-16.0531-18.713-21.7461-29.634l-.5459-1.06-.5439-1.081c-5.371-10.816-8.8905-21.919-11.12991-33.84l-.21973-1.196c-2.27061-12.626-3.03294-25.566-3.38769-38.569v-.001c-.16341-5.958-.23142-11.918-.26563-17.903-.02736-7.112-.02734-14.219-.02734-21.341v-139c0-7.125-.00004-14.231.04102-21.341.0342-5.985.10221-11.952.26562-17.903v-.001c.35476-13.003 1.117-25.944 3.3877-38.57 2.29828-12.7744 6.03156-24.5916 11.89356-36.1166l-.001-.001c5.7666-11.327 13.3073-21.6999 22.294-30.6934 8.9933-8.9933 19.3607-16.5261 30.6953-22.2929 11.5173-5.8615 23.3406-9.59619 36.1148-11.89458 11.837-2.12877 23.951-2.93016 36.133-3.31445l2.438-.07227c5.958-.16342 11.919-.23142 17.904-.26562l-.001-.00098c7.104-.03421 14.211-.0332 21.335-.0332z" stroke="%23edecec" stroke-opacity=".2" stroke-width="8"/><path d="m415.035 156.35-151.503-87.4695c-4.865-2.8094-10.868-2.8094-15.733 0l-151.4969 87.4695c-4.0897 2.362-6.6146 6.729-6.6146 11.459v176.383c0 4.73 2.5249 9.097 6.6146 11.458l151.5039 87.47c4.865 2.809 10.868 2.809 15.733 0l151.504-87.47c4.089-2.361 6.614-6.728 6.614-11.458v-176.383c0-4.73-2.525-9.097-6.614-11.459zm-9.516 18.528-146.255 253.32c-.988 1.707-3.599 1.01-3.599-.967v-165.872c0-3.314-1.771-6.379-4.644-8.044l-143.645-82.932c-1.707-.988-1.01-3.599.968-3.599h292.509c4.154 0 6.75 4.503 4.673 8.101h-.007z" fill="%23edecec"/></svg>';
|
|
15877
|
+
|
|
15844
15878
|
// src/assets/omp-agent.svg
|
|
15845
15879
|
var omp_agent_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">%0A <defs>%0A <linearGradient id="omp-gradient" x1="0" y1="0" x2="1" y2="1">%0A <stop offset="0" stop-color="%23ed4abf" />%0A <stop offset=".5" stop-color="%239b4dff" />%0A <stop offset="1" stop-color="%235ad8e6" />%0A </linearGradient>%0A </defs>%0A <path%0A fill="url(%23omp-gradient)"%0A transform="translate(-14.4 -20.2) scale(1.45)"%0A d="M14 16h36v8H40v32h-8V24h-6v22h-8V24h-4z"%0A />%0A</svg>%0A';
|
|
15846
15880
|
|
|
@@ -15857,7 +15891,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15857
15891
|
grok: "Grok",
|
|
15858
15892
|
omp: "Oh My Pi",
|
|
15859
15893
|
antigravity: "Antigravity CLI",
|
|
15860
|
-
"kiro-cli": "Kiro CLI"
|
|
15894
|
+
"kiro-cli": "Kiro CLI",
|
|
15895
|
+
codebuddy: "CodeBuddy",
|
|
15896
|
+
"cursor-cli": "Cursor CLI (Experimental)"
|
|
15861
15897
|
};
|
|
15862
15898
|
var PI_PATHS = [
|
|
15863
15899
|
{
|
|
@@ -15933,9 +15969,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
15933
15969
|
image.style.flex = "none";
|
|
15934
15970
|
return image;
|
|
15935
15971
|
}
|
|
15936
|
-
if (agent === "antigravity" || agent === "kiro-cli") {
|
|
15972
|
+
if (agent === "antigravity" || agent === "kiro-cli" || agent === "codebuddy" || agent === "cursor-cli") {
|
|
15937
15973
|
const image = ownerDocument.createElement("img");
|
|
15938
|
-
image.src = agent === "kiro-cli" ? kiro_agent_default : antigravity_agent_default;
|
|
15974
|
+
image.src = agent === "codebuddy" ? codebuddy_agent_default : agent === "cursor-cli" ? cursor_agent_default : agent === "kiro-cli" ? kiro_agent_default : antigravity_agent_default;
|
|
15939
15975
|
image.alt = "";
|
|
15940
15976
|
image.draggable = false;
|
|
15941
15977
|
image.style.width = `${size}px`;
|
|
@@ -16591,7 +16627,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
16591
16627
|
grok: "https://grok.com/",
|
|
16592
16628
|
omp: "https://github.com/can1357/oh-my-pi",
|
|
16593
16629
|
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
16594
|
-
"kiro-cli": "https://kiro.dev/docs/cli/"
|
|
16630
|
+
"kiro-cli": "https://kiro.dev/docs/cli/",
|
|
16631
|
+
codebuddy: "https://www.codebuddy.ai/docs/zh/cli/overview",
|
|
16632
|
+
"cursor-cli": "https://cursor.com/docs/cli/installation"
|
|
16595
16633
|
});
|
|
16596
16634
|
function connectionStatusLabel(availability, messages, hasError = false) {
|
|
16597
16635
|
if (hasError && availability !== "notInstalled") return messages.connectionStatusError;
|
|
@@ -17827,7 +17865,9 @@ ${error51.stderrTail}`] : []
|
|
|
17827
17865
|
grok: "https://grok.com/",
|
|
17828
17866
|
omp: "https://github.com/can1357/oh-my-pi",
|
|
17829
17867
|
antigravity: "https://antigravity.google/product/antigravity-cli",
|
|
17830
|
-
"kiro-cli": "https://kiro.dev/docs/cli/"
|
|
17868
|
+
"kiro-cli": "https://kiro.dev/docs/cli/",
|
|
17869
|
+
codebuddy: "https://www.codebuddy.ai/docs/zh/cli/overview",
|
|
17870
|
+
"cursor-cli": "https://cursor.com/docs/cli/installation"
|
|
17831
17871
|
};
|
|
17832
17872
|
var CONTROL_ATTRIBUTE = "data-codexhost-agent-control";
|
|
17833
17873
|
var AGENT_MENU_WIDTH = 224;
|
|
@@ -19114,7 +19154,14 @@ ${error51.stderrTail}`] : []
|
|
|
19114
19154
|
["Workspace write", "\u5DE5\u4F5C\u533A\u5199\u5165"],
|
|
19115
19155
|
["Full access (dangerous)", "\u5B8C\u5168\u8BBF\u95EE\uFF08\u5371\u9669\uFF09"],
|
|
19116
19156
|
["Configured permissions", "\u4F7F\u7528\u5DF2\u914D\u7F6E\u6743\u9650"],
|
|
19117
|
-
["Skip permissions", "\u8DF3\u8FC7\u6743\u9650\u68C0\u67E5"]
|
|
19157
|
+
["Skip permissions", "\u8DF3\u8FC7\u6743\u9650\u68C0\u67E5"],
|
|
19158
|
+
["Always Ask", "\u59CB\u7EC8\u8BE2\u95EE"],
|
|
19159
|
+
["Accept Edits", "\u63A5\u53D7\u7F16\u8F91"],
|
|
19160
|
+
["Plan", "\u89C4\u5212\u6A21\u5F0F"],
|
|
19161
|
+
["Don't Ask", "\u4E0D\u8BE2\u95EE"],
|
|
19162
|
+
["Bypass Permissions", "\u7ED5\u8FC7\u6743\u9650"],
|
|
19163
|
+
["Full Access", "\u5B8C\u5168\u8BBF\u95EE"],
|
|
19164
|
+
["Delegate", "\u7531\u7236\u4F1A\u8BDD\u7BA1\u7406"]
|
|
19118
19165
|
]);
|
|
19119
19166
|
var CHINESE_PERMISSION_MODE_DESCRIPTIONS = /* @__PURE__ */ new Map([
|
|
19120
19167
|
[
|
|
@@ -19151,7 +19198,36 @@ ${error51.stderrTail}`] : []
|
|
|
19151
19198
|
"Use Antigravity CLI permission rules; headless prompts are denied safely.",
|
|
19152
19199
|
"\u4F7F\u7528 Antigravity CLI \u6743\u9650\u89C4\u5219\uFF1B\u65E0\u754C\u9762\u8FD0\u884C\u65F6\u5B89\u5168\u62D2\u7EDD\u9700\u8981\u4EA4\u4E92\u786E\u8BA4\u7684\u8BF7\u6C42\u3002"
|
|
19153
19200
|
],
|
|
19154
|
-
["Auto-approve every Antigravity CLI tool action.", "\u81EA\u52A8\u6279\u51C6\u6240\u6709 Antigravity CLI \u5DE5\u5177\u64CD\u4F5C\u3002"]
|
|
19201
|
+
["Auto-approve every Antigravity CLI tool action.", "\u81EA\u52A8\u6279\u51C6\u6240\u6709 Antigravity CLI \u5DE5\u5177\u64CD\u4F5C\u3002"],
|
|
19202
|
+
["Prompts for permission on first use of each tool", "\u9996\u6B21\u4F7F\u7528\u6BCF\u79CD\u5DE5\u5177\u65F6\u8BF7\u6C42\u6743\u9650\u3002"],
|
|
19203
|
+
[
|
|
19204
|
+
"Automatically accepts file edit permissions for the session",
|
|
19205
|
+
"\u81EA\u52A8\u63A5\u53D7\u672C\u4F1A\u8BDD\u4E2D\u7684\u6587\u4EF6\u7F16\u8F91\u6743\u9650\u3002"
|
|
19206
|
+
],
|
|
19207
|
+
[
|
|
19208
|
+
"Agent can analyze but not modify files or execute commands",
|
|
19209
|
+
"Agent \u53EF\u4EE5\u5206\u6790\uFF0C\u4F46\u4E0D\u80FD\u4FEE\u6539\u6587\u4EF6\u6216\u6267\u884C\u547D\u4EE4\u3002"
|
|
19210
|
+
],
|
|
19211
|
+
[
|
|
19212
|
+
"An AI classifier reviews actions that would normally prompt: safe ones are auto-approved, risky ones are denied. If the classifier is unavailable, the action falls back to a prompt (or is denied when prompts cannot be shown)",
|
|
19213
|
+
"\u7531 AI \u5206\u7C7B\u5668\u8BC4\u4F30\u539F\u672C\u9700\u8981\u8BE2\u95EE\u7684\u64CD\u4F5C\uFF1A\u5B89\u5168\u64CD\u4F5C\u81EA\u52A8\u6279\u51C6\uFF0C\u98CE\u9669\u64CD\u4F5C\u62D2\u7EDD\u3002\u5206\u7C7B\u5668\u4E0D\u53EF\u7528\u65F6\u6539\u4E3A\u8BE2\u95EE\uFF1B\u65E0\u6CD5\u663E\u793A\u8BE2\u95EE\u65F6\u62D2\u7EDD\u3002"
|
|
19214
|
+
],
|
|
19215
|
+
[
|
|
19216
|
+
"Does not show permission prompts; pre-approved and safe read-only actions run, everything else that would prompt is denied",
|
|
19217
|
+
"\u4E0D\u663E\u793A\u6743\u9650\u8BE2\u95EE\uFF1B\u5DF2\u83B7\u6279\u51C6\u548C\u5B89\u5168\u7684\u53EA\u8BFB\u64CD\u4F5C\u53EF\u4EE5\u6267\u884C\uFF0C\u5176\u4F59\u539F\u672C\u9700\u8981\u8BE2\u95EE\u7684\u64CD\u4F5C\u4F1A\u88AB\u62D2\u7EDD\u3002"
|
|
19218
|
+
],
|
|
19219
|
+
["Skips all permission prompts", "\u8DF3\u8FC7\u5E38\u89C4\u6743\u9650\u8BE2\u95EE\u3002"],
|
|
19220
|
+
[
|
|
19221
|
+
"Skips ALL permission checks including dangerous commands for all agents",
|
|
19222
|
+
"\u4E3A\u6240\u6709 Agent \u8DF3\u8FC7\u5168\u90E8\u6743\u9650\u68C0\u67E5\uFF0C\u5305\u62EC\u5371\u9669\u547D\u4EE4\u3002"
|
|
19223
|
+
],
|
|
19224
|
+
["Permissions managed by parent session", "\u7531\u7236\u4F1A\u8BDD\u7BA1\u7406\u6743\u9650\u3002"],
|
|
19225
|
+
[
|
|
19226
|
+
"Native agent mode with Cursor tool approvals",
|
|
19227
|
+
"\u6267\u884C\u4EFB\u52A1\uFF0C\u53EF\u4FEE\u6539\u6587\u4EF6\u548C\u8FD0\u884C\u547D\u4EE4\uFF1B\u9700\u8981\u5BA1\u6279\u7684\u64CD\u4F5C\u4ECD\u4F1A\u8BF7\u6C42\u786E\u8BA4\u3002"
|
|
19228
|
+
],
|
|
19229
|
+
["Native read-only planning mode", "\u53EA\u8BFB\u5206\u6790\u4EE3\u7801\u5E76\u5236\u5B9A\u5B9E\u65BD\u8BA1\u5212\uFF0C\u4E0D\u4FEE\u6539\u9879\u76EE\u6587\u4EF6\u3002"],
|
|
19230
|
+
["Native read-only question mode", "\u53EA\u8BFB\u67E5\u770B\u4EE3\u7801\u5E76\u56DE\u7B54\u95EE\u9898\uFF0C\u4E0D\u4FEE\u6539\u9879\u76EE\u6587\u4EF6\u3002"]
|
|
19155
19231
|
]);
|
|
19156
19232
|
function rendererHarnessMessages(locale) {
|
|
19157
19233
|
return locale === "zh-CN" ? CHINESE_HARNESS_MESSAGES : ENGLISH_HARNESS_MESSAGES;
|
|
@@ -19923,7 +19999,7 @@ ${error51.stderrTail}`] : []
|
|
|
19923
19999
|
if (periodType === "seven_day") return messages.sevenDay;
|
|
19924
20000
|
return messages.account;
|
|
19925
20001
|
}
|
|
19926
|
-
function productLabel(product, locale) {
|
|
20002
|
+
function productLabel(product, locale = "en") {
|
|
19927
20003
|
if (product === "GrokBuild") return "Build";
|
|
19928
20004
|
if (product === "GrokChat") return "Chat";
|
|
19929
20005
|
if (product === "GrokImagine") return "Imagine";
|
|
@@ -19931,12 +20007,22 @@ ${error51.stderrTail}`] : []
|
|
|
19931
20007
|
const messages = rendererCreditsMessages(locale);
|
|
19932
20008
|
if (product === "5-hour window") return messages.fiveHour;
|
|
19933
20009
|
if (product === "7-day window") return messages.sevenDay;
|
|
20010
|
+
if (product === "Weekly window") return messages.weekly;
|
|
19934
20011
|
if (product.endsWith(" \xB7 5-hour window")) {
|
|
19935
20012
|
return `${product.slice(0, -"5-hour window".length)}${messages.fiveHour}`;
|
|
19936
20013
|
}
|
|
19937
20014
|
if (product.endsWith(" \xB7 7-day window")) {
|
|
19938
20015
|
return `${product.slice(0, -"7-day window".length)}${messages.sevenDay}`;
|
|
19939
20016
|
}
|
|
20017
|
+
if (product.endsWith(" \xB7 Weekly window")) {
|
|
20018
|
+
return `${product.slice(0, -"Weekly window".length)}${messages.weekly}`;
|
|
20019
|
+
}
|
|
20020
|
+
if (product.endsWith(" \xB7 5-hour")) {
|
|
20021
|
+
return `${product.slice(0, -"5-hour".length)}${messages.fiveHour}`;
|
|
20022
|
+
}
|
|
20023
|
+
if (product.endsWith(" \xB7 7-day")) {
|
|
20024
|
+
return `${product.slice(0, -"7-day".length)}${messages.sevenDay}`;
|
|
20025
|
+
}
|
|
19940
20026
|
return product;
|
|
19941
20027
|
}
|
|
19942
20028
|
function toneColor(tone) {
|
|
@@ -19978,7 +20064,7 @@ ${error51.stderrTail}`] : []
|
|
|
19978
20064
|
top.style.marginBottom = "5px";
|
|
19979
20065
|
const left = document.createElement("div");
|
|
19980
20066
|
const label = document.createElement("div");
|
|
19981
|
-
label.textContent = creditsPeriodLabel(credits.periodType, locale);
|
|
20067
|
+
label.textContent = credits.label ? productLabel(credits.label, locale) : creditsPeriodLabel(credits.periodType, locale);
|
|
19982
20068
|
label.style.fontSize = "12.5px";
|
|
19983
20069
|
label.style.fontWeight = "600";
|
|
19984
20070
|
left.append(label);
|
|
@@ -20222,7 +20308,8 @@ ${error51.stderrTail}`] : []
|
|
|
20222
20308
|
}
|
|
20223
20309
|
const remaining = remainingPercent(accountCredits.usedPercent);
|
|
20224
20310
|
const percent = formatRendererCreditsPercent(remaining);
|
|
20225
|
-
const
|
|
20311
|
+
const periodLabel = accountCredits.label ? productLabel(accountCredits.label, locale) : creditsPeriodLabel(accountCredits.periodType, locale);
|
|
20312
|
+
const title = `${periodLabel} ${percent}`;
|
|
20226
20313
|
const tone = rendererCreditsTone(accountCredits.usedPercent);
|
|
20227
20314
|
const ringSlot = control.trigger.querySelector("[data-codexhost-credits-ring]");
|
|
20228
20315
|
const label = control.trigger.querySelector("[data-codexhost-credits-label]");
|
|
@@ -21231,6 +21318,8 @@ ${error51.stderrTail}`] : []
|
|
|
21231
21318
|
if (ownership.harnessId === "omp") return "omp";
|
|
21232
21319
|
if (ownership.harnessId === "antigravity") return "antigravity";
|
|
21233
21320
|
if (ownership.harnessId === "kiro-cli") return "kiro-cli";
|
|
21321
|
+
if (ownership.harnessId === "codebuddy") return "codebuddy";
|
|
21322
|
+
if (ownership.harnessId === "cursor-cli") return "cursor-cli";
|
|
21234
21323
|
return null;
|
|
21235
21324
|
}
|
|
21236
21325
|
var BrowserSidebarAgentIconRow = class {
|
|
@@ -21911,6 +22000,39 @@ ${error51.stderrTail}`] : []
|
|
|
21911
22000
|
};
|
|
21912
22001
|
}
|
|
21913
22002
|
|
|
22003
|
+
// src/renderer-external-queue.ts
|
|
22004
|
+
function isRecord5(value) {
|
|
22005
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
22006
|
+
}
|
|
22007
|
+
function installRendererExternalQueue(target) {
|
|
22008
|
+
if (!isRecord5(target) || typeof target.getTurnCoordinator !== "function" || typeof target.getConversation !== "function") {
|
|
22009
|
+
return null;
|
|
22010
|
+
}
|
|
22011
|
+
const coordinator = target.getTurnCoordinator();
|
|
22012
|
+
const queue = isRecord5(coordinator) ? coordinator.serverQueue : null;
|
|
22013
|
+
if (!isRecord5(queue) || typeof queue.isEnabled !== "function") return null;
|
|
22014
|
+
const descriptor = Object.getOwnPropertyDescriptor(queue, "isEnabled");
|
|
22015
|
+
if (!descriptor?.writable) return null;
|
|
22016
|
+
const original = queue.isEnabled;
|
|
22017
|
+
const getConversation = target.getConversation;
|
|
22018
|
+
const isEnabled = (...args) => {
|
|
22019
|
+
const threadId = args[0];
|
|
22020
|
+
if (typeof threadId === "string") {
|
|
22021
|
+
const conversation = getConversation.call(target, threadId);
|
|
22022
|
+
if (isRecord5(conversation) && conversation.id === threadId && // Reserved transport marker from externalThreadValue, retained by
|
|
22023
|
+
// Desktop in both newly created and hydrated conversation metadata.
|
|
22024
|
+
conversation.modelProvider === "codexhost") {
|
|
22025
|
+
return false;
|
|
22026
|
+
}
|
|
22027
|
+
}
|
|
22028
|
+
return original.apply(queue, args);
|
|
22029
|
+
};
|
|
22030
|
+
queue.isEnabled = isEnabled;
|
|
22031
|
+
return () => {
|
|
22032
|
+
if (queue.isEnabled === isEnabled) Object.defineProperty(queue, "isEnabled", descriptor);
|
|
22033
|
+
};
|
|
22034
|
+
}
|
|
22035
|
+
|
|
21914
22036
|
// src/renderer-session-import-client.ts
|
|
21915
22037
|
var RendererSessionImportUnavailableError = class extends Error {
|
|
21916
22038
|
constructor() {
|
|
@@ -21983,15 +22105,15 @@ ${error51.stderrTail}`] : []
|
|
|
21983
22105
|
var CODEX_ACCOUNT_LOGIN_CANCEL_METHOD = "codexhost/account/login/cancel";
|
|
21984
22106
|
var CODEX_ACCOUNT_LOGIN_COMPLETED_METHOD = "codexhost/account/login/completed";
|
|
21985
22107
|
var CODEX_ACCOUNT_RESET_CREDIT_CONSUME_METHOD = "codexhost/account/rate-limit-reset/consume";
|
|
21986
|
-
function
|
|
22108
|
+
function isRecord6(value) {
|
|
21987
22109
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
21988
22110
|
}
|
|
21989
22111
|
function notifiedThreadId(notification) {
|
|
21990
|
-
if (!
|
|
22112
|
+
if (!isRecord6(notification) || notification.method !== THREAD_TOKEN_USAGE_UPDATED_METHOD && notification.method !== THREAD_USAGE_UPDATED_METHOD) {
|
|
21991
22113
|
return null;
|
|
21992
22114
|
}
|
|
21993
22115
|
const params = notification.params;
|
|
21994
|
-
if (!
|
|
22116
|
+
if (!isRecord6(params)) return null;
|
|
21995
22117
|
const parsed = hostThreadIdSchema.safeParse(params.threadId);
|
|
21996
22118
|
return parsed.success ? parsed.data : null;
|
|
21997
22119
|
}
|
|
@@ -22112,8 +22234,8 @@ ${error51.stderrTail}`] : []
|
|
|
22112
22234
|
threadId: params.threadId,
|
|
22113
22235
|
includeTurns: false
|
|
22114
22236
|
});
|
|
22115
|
-
const thread =
|
|
22116
|
-
if (!
|
|
22237
|
+
const thread = isRecord6(native) ? native.thread : null;
|
|
22238
|
+
if (!isRecord6(thread) || thread.id !== params.threadId || typeof thread.modelProvider !== "string" || !thread.modelProvider || thread.modelProvider === "codexhost" || typeof thread.cliVersion !== "string" || !thread.cliVersion || thread.cliVersion === "codexhost") {
|
|
22117
22239
|
throw new Error("Native Thread response cannot establish Codex ownership");
|
|
22118
22240
|
}
|
|
22119
22241
|
return { owner: "codex", locked: true };
|
|
@@ -22253,7 +22375,7 @@ ${error51.stderrTail}`] : []
|
|
|
22253
22375
|
return notifications.addNotificationCallback(
|
|
22254
22376
|
CODEX_ACCOUNT_LOGIN_COMPLETED_METHOD,
|
|
22255
22377
|
(notification) => {
|
|
22256
|
-
if (!
|
|
22378
|
+
if (!isRecord6(notification) || notification.method !== CODEX_ACCOUNT_LOGIN_COMPLETED_METHOD) {
|
|
22257
22379
|
return;
|
|
22258
22380
|
}
|
|
22259
22381
|
const result = codexAccountLoginCompletedSchema.safeParse(notification.params);
|
|
@@ -22301,9 +22423,11 @@ ${error51.stderrTail}`] : []
|
|
|
22301
22423
|
if (agent === "omp") return OMP_TRANSPORT_MODEL_ID;
|
|
22302
22424
|
if (agent === "antigravity") return ANTIGRAVITY_TRANSPORT_MODEL_ID;
|
|
22303
22425
|
if (agent === "kiro-cli") return encodeHarnessPluginRoute({ harnessId: KIRO_CLI_HARNESS_ID });
|
|
22426
|
+
if (agent === "codebuddy" || agent === "cursor-cli")
|
|
22427
|
+
return encodeHarnessPluginRoute({ harnessId: harnessIdSchema.parse(agent) });
|
|
22304
22428
|
return null;
|
|
22305
22429
|
}
|
|
22306
|
-
function
|
|
22430
|
+
function isRecord7(value) {
|
|
22307
22431
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
22308
22432
|
}
|
|
22309
22433
|
function piTransportModelId(model, thinkingOptionId) {
|
|
@@ -22544,7 +22668,7 @@ ${error51.stderrTail}`] : []
|
|
|
22544
22668
|
return hostThreadIdSchema.parse(target[1]);
|
|
22545
22669
|
}
|
|
22546
22670
|
function isCurrentRequestBridge(value) {
|
|
22547
|
-
return
|
|
22671
|
+
return isRecord7(value) && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.sendRequest === "function" && typeof value.prewarmThreadStart === "function" && typeof value.enqueueRequest === "function";
|
|
22548
22672
|
}
|
|
22549
22673
|
function findActivePrewarmTargets(root) {
|
|
22550
22674
|
const editor = root.querySelector(
|
|
@@ -22572,7 +22696,7 @@ ${error51.stderrTail}`] : []
|
|
|
22572
22696
|
let hook = fiber.memoizedState;
|
|
22573
22697
|
for (let hookIndex = 0; hook && hookIndex < 100; hookIndex += 1) {
|
|
22574
22698
|
const hookState = hook.memoizedState;
|
|
22575
|
-
if (
|
|
22699
|
+
if (isRecord7(hookState)) {
|
|
22576
22700
|
const requestClient = hookState.requestClient;
|
|
22577
22701
|
const bridge = isCurrentRequestBridge(requestClient) ? requestClient : isCurrentRequestBridge(hookState) ? hookState : null;
|
|
22578
22702
|
if (bridge) {
|
|
@@ -22606,7 +22730,7 @@ ${error51.stderrTail}`] : []
|
|
|
22606
22730
|
let fiber = findComposerFiber(composer);
|
|
22607
22731
|
for (let depth = 0; fiber && depth < 120; depth += 1) {
|
|
22608
22732
|
const props = fiber.memoizedProps;
|
|
22609
|
-
if (
|
|
22733
|
+
if (isRecord7(props) && "conversationId" in props && props.conversationId != null) {
|
|
22610
22734
|
const candidate = hostThreadIdSchema.safeParse(props.conversationId);
|
|
22611
22735
|
if (!candidate.success || threadId !== void 0 && threadId !== candidate.data) {
|
|
22612
22736
|
return null;
|
|
@@ -22619,12 +22743,12 @@ ${error51.stderrTail}`] : []
|
|
|
22619
22743
|
return threadId;
|
|
22620
22744
|
}
|
|
22621
22745
|
function isCurrentDraftWrapper(value) {
|
|
22622
|
-
if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !
|
|
22746
|
+
if (!Array.isArray(value) || value.length !== 7 || value[3] !== value[5] || value[3] !== value[6] || !isRecord7(value[3]) || typeof value[3].get !== "function" || typeof value[2] !== "string" && value[2] !== null) {
|
|
22623
22747
|
return false;
|
|
22624
22748
|
}
|
|
22625
22749
|
try {
|
|
22626
22750
|
const draft = value[3].get();
|
|
22627
|
-
return
|
|
22751
|
+
return isRecord7(draft) && "modelSettings" in draft && "isManuallyChanged" in draft;
|
|
22628
22752
|
} catch {
|
|
22629
22753
|
return false;
|
|
22630
22754
|
}
|
|
@@ -22644,8 +22768,8 @@ ${error51.stderrTail}`] : []
|
|
|
22644
22768
|
let fiber = findComposerFiber(composer);
|
|
22645
22769
|
for (let depth = 0; fiber && depth < 120; depth += 1) {
|
|
22646
22770
|
const updateQueue = fiber.updateQueue;
|
|
22647
|
-
const memoCache =
|
|
22648
|
-
const data =
|
|
22771
|
+
const memoCache = isRecord7(updateQueue) ? updateQueue.memoCache : null;
|
|
22772
|
+
const data = isRecord7(memoCache) && Array.isArray(memoCache.data) ? memoCache.data : [];
|
|
22649
22773
|
for (const value of data) {
|
|
22650
22774
|
if (isCurrentDraftWrapper(value) && typeof value[2] === "string" && value[2].startsWith("client-new-thread:")) {
|
|
22651
22775
|
draftIds.add(value[2]);
|
|
@@ -22673,7 +22797,7 @@ ${error51.stderrTail}`] : []
|
|
|
22673
22797
|
return ["default", draftIds.values().next().value];
|
|
22674
22798
|
}
|
|
22675
22799
|
function isDraftPrewarmPolicyReady(value) {
|
|
22676
|
-
return
|
|
22800
|
+
return isRecord7(value) && value.state === "ready" && typeof value.hostId === "string" && value.hostId.length > 0 && typeof value.select === "function" && typeof value.clear === "function";
|
|
22677
22801
|
}
|
|
22678
22802
|
function prewarmTargetHostId(target) {
|
|
22679
22803
|
const bridge = target.requestClient ?? target;
|
|
@@ -22681,7 +22805,7 @@ ${error51.stderrTail}`] : []
|
|
|
22681
22805
|
return typeof hostId === "string" && hostId.length > 0 ? hostId : null;
|
|
22682
22806
|
}
|
|
22683
22807
|
function isRendererRequestTarget(value) {
|
|
22684
|
-
if (!
|
|
22808
|
+
if (!isRecord7(value) || typeof value.sendRequest !== "function") return false;
|
|
22685
22809
|
return isCurrentRequestBridge(value.requestClient ?? value);
|
|
22686
22810
|
}
|
|
22687
22811
|
function hasPolicyRequestTarget(policy) {
|
|
@@ -22743,10 +22867,10 @@ ${error51.stderrTail}`] : []
|
|
|
22743
22867
|
}
|
|
22744
22868
|
}
|
|
22745
22869
|
function modelSelectionForAgent(officialSelection, reasoningEffort, agent, model, thinkingOptionId, permissionModeId) {
|
|
22746
|
-
const transportModelId = agent === "pi" ? piTransportModelId(model, thinkingOptionId) : agent === "claude-code" ? claudeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "deepseek-harness" ? deepSeekHarnessTransportModelId(model, permissionModeId) : agent === "opencode" ? openCodeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "grok" ? grokTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "omp" ? ompTransportModelId(model, thinkingOptionId, permissionModeId) : agent === "antigravity" ? antigravityTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "kiro-cli" ? encodeHarnessPluginRoute({
|
|
22747
|
-
harnessId:
|
|
22870
|
+
const transportModelId = agent === "pi" ? piTransportModelId(model, thinkingOptionId) : agent === "claude-code" ? claudeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "deepseek-harness" ? deepSeekHarnessTransportModelId(model, permissionModeId) : agent === "opencode" ? openCodeTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "grok" ? grokTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "omp" ? ompTransportModelId(model, thinkingOptionId, permissionModeId) : agent === "antigravity" ? antigravityTransportModelId(model, permissionModeId, thinkingOptionId) : agent === "kiro-cli" || agent === "codebuddy" || agent === "cursor-cli" ? encodeHarnessPluginRoute({
|
|
22871
|
+
harnessId: harnessIdSchema.parse(agent),
|
|
22748
22872
|
...model ? { model } : {},
|
|
22749
|
-
...thinkingOptionId ? { thinkingOptionId } : {},
|
|
22873
|
+
...thinkingOptionId && agent !== "cursor-cli" ? { thinkingOptionId } : {},
|
|
22750
22874
|
...permissionModeId ? { permissionModeId } : {}
|
|
22751
22875
|
}) : transportModelIdForAgent(agent);
|
|
22752
22876
|
return transportModelId ? { model: transportModelId, reasoningEffort } : officialSelection;
|
|
@@ -22772,7 +22896,7 @@ ${error51.stderrTail}`] : []
|
|
|
22772
22896
|
() => findActivePrewarmTargets(document)
|
|
22773
22897
|
);
|
|
22774
22898
|
const clientsByTarget = /* @__PURE__ */ new WeakMap();
|
|
22775
|
-
const
|
|
22899
|
+
const turnControlCleanups = /* @__PURE__ */ new Set();
|
|
22776
22900
|
const modelClientForTargets = (targets, policy = null) => {
|
|
22777
22901
|
const target = targets[0];
|
|
22778
22902
|
if (targets.length !== 1 || !target) return null;
|
|
@@ -22782,8 +22906,10 @@ ${error51.stderrTail}`] : []
|
|
|
22782
22906
|
const client = createRendererModelClient([target]);
|
|
22783
22907
|
if (client) {
|
|
22784
22908
|
if (!cached2) {
|
|
22785
|
-
const
|
|
22786
|
-
if (
|
|
22909
|
+
const queueCleanup = installRendererExternalQueue(target);
|
|
22910
|
+
if (queueCleanup) turnControlCleanups.add(queueCleanup);
|
|
22911
|
+
const steeringCleanup = installRendererExternalSteering(target);
|
|
22912
|
+
if (steeringCleanup) turnControlCleanups.add(steeringCleanup);
|
|
22787
22913
|
}
|
|
22788
22914
|
clientsByTarget.set(target, { client, policy, requestClient: target.requestClient });
|
|
22789
22915
|
}
|
|
@@ -23002,7 +23128,7 @@ ${error51.stderrTail}`] : []
|
|
|
23002
23128
|
() => activeRoutingPolicy?.select(null),
|
|
23003
23129
|
() => syncActiveRoute(null),
|
|
23004
23130
|
() => forkControl.dispose(),
|
|
23005
|
-
...
|
|
23131
|
+
...turnControlCleanups,
|
|
23006
23132
|
() => usageSubscription.dispose()
|
|
23007
23133
|
];
|
|
23008
23134
|
for (const cleanup of cleanups) {
|
|
@@ -23052,11 +23178,11 @@ ${error51.stderrTail}`] : []
|
|
|
23052
23178
|
return null;
|
|
23053
23179
|
}
|
|
23054
23180
|
}
|
|
23055
|
-
function
|
|
23181
|
+
function isRecord8(value) {
|
|
23056
23182
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23057
23183
|
}
|
|
23058
23184
|
function parseExternalConfiguration(value) {
|
|
23059
|
-
if (!
|
|
23185
|
+
if (!isRecord8(value)) return void 0;
|
|
23060
23186
|
const model = harnessModelRefSchema.safeParse(value.model);
|
|
23061
23187
|
if (!model.success) return void 0;
|
|
23062
23188
|
const thinkingOptionId = harnessThinkingOptionIdSchema.safeParse(value.thinkingOptionId);
|
|
@@ -23073,9 +23199,9 @@ ${error51.stderrTail}`] : []
|
|
|
23073
23199
|
const raw = storage.getItem(RENDERER_NEW_THREAD_PREFERENCE_KEY);
|
|
23074
23200
|
if (!raw) return void 0;
|
|
23075
23201
|
const parsed = JSON.parse(raw);
|
|
23076
|
-
if (!
|
|
23202
|
+
if (!isRecord8(parsed) || parsed.version !== 1) return void 0;
|
|
23077
23203
|
if (!KNOWN_RENDERER_AGENTS.some((agent) => agent === parsed.lastAgent)) return void 0;
|
|
23078
|
-
const externalByAgent =
|
|
23204
|
+
const externalByAgent = isRecord8(parsed.externalByAgent) ? parsed.externalByAgent : {};
|
|
23079
23205
|
const parsedExternal = Object.fromEntries(
|
|
23080
23206
|
KNOWN_RENDERER_AGENTS.filter(
|
|
23081
23207
|
(agent) => agent !== "codex"
|
|
@@ -23151,7 +23277,7 @@ ${error51.stderrTail}`] : []
|
|
|
23151
23277
|
var GET_LOCALE_OVERRIDE_URL = "vscode://codex/get-setting";
|
|
23152
23278
|
var GET_LOCALE_INFO_URL = "vscode://codex/locale-info";
|
|
23153
23279
|
var DEFAULT_LOCALE_REQUEST_TIMEOUT_MS = 750;
|
|
23154
|
-
function
|
|
23280
|
+
function isRecord9(value) {
|
|
23155
23281
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
23156
23282
|
}
|
|
23157
23283
|
function canonicalLocale(value) {
|
|
@@ -23173,7 +23299,7 @@ ${error51.stderrTail}`] : []
|
|
|
23173
23299
|
return new DOMException("The operation was aborted", "AbortError");
|
|
23174
23300
|
}
|
|
23175
23301
|
function parseLocaleOverride(value) {
|
|
23176
|
-
if (!
|
|
23302
|
+
if (!isRecord9(value) || !("value" in value)) {
|
|
23177
23303
|
throw new Error("Codex locale override response is malformed");
|
|
23178
23304
|
}
|
|
23179
23305
|
if (value.value === null) return { value: null };
|
|
@@ -23188,7 +23314,7 @@ ${error51.stderrTail}`] : []
|
|
|
23188
23314
|
return locale;
|
|
23189
23315
|
}
|
|
23190
23316
|
function parseLocaleInfo(value) {
|
|
23191
|
-
if (!
|
|
23317
|
+
if (!isRecord9(value)) throw new Error("Codex locale info response is malformed");
|
|
23192
23318
|
return {
|
|
23193
23319
|
ideLocale: optionalLocale(value.ideLocale, "IDE locale"),
|
|
23194
23320
|
systemLocale: optionalLocale(value.systemLocale, "system locale")
|
|
@@ -23217,7 +23343,7 @@ ${error51.stderrTail}`] : []
|
|
|
23217
23343
|
const onAbort = () => settle(() => reject(abortError2()));
|
|
23218
23344
|
const onMessage = (event) => {
|
|
23219
23345
|
const message2 = event.data;
|
|
23220
|
-
if (!
|
|
23346
|
+
if (!isRecord9(message2) || message2.type !== "fetch-response") return;
|
|
23221
23347
|
if (message2.requestId !== requestId) return;
|
|
23222
23348
|
if (message2.responseType !== "success" || typeof message2.status !== "number" || message2.status < 200 || message2.status >= 300 || typeof message2.bodyJsonString !== "string") {
|
|
23223
23349
|
settle(() => reject(new Error("Codex locale request failed")));
|
|
@@ -26405,7 +26531,9 @@ ${accounts_default}`;
|
|
|
26405
26531
|
grok: harnessIdSchema.parse("grok"),
|
|
26406
26532
|
omp: harnessIdSchema.parse("omp"),
|
|
26407
26533
|
antigravity: harnessIdSchema.parse("antigravity"),
|
|
26408
|
-
"kiro-cli": harnessIdSchema.parse("kiro-cli")
|
|
26534
|
+
"kiro-cli": harnessIdSchema.parse("kiro-cli"),
|
|
26535
|
+
codebuddy: harnessIdSchema.parse("codebuddy"),
|
|
26536
|
+
"cursor-cli": harnessIdSchema.parse("cursor-cli")
|
|
26409
26537
|
};
|
|
26410
26538
|
var externalAgents = [
|
|
26411
26539
|
"pi",
|
|
@@ -26415,7 +26543,9 @@ ${accounts_default}`;
|
|
|
26415
26543
|
"grok",
|
|
26416
26544
|
"omp",
|
|
26417
26545
|
"antigravity",
|
|
26418
|
-
"kiro-cli"
|
|
26546
|
+
"kiro-cli",
|
|
26547
|
+
"codebuddy",
|
|
26548
|
+
"cursor-cli"
|
|
26419
26549
|
];
|
|
26420
26550
|
function isRetryableHarnessAvailability(availability, error51) {
|
|
26421
26551
|
return availability !== void 0 && availability !== "ready" && availability !== "notInstalled" && error51?.retryable === true;
|
|
@@ -26585,16 +26715,16 @@ ${accounts_default}`;
|
|
|
26585
26715
|
...permissionModeId ? { permissionModeId } : {}
|
|
26586
26716
|
};
|
|
26587
26717
|
}
|
|
26588
|
-
if (inspection.harnessId === "kiro-cli") {
|
|
26718
|
+
if (inspection.harnessId === "kiro-cli" || inspection.harnessId === "codebuddy" || inspection.harnessId === "cursor-cli") {
|
|
26589
26719
|
const route = decodeHarnessPluginRoute(inspection.transportModelId);
|
|
26590
|
-
if (!route || route.harnessId !==
|
|
26591
|
-
throw new Error("
|
|
26720
|
+
if (!route || route.harnessId !== inspection.harnessId) {
|
|
26721
|
+
throw new Error("Plugin Thread reported an incompatible transport Model");
|
|
26592
26722
|
}
|
|
26593
26723
|
const model = inspection.effectiveModel ?? route.model;
|
|
26594
|
-
const thinkingOptionId = inspection.availableThinkingOptions !== void 0 ? selectableThinkingOptionId(inspection) : inspection.effectiveThinkingOptionId ?? route.thinkingOptionId;
|
|
26724
|
+
const thinkingOptionId = inspection.harnessId === "cursor-cli" ? void 0 : inspection.availableThinkingOptions !== void 0 ? selectableThinkingOptionId(inspection) : inspection.effectiveThinkingOptionId ?? route.thinkingOptionId;
|
|
26595
26725
|
const permissionModeId = inspection.effectivePermissionModeId ?? route.permissionModeId;
|
|
26596
26726
|
return {
|
|
26597
|
-
agent:
|
|
26727
|
+
agent: inspection.harnessId,
|
|
26598
26728
|
...model ? { model } : {},
|
|
26599
26729
|
...thinkingOptionId ? { thinkingOptionId } : {},
|
|
26600
26730
|
...permissionModeId ? { permissionModeId } : {}
|
|
@@ -26744,7 +26874,9 @@ ${accounts_default}`;
|
|
|
26744
26874
|
grok: void 0,
|
|
26745
26875
|
omp: void 0,
|
|
26746
26876
|
antigravity: void 0,
|
|
26747
|
-
"kiro-cli": void 0
|
|
26877
|
+
"kiro-cli": void 0,
|
|
26878
|
+
codebuddy: void 0,
|
|
26879
|
+
"cursor-cli": void 0
|
|
26748
26880
|
},
|
|
26749
26881
|
webUi: Object.fromEntries(
|
|
26750
26882
|
externalAgents.map((agent) => [agent, false])
|
package/bin/codexhost
CHANGED
|
Binary file
|
package/libexec/codexhost-shim
CHANGED
|
Binary file
|
|
Binary file
|