@kenkaiiii/ggcoder 5.49.1 → 5.49.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.
Files changed (33) hide show
  1. package/dist/app-sidecar.js +16 -0
  2. package/dist/app-sidecar.js.map +1 -1
  3. package/dist/core/agent-session-pre-init-arming.test.d.ts +2 -0
  4. package/dist/core/agent-session-pre-init-arming.test.d.ts.map +1 -0
  5. package/dist/core/agent-session-pre-init-arming.test.js +60 -0
  6. package/dist/core/agent-session-pre-init-arming.test.js.map +1 -0
  7. package/dist/core/agent-session-verification-flow.test.d.ts +2 -0
  8. package/dist/core/agent-session-verification-flow.test.d.ts.map +1 -0
  9. package/dist/core/agent-session-verification-flow.test.js +125 -0
  10. package/dist/core/agent-session-verification-flow.test.js.map +1 -0
  11. package/dist/core/agent-session-verification-gate.test.js +6 -4
  12. package/dist/core/agent-session-verification-gate.test.js.map +1 -1
  13. package/dist/core/agent-session.d.ts +16 -3
  14. package/dist/core/agent-session.d.ts.map +1 -1
  15. package/dist/core/agent-session.js +42 -6
  16. package/dist/core/agent-session.js.map +1 -1
  17. package/dist/core/event-bus.d.ts +6 -6
  18. package/dist/core/event-bus.d.ts.map +1 -1
  19. package/dist/core/event-bus.js.map +1 -1
  20. package/dist/core/verification-gate.d.ts +22 -12
  21. package/dist/core/verification-gate.d.ts.map +1 -1
  22. package/dist/core/verification-gate.js +126 -27
  23. package/dist/core/verification-gate.js.map +1 -1
  24. package/dist/core/verification-gate.test.js +40 -4
  25. package/dist/core/verification-gate.test.js.map +1 -1
  26. package/dist/ui/App.d.ts.map +1 -1
  27. package/dist/ui/App.js +15 -4
  28. package/dist/ui/App.js.map +1 -1
  29. package/dist/ui/app-items.d.ts +3 -0
  30. package/dist/ui/app-items.d.ts.map +1 -1
  31. package/dist/ui/app-items.js +3 -0
  32. package/dist/ui/app-items.js.map +1 -1
  33. package/package.json +4 -4
@@ -3976,6 +3976,14 @@ async function createSession(deps, opts) {
3976
3976
  json(res, 400, { error: "invalid JSON body" });
3977
3977
  return;
3978
3978
  }
3979
+ // Same lock as POST /model, for the same reason: this retargets Ken's
3980
+ // chat session AND the autopilot reviewer, and `switchModel` on a
3981
+ // session mid-turn races the stream it is already consuming. The
3982
+ // footer picker is disabled to match; this is the enforcement.
3983
+ if (running || kenRunning || autopilotReviewing) {
3984
+ json(res, 409, { error: "cannot switch Ken's model while running" });
3985
+ return;
3986
+ }
3979
3987
  if (modelId === null) {
3980
3988
  // Clear the pin → follow GG Coder again, syncing both sessions back.
3981
3989
  kenModelOverride = null;
@@ -4092,6 +4100,14 @@ async function createSession(deps, opts) {
4092
4100
  return;
4093
4101
  }
4094
4102
  if (method === "POST" && url === "/thinking") {
4103
+ // The in-flight request already carries its reasoning config, so a
4104
+ // mid-run cycle cannot affect the turn the user is watching — it just
4105
+ // persists a level the footer then reports for a run that never used it.
4106
+ // Locked like POST /model; the footer button is disabled to match.
4107
+ if (running) {
4108
+ json(res, 409, { error: "cannot change reasoning level while running" });
4109
+ return;
4110
+ }
4095
4111
  const st = session.getState();
4096
4112
  const next = getNextThinkingLevel(st.provider, st.model, session.getThinkingLevel());
4097
4113
  session.setThinkingLevel(next);