@kenkaiiii/ggcoder 5.55.1 → 5.56.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 +16 -7
- package/dist/app-sidecar.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +111 -20
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-providers.d.ts.map +1 -1
- package/dist/core/auth-providers.js +2 -2
- package/dist/core/auth-providers.js.map +1 -1
- package/dist/core/autopilot-cycle.d.ts +7 -3
- package/dist/core/autopilot-cycle.d.ts.map +1 -1
- package/dist/core/autopilot-cycle.js +43 -6
- package/dist/core/autopilot-cycle.js.map +1 -1
- package/dist/core/autopilot-verdict.d.ts +2 -0
- package/dist/core/autopilot-verdict.d.ts.map +1 -1
- package/dist/core/autopilot-verdict.js +25 -0
- package/dist/core/autopilot-verdict.js.map +1 -1
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +1 -1
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/event-bus.d.ts +1 -0
- package/dist/core/event-bus.d.ts.map +1 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/ideal-review.d.ts.map +1 -1
- package/dist/core/ideal-review.js +18 -5
- package/dist/core/ideal-review.js.map +1 -1
- package/dist/core/ken-prompt.js +32 -14
- package/dist/core/ken-prompt.js.map +1 -1
- package/dist/core/session-manager.d.ts +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/verification-evidence.d.ts.map +1 -1
- package/dist/core/verification-evidence.js +29 -1
- package/dist/core/verification-evidence.js.map +1 -1
- package/dist/core/verification-gate.d.ts +38 -18
- package/dist/core/verification-gate.d.ts.map +1 -1
- package/dist/core/verification-gate.js +154 -21
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/system-prompt.js +2 -2
- package/dist/system-prompt.js.map +1 -1
- package/package.json +4 -4
package/dist/app-sidecar.js
CHANGED
|
@@ -2196,7 +2196,12 @@ async function createSession(deps, opts) {
|
|
|
2196
2196
|
}
|
|
2197
2197
|
finally {
|
|
2198
2198
|
const cancelled = runLifecycle.isCancellationRequested(generation);
|
|
2199
|
+
const verificationProblem = cancelled ? null : session.getVerificationProblem();
|
|
2200
|
+
if (runSucceeded && verificationProblem && ownsGeneration) {
|
|
2201
|
+
broadcastError("error", "verification incomplete", new Error(verificationProblem));
|
|
2202
|
+
}
|
|
2199
2203
|
if (runSucceeded &&
|
|
2204
|
+
!verificationProblem &&
|
|
2200
2205
|
!cancelled &&
|
|
2201
2206
|
cancelGeneration === cancelGenAtStart &&
|
|
2202
2207
|
countAssistantMessages(session.getMessages()) > assistantsBeforeRun) {
|
|
@@ -2219,6 +2224,7 @@ async function createSession(deps, opts) {
|
|
|
2219
2224
|
// clear the widget before run_end paints the idle activity bar.
|
|
2220
2225
|
if (runSucceeded &&
|
|
2221
2226
|
!cancelled &&
|
|
2227
|
+
!verificationProblem &&
|
|
2222
2228
|
approvedPlanPath !== null &&
|
|
2223
2229
|
(await queueApprovedPlanProgressSync())) {
|
|
2224
2230
|
try {
|
|
@@ -2235,7 +2241,7 @@ async function createSession(deps, opts) {
|
|
|
2235
2241
|
}
|
|
2236
2242
|
}
|
|
2237
2243
|
if (ownsGeneration) {
|
|
2238
|
-
finishOwnedGeneration(generation, false, runSucceeded ? "completed" : "failed");
|
|
2244
|
+
finishOwnedGeneration(generation, false, verificationProblem ? "unverified" : runSucceeded ? "completed" : "failed");
|
|
2239
2245
|
}
|
|
2240
2246
|
// A cancelled injected run is still owned by the surrounding autopilot
|
|
2241
2247
|
// cycle; its outer finalizer emits the one terminal cancelled run_end.
|
|
@@ -2244,6 +2250,7 @@ async function createSession(deps, opts) {
|
|
|
2244
2250
|
cancelledRunEndGenerations.add(generation);
|
|
2245
2251
|
broadcast("run_end", {
|
|
2246
2252
|
...(cancelled ? { cancelled: true } : {}),
|
|
2253
|
+
...(verificationProblem ? { unverified: true } : {}),
|
|
2247
2254
|
runState: runLifecycle.state,
|
|
2248
2255
|
});
|
|
2249
2256
|
}
|
|
@@ -2355,7 +2362,7 @@ async function createSession(deps, opts) {
|
|
|
2355
2362
|
// control flow lives in driveAutopilotCycle (core/autopilot-cycle.ts) so
|
|
2356
2363
|
// every exit path is unit-tested; this only wires the real dependencies.
|
|
2357
2364
|
async function runAutopilotCycle(originalRequest) {
|
|
2358
|
-
if (!autopilot || autopilotCancelled)
|
|
2365
|
+
if (!autopilot || autopilotCancelled || session.getVerificationProblem())
|
|
2359
2366
|
return;
|
|
2360
2367
|
const generation = runLifecycle.begin(abortOwnedWork).generation;
|
|
2361
2368
|
pendingCancelDrain = null;
|
|
@@ -2371,6 +2378,7 @@ async function createSession(deps, opts) {
|
|
|
2371
2378
|
// round available.
|
|
2372
2379
|
maxRounds: pendingPlanPath !== null ? MAX_AUTOPILOT_ROUNDS + 2 : MAX_AUTOPILOT_ROUNDS,
|
|
2373
2380
|
isCancelled: () => autopilotCancelled,
|
|
2381
|
+
verificationProblem: () => session.getVerificationProblem(),
|
|
2374
2382
|
// An injected run entering plan mode WITHOUT submitting (enter_plan,
|
|
2375
2383
|
// no exit_plan) halts the cycle — Ken never prompts into a read-only
|
|
2376
2384
|
// plan-mode session. A submitted plan takes the planPending branch.
|
|
@@ -2383,7 +2391,7 @@ async function createSession(deps, opts) {
|
|
|
2383
2391
|
// Auto-accept: the inlined POST /plan/accept body. Returns false when
|
|
2384
2392
|
// the plan generation moved since the review (user acted) — the cycle
|
|
2385
2393
|
// exits silently and the user's action stands.
|
|
2386
|
-
acceptPlan: async () => {
|
|
2394
|
+
acceptPlan: async (reason) => {
|
|
2387
2395
|
if (pendingPlanPath === null || planGeneration !== planGenAtReview)
|
|
2388
2396
|
return false;
|
|
2389
2397
|
const planPath = pendingPlanPath;
|
|
@@ -2400,11 +2408,11 @@ async function createSession(deps, opts) {
|
|
|
2400
2408
|
clearPendingPlan();
|
|
2401
2409
|
// Keep the approval marker ahead of the reset, then seed the reset
|
|
2402
2410
|
// with the sidecar's canonical count from the actual plan file.
|
|
2403
|
-
broadcast("autopilot_plan_accepted", {});
|
|
2411
|
+
broadcast("autopilot_plan_accepted", reason ? { reason } : {});
|
|
2404
2412
|
broadcast("session_reset", { planTotal });
|
|
2405
2413
|
broadcast("plan_progress", planProgressPayload());
|
|
2406
2414
|
// Persisted into the NEW session so a resume shows the marker.
|
|
2407
|
-
void session.persistAutopilotMarker("plan_approved");
|
|
2415
|
+
void session.persistAutopilotMarker("plan_approved", { reason });
|
|
2408
2416
|
return true;
|
|
2409
2417
|
},
|
|
2410
2418
|
runImplement: () => {
|
|
@@ -2458,9 +2466,10 @@ async function createSession(deps, opts) {
|
|
|
2458
2466
|
version: 1,
|
|
2459
2467
|
phase: "done",
|
|
2460
2468
|
afterMessageCount: session.getPersistedTranscriptCount(),
|
|
2469
|
+
...event.data,
|
|
2461
2470
|
});
|
|
2462
2471
|
broadcast(event.type, { ...event.data, copySeed: seed });
|
|
2463
|
-
void session.persistAutopilotMarker("done");
|
|
2472
|
+
void session.persistAutopilotMarker("done", event.data);
|
|
2464
2473
|
return;
|
|
2465
2474
|
}
|
|
2466
2475
|
broadcast(event.type, event.data);
|
|
@@ -2477,7 +2486,7 @@ async function createSession(deps, opts) {
|
|
|
2477
2486
|
finally {
|
|
2478
2487
|
autopilotActive = false;
|
|
2479
2488
|
session.setIdealReviewSuppressed(autopilot);
|
|
2480
|
-
finishOwnedGeneration(generation, true);
|
|
2489
|
+
finishOwnedGeneration(generation, true, session.getVerificationProblem() ? "unverified" : "completed");
|
|
2481
2490
|
queueMicrotask(() => void runStrandedQueue());
|
|
2482
2491
|
}
|
|
2483
2492
|
}
|