@kenkaiiii/ggcoder 5.72.0 → 5.74.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/assets/skills/refactoring/SKILL.md +3 -1
- package/dist/app-error.d.ts +21 -0
- package/dist/app-error.js +39 -0
- package/dist/app-error.js.map +1 -0
- package/dist/app-sidecar.js +39 -35
- package/dist/app-sidecar.js.map +1 -1
- package/dist/core/agent-session.d.ts +2 -2
- package/dist/core/agent-session.js +17 -7
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/checklist-detection.d.ts +11 -0
- package/dist/core/checklist-detection.js +238 -0
- package/dist/core/checklist-detection.js.map +1 -0
- package/dist/core/checklist-items.d.ts +180 -0
- package/dist/core/checklist-items.js +204 -0
- package/dist/core/checklist-items.js.map +1 -0
- package/dist/core/checklist-prompt.d.ts +3 -0
- package/dist/core/checklist-prompt.js +34 -0
- package/dist/core/checklist-prompt.js.map +1 -0
- package/dist/core/checklist-snapshot.d.ts +13 -0
- package/dist/core/checklist-snapshot.js +29 -0
- package/dist/core/checklist-snapshot.js.map +1 -0
- package/dist/core/checklist-store.d.ts +59 -0
- package/dist/core/checklist-store.js +242 -0
- package/dist/core/checklist-store.js.map +1 -0
- package/dist/core/compaction/compactor.js +6 -0
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/ken-context.js +7 -3
- package/dist/core/ken-context.js.map +1 -1
- package/dist/core/lsp/client.d.ts +4 -0
- package/dist/core/lsp/client.js +71 -3
- package/dist/core/lsp/client.js.map +1 -1
- package/dist/core/lsp/manager.d.ts +1 -0
- package/dist/core/lsp/manager.js +9 -3
- package/dist/core/lsp/manager.js.map +1 -1
- package/dist/core/lsp/project-root.d.ts +9 -0
- package/dist/core/lsp/project-root.js +75 -0
- package/dist/core/lsp/project-root.js.map +1 -0
- package/dist/core/lsp/reference-project.d.ts +6 -0
- package/dist/core/lsp/reference-project.js +110 -0
- package/dist/core/lsp/reference-project.js.map +1 -0
- package/dist/core/lsp/servers.js +1 -0
- package/dist/core/lsp/servers.js.map +1 -1
- package/dist/core/subagent-receipt.js +3 -1
- package/dist/core/subagent-receipt.js.map +1 -1
- package/dist/modes/acp-mode.d.ts +2 -1
- package/dist/modes/acp-mode.js +4 -1
- package/dist/modes/acp-mode.js.map +1 -1
- package/dist/motion-agent/motion-review-session.js +7 -3
- package/dist/motion-agent/motion-review-session.js.map +1 -1
- package/dist/system-prompt.js +14 -13
- package/dist/system-prompt.js.map +1 -1
- package/dist/tools/bash.d.ts +4 -1
- package/dist/tools/bash.js +32 -7
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checklist.d.ts +56 -0
- package/dist/tools/checklist.js +178 -0
- package/dist/tools/checklist.js.map +1 -0
- package/dist/tools/code-nav.d.ts +1 -1
- package/dist/tools/code-nav.js +3 -2
- package/dist/tools/code-nav.js.map +1 -1
- package/dist/tools/edit-targets.d.ts +10 -0
- package/dist/tools/edit-targets.js +31 -0
- package/dist/tools/edit-targets.js.map +1 -0
- package/dist/tools/edit.d.ts +11 -3
- package/dist/tools/edit.js +386 -312
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/exit-plan.d.ts +2 -2
- package/dist/tools/exit-plan.js +7 -1
- package/dist/tools/exit-plan.js.map +1 -1
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.js +3 -1
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/skill.js +6 -3
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/subagent.js +2 -1
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/tool-tiers.js +1 -0
- package/dist/tools/tool-tiers.js.map +1 -1
- package/dist/tools/verification-review.d.ts +2 -0
- package/dist/tools/verification-review.js +41 -0
- package/dist/tools/verification-review.js.map +1 -0
- package/dist/ui/components/ToolExecution.js +3 -2
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/terminal-history.js +3 -1
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/tool-line-summary.js +14 -2
- package/dist/ui/tool-line-summary.js.map +1 -1
- package/dist/ui/transcript/tool-presentation.js +1 -1
- package/dist/ui/transcript/tool-presentation.js.map +1 -1
- package/dist/utils/format.js +5 -1
- package/dist/utils/format.js.map +1 -1
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentTool } from "@kenkaiiii/gg-agent";
|
|
1
|
+
import { type AgentTool, type ToolExecuteResult } from "@kenkaiiii/gg-agent";
|
|
2
2
|
import { type Message, type MessageProvenance, type Provider, type Usage, type ThinkingLevel } from "@kenkaiiii/gg-ai";
|
|
3
3
|
import { EventBus } from "./event-bus.js";
|
|
4
4
|
import { type CompletionReview } from "./completion-review.js";
|
|
@@ -122,7 +122,7 @@ export interface AgentSessionOptions {
|
|
|
122
122
|
* UI. Omitted by callers that don't want plan mode (CLI wires its own).
|
|
123
123
|
*/
|
|
124
124
|
onEnterPlan?: (reason?: string) => void | Promise<void>;
|
|
125
|
-
onExitPlan?: (planPath: string) => Promise<
|
|
125
|
+
onExitPlan?: (planPath: string) => Promise<ToolExecuteResult>;
|
|
126
126
|
/**
|
|
127
127
|
* If provided, the session's tool set is filtered to ONLY these tool names
|
|
128
128
|
* after `createTools()` runs, and the system prompt's Tools section lists only
|
|
@@ -24,7 +24,7 @@ import { ensureAppDirs } from "../config.js";
|
|
|
24
24
|
import { buildSubAgentSystemPrompt, buildSystemPrompt, } from "../system-prompt.js";
|
|
25
25
|
import { createTools, createWebSearchTool, } from "../tools/index.js";
|
|
26
26
|
import { partitionToolsByTier } from "../tools/tool-tiers.js";
|
|
27
|
-
import { autoBackgroundedId } from "../tools/bash.js";
|
|
27
|
+
import { autoBackgroundedId, REVIEW_REJECTED_BEFORE_START } from "../tools/bash.js";
|
|
28
28
|
import { buildProcessCompletionFollowUp } from "./process-gate.js";
|
|
29
29
|
import { buildSubAgentCompletionFollowUp } from "./subagent-manager.js";
|
|
30
30
|
import { applyAsyncSubagentPolicy } from "./subagent-policy.js";
|
|
@@ -69,6 +69,7 @@ import crypto from "node:crypto";
|
|
|
69
69
|
import fs from "node:fs/promises";
|
|
70
70
|
import os from "node:os";
|
|
71
71
|
import path from "node:path";
|
|
72
|
+
import { editTargetPaths } from "../tools/edit-targets.js";
|
|
72
73
|
/**
|
|
73
74
|
* A run whose tool calls fail more often than this is thrashing, not
|
|
74
75
|
* progressing — refuse to extend its turn budget.
|
|
@@ -1212,20 +1213,29 @@ export class AgentSession {
|
|
|
1212
1213
|
let verificationChanged = false;
|
|
1213
1214
|
if (!event.isError && args) {
|
|
1214
1215
|
if (name === "edit" || name === "write") {
|
|
1215
|
-
const filePath = String(args.file_path ?? "");
|
|
1216
1216
|
// Check-owning files (tsconfig.json, pytest.ini, vitest.config.ts …)
|
|
1217
1217
|
// are tracked even when they are not source code: editing one
|
|
1218
|
-
// invalidates earlier check results.
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1218
|
+
// invalidates earlier check results. A multi-file edit records every file.
|
|
1219
|
+
for (const filePath of editTargetPaths(args)) {
|
|
1220
|
+
if (isCodeFilePath(filePath) || isCheckOwnFile(filePath)) {
|
|
1221
|
+
this.verificationGate.recordMutation(filePath);
|
|
1222
|
+
verificationChanged = true;
|
|
1223
|
+
}
|
|
1222
1224
|
}
|
|
1223
1225
|
}
|
|
1224
1226
|
}
|
|
1225
1227
|
if (args && call && name === "bash") {
|
|
1226
1228
|
const command = typeof args.command === "string" ? args.command : "";
|
|
1227
1229
|
const classification = classifyVerificationCommand(command);
|
|
1228
|
-
if (
|
|
1230
|
+
if (args.review === true && event.result === REVIEW_REJECTED_BEFORE_START) {
|
|
1231
|
+
// The core tool rejected its arguments BEFORE spawning. Never mint
|
|
1232
|
+
// a pass, or poison the failed-check ledger with an unexecuted check.
|
|
1233
|
+
// A child's output cannot match: bash always prefixes it with Exit code.
|
|
1234
|
+
this.verificationGate.recordRejectedCheck(command, REVIEW_REJECTED_BEFORE_START);
|
|
1235
|
+
delete call.sourceSnapshot;
|
|
1236
|
+
verificationChanged = true;
|
|
1237
|
+
}
|
|
1238
|
+
else if (classification.accepted || classification.snapshotEligible) {
|
|
1229
1239
|
// A foreground check that outlived the default budget was moved to
|
|
1230
1240
|
// the background, not failed: track it to its real exit the same way.
|
|
1231
1241
|
const autoBackgroundId = event.isError ? undefined : autoBackgroundedId(event.result);
|