@kenkaiiii/ggcoder 5.19.0 → 5.19.1
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/app-sidecar.js +11 -1
- package/dist/app-sidecar.js.map +1 -1
- package/dist/core/agent-session-compaction.test.js +434 -9
- package/dist/core/agent-session-compaction.test.js.map +1 -1
- package/dist/core/agent-session-review-coverage.test.js +26 -0
- package/dist/core/agent-session-review-coverage.test.js.map +1 -1
- package/dist/core/agent-session-tool-result-policy.test.js +14 -1
- package/dist/core/agent-session-tool-result-policy.test.js.map +1 -1
- package/dist/core/agent-session.d.ts +21 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +171 -32
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/active-context.d.ts +17 -0
- package/dist/core/compaction/active-context.d.ts.map +1 -0
- package/dist/core/compaction/active-context.js +20 -0
- package/dist/core/compaction/active-context.js.map +1 -0
- package/dist/core/compaction/active-context.test.d.ts +2 -0
- package/dist/core/compaction/active-context.test.d.ts.map +1 -0
- package/dist/core/compaction/active-context.test.js +36 -0
- package/dist/core/compaction/active-context.test.js.map +1 -0
- package/dist/core/compaction/compactor.d.ts +9 -16
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +11 -28
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/compactor.test.js +53 -64
- package/dist/core/compaction/compactor.test.js.map +1 -1
- package/dist/core/compaction/tool-result-pruner.d.ts +37 -0
- package/dist/core/compaction/tool-result-pruner.d.ts.map +1 -0
- package/dist/core/compaction/tool-result-pruner.js +103 -0
- package/dist/core/compaction/tool-result-pruner.js.map +1 -0
- package/dist/core/compaction/tool-result-pruner.test.d.ts +2 -0
- package/dist/core/compaction/tool-result-pruner.test.d.ts.map +1 -0
- package/dist/core/compaction/tool-result-pruner.test.js +148 -0
- package/dist/core/compaction/tool-result-pruner.test.js.map +1 -0
- package/dist/core/ideal-review.d.ts +6 -0
- package/dist/core/ideal-review.d.ts.map +1 -1
- package/dist/core/ideal-review.js +14 -0
- package/dist/core/ideal-review.js.map +1 -1
- package/dist/core/ideal-review.test.js +10 -1
- package/dist/core/ideal-review.test.js.map +1 -1
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +3 -16
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +2 -4
- package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentLoop.js +6 -2
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.test.js +31 -0
- package/dist/ui/hooks/useAgentLoop.test.js.map +1 -1
- package/dist/ui/hooks/useContextCompaction.d.ts +5 -8
- package/dist/ui/hooks/useContextCompaction.d.ts.map +1 -1
- package/dist/ui/hooks/useContextCompaction.js +72 -14
- package/dist/ui/hooks/useContextCompaction.js.map +1 -1
- package/dist/ui/hooks/useContextCompaction.test.d.ts +2 -0
- package/dist/ui/hooks/useContextCompaction.test.d.ts.map +1 -0
- package/dist/ui/hooks/useContextCompaction.test.js +120 -0
- package/dist/ui/hooks/useContextCompaction.test.js.map +1 -0
- package/package.json +4 -4
package/dist/app-sidecar.js
CHANGED
|
@@ -1268,8 +1268,10 @@ async function createSession(deps, opts) {
|
|
|
1268
1268
|
// Autopilot (auto-review) toggle for THIS window's project. Loaded from
|
|
1269
1269
|
// gg-app.json on boot; flipped via POST /autopilot. When on, POST /prompt runs
|
|
1270
1270
|
// runAutopilotCycle after the user's turn settles — Ken auto-reviews the work
|
|
1271
|
-
// and drives the review→prompt→review loop.
|
|
1271
|
+
// and drives the review→prompt→review loop. Ken is the sole verification
|
|
1272
|
+
// owner in this mode, so suppress the build session's redundant Ideal hook.
|
|
1272
1273
|
let autopilot = mode === "code" && (await loadAutopilot(cwd));
|
|
1274
|
+
session.setIdealReviewSuppressed(autopilot);
|
|
1273
1275
|
// True while an autopilot review is in flight (used to defer kenAuto model
|
|
1274
1276
|
// switches, like kenRunning does for chat Ken, and to drive the spinner).
|
|
1275
1277
|
let autopilotReviewing = false;
|
|
@@ -1466,6 +1468,9 @@ async function createSession(deps, opts) {
|
|
|
1466
1468
|
// (often >5 min) regardless of the user's global speedProfile pick.
|
|
1467
1469
|
forceLongCacheRetention: true,
|
|
1468
1470
|
});
|
|
1471
|
+
// Ken is already the independent autopilot reviewer; recursively running
|
|
1472
|
+
// his own Ideal self-review adds latency and can corrupt the verdict shape.
|
|
1473
|
+
ken.setIdealReviewSuppressed(true);
|
|
1469
1474
|
await ken.initialize();
|
|
1470
1475
|
// Deliberately no bus bridge: the review is silent. Errors surface via the
|
|
1471
1476
|
// runAutopilotReview try/catch as autopilot_error frames.
|
|
@@ -1688,6 +1693,7 @@ async function createSession(deps, opts) {
|
|
|
1688
1693
|
const generation = runLifecycle.begin(abortOwnedWork).generation;
|
|
1689
1694
|
pendingCancelDrain = null;
|
|
1690
1695
|
autopilotActive = true;
|
|
1696
|
+
session.setIdealReviewSuppressed(true);
|
|
1691
1697
|
// Generation captured by the last plan review; acceptPlan re-checks it so
|
|
1692
1698
|
// a user Accept/Reject landing mid-review always wins.
|
|
1693
1699
|
let planGenAtReview = -1;
|
|
@@ -1801,6 +1807,7 @@ async function createSession(deps, opts) {
|
|
|
1801
1807
|
}
|
|
1802
1808
|
finally {
|
|
1803
1809
|
autopilotActive = false;
|
|
1810
|
+
session.setIdealReviewSuppressed(autopilot);
|
|
1804
1811
|
finishOwnedGeneration(generation, true);
|
|
1805
1812
|
queueMicrotask(() => void runStrandedQueue());
|
|
1806
1813
|
}
|
|
@@ -2781,6 +2788,9 @@ async function createSession(deps, opts) {
|
|
|
2781
2788
|
return;
|
|
2782
2789
|
}
|
|
2783
2790
|
autopilot = enabled;
|
|
2791
|
+
// A toggle-off during an active cycle takes effect after Ken finishes;
|
|
2792
|
+
// until then, injected build runs must not re-enable Ideal self-review.
|
|
2793
|
+
session.setIdealReviewSuppressed(enabled || autopilotActive);
|
|
2784
2794
|
await saveAutopilot(cwd, enabled);
|
|
2785
2795
|
log("INFO", "app-sidecar", "autopilot toggled", { enabled: String(enabled) });
|
|
2786
2796
|
broadcast("autopilot", { autopilot: enabled });
|