@kenkaiiii/ggcoder 5.73.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.
Files changed (69) hide show
  1. package/assets/skills/refactoring/SKILL.md +3 -1
  2. package/dist/app-error.d.ts +21 -0
  3. package/dist/app-error.js +39 -0
  4. package/dist/app-error.js.map +1 -0
  5. package/dist/app-sidecar.js +39 -35
  6. package/dist/app-sidecar.js.map +1 -1
  7. package/dist/core/agent-session.d.ts +2 -2
  8. package/dist/core/agent-session.js +10 -2
  9. package/dist/core/agent-session.js.map +1 -1
  10. package/dist/core/checklist-detection.d.ts +11 -0
  11. package/dist/core/checklist-detection.js +238 -0
  12. package/dist/core/checklist-detection.js.map +1 -0
  13. package/dist/core/checklist-items.d.ts +180 -0
  14. package/dist/core/checklist-items.js +204 -0
  15. package/dist/core/checklist-items.js.map +1 -0
  16. package/dist/core/checklist-prompt.d.ts +3 -0
  17. package/dist/core/checklist-prompt.js +34 -0
  18. package/dist/core/checklist-prompt.js.map +1 -0
  19. package/dist/core/checklist-snapshot.d.ts +13 -0
  20. package/dist/core/checklist-snapshot.js +29 -0
  21. package/dist/core/checklist-snapshot.js.map +1 -0
  22. package/dist/core/checklist-store.d.ts +59 -0
  23. package/dist/core/checklist-store.js +242 -0
  24. package/dist/core/checklist-store.js.map +1 -0
  25. package/dist/core/lsp/client.d.ts +4 -0
  26. package/dist/core/lsp/client.js +71 -3
  27. package/dist/core/lsp/client.js.map +1 -1
  28. package/dist/core/lsp/manager.d.ts +1 -0
  29. package/dist/core/lsp/manager.js +9 -3
  30. package/dist/core/lsp/manager.js.map +1 -1
  31. package/dist/core/lsp/project-root.d.ts +9 -0
  32. package/dist/core/lsp/project-root.js +75 -0
  33. package/dist/core/lsp/project-root.js.map +1 -0
  34. package/dist/core/lsp/reference-project.d.ts +6 -0
  35. package/dist/core/lsp/reference-project.js +110 -0
  36. package/dist/core/lsp/reference-project.js.map +1 -0
  37. package/dist/core/lsp/servers.js +1 -0
  38. package/dist/core/lsp/servers.js.map +1 -1
  39. package/dist/modes/acp-mode.d.ts +2 -1
  40. package/dist/modes/acp-mode.js +4 -1
  41. package/dist/modes/acp-mode.js.map +1 -1
  42. package/dist/system-prompt.js +4 -4
  43. package/dist/tools/bash.d.ts +4 -1
  44. package/dist/tools/bash.js +32 -7
  45. package/dist/tools/bash.js.map +1 -1
  46. package/dist/tools/checklist.d.ts +56 -0
  47. package/dist/tools/checklist.js +178 -0
  48. package/dist/tools/checklist.js.map +1 -0
  49. package/dist/tools/code-nav.d.ts +1 -1
  50. package/dist/tools/code-nav.js +3 -2
  51. package/dist/tools/code-nav.js.map +1 -1
  52. package/dist/tools/exit-plan.d.ts +2 -2
  53. package/dist/tools/exit-plan.js +7 -1
  54. package/dist/tools/exit-plan.js.map +1 -1
  55. package/dist/tools/index.d.ts +3 -2
  56. package/dist/tools/index.js +3 -0
  57. package/dist/tools/index.js.map +1 -1
  58. package/dist/tools/prompt-hints.js +2 -0
  59. package/dist/tools/prompt-hints.js.map +1 -1
  60. package/dist/tools/tool-tiers.js +1 -0
  61. package/dist/tools/tool-tiers.js.map +1 -1
  62. package/dist/tools/verification-review.d.ts +2 -0
  63. package/dist/tools/verification-review.js +41 -0
  64. package/dist/tools/verification-review.js.map +1 -0
  65. package/dist/ui/tool-line-summary.js +11 -1
  66. package/dist/ui/tool-line-summary.js.map +1 -1
  67. package/dist/ui/transcript/tool-presentation.js +1 -1
  68. package/dist/ui/transcript/tool-presentation.js.map +1 -1
  69. 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<string>;
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";
@@ -1227,7 +1227,15 @@ export class AgentSession {
1227
1227
  if (args && call && name === "bash") {
1228
1228
  const command = typeof args.command === "string" ? args.command : "";
1229
1229
  const classification = classifyVerificationCommand(command);
1230
- if (classification.accepted || classification.snapshotEligible) {
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) {
1231
1239
  // A foreground check that outlived the default budget was moved to
1232
1240
  // the background, not failed: track it to its real exit the same way.
1233
1241
  const autoBackgroundId = event.isError ? undefined : autoBackgroundedId(event.result);