@kenkaiiii/ggcoder 4.3.218 → 4.3.220
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/cli.d.ts.map +1 -1
- package/dist/cli.js +41 -21
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session-compaction.test.js +0 -7
- package/dist/core/agent-session-compaction.test.js.map +1 -1
- package/dist/core/agent-session.d.ts +0 -23
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +4 -98
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/continue-replay-inventory.test.js +1 -1
- package/dist/core/continue-replay-inventory.test.js.map +1 -1
- package/dist/core/goal-controller.d.ts +2 -0
- package/dist/core/goal-controller.d.ts.map +1 -1
- package/dist/core/goal-controller.js +152 -8
- package/dist/core/goal-controller.js.map +1 -1
- package/dist/core/goal-controller.test.js +232 -3
- package/dist/core/goal-controller.test.js.map +1 -1
- package/dist/core/goal-overhead-harness.d.ts +33 -0
- package/dist/core/goal-overhead-harness.d.ts.map +1 -0
- package/dist/core/goal-overhead-harness.js +268 -0
- package/dist/core/goal-overhead-harness.js.map +1 -0
- package/dist/core/goal-store.d.ts +3 -0
- package/dist/core/goal-store.d.ts.map +1 -1
- package/dist/core/goal-store.js +64 -3
- package/dist/core/goal-store.js.map +1 -1
- package/dist/core/goal-store.test.js +13 -0
- package/dist/core/goal-store.test.js.map +1 -1
- package/dist/core/goal-worker.d.ts.map +1 -1
- package/dist/core/goal-worker.js +17 -11
- package/dist/core/goal-worker.js.map +1 -1
- package/dist/core/goal-worker.test.js +41 -8
- package/dist/core/goal-worker.test.js.map +1 -1
- package/dist/core/goal-worktree.d.ts +21 -0
- package/dist/core/goal-worktree.d.ts.map +1 -1
- package/dist/core/goal-worktree.js +71 -1
- package/dist/core/goal-worktree.js.map +1 -1
- package/dist/core/goal-worktree.test.js +127 -2
- package/dist/core/goal-worktree.test.js.map +1 -1
- package/dist/core/prompt-commands.js +2 -2
- package/dist/core/prompt-commands.test.js +1 -1
- package/dist/core/prompt-commands.test.js.map +1 -1
- package/dist/core/runtime-mode.d.ts +7 -0
- package/dist/core/runtime-mode.d.ts.map +1 -1
- package/dist/core/runtime-mode.js +6 -0
- package/dist/core/runtime-mode.js.map +1 -1
- package/dist/core/session-manager.d.ts +3 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +16 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-restore-display.test.js +84 -0
- package/dist/core/session-restore-display.test.js.map +1 -1
- package/dist/core/slash-commands.d.ts +0 -2
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +0 -15
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/tasks-store.d.ts +24 -0
- package/dist/core/tasks-store.d.ts.map +1 -0
- package/dist/core/tasks-store.js +81 -0
- package/dist/core/tasks-store.js.map +1 -0
- package/dist/system-prompt.d.ts +1 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +13 -1
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.js +2 -2
- package/dist/system-prompt.test.js.map +1 -1
- package/dist/tools/bash.d.ts +2 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +5 -2
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit.d.ts +2 -0
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +16 -3
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/enter-plan.d.ts +8 -0
- package/dist/tools/enter-plan.d.ts.map +1 -0
- package/dist/tools/enter-plan.js +27 -0
- package/dist/tools/enter-plan.js.map +1 -0
- package/dist/tools/exit-plan.d.ts +8 -0
- package/dist/tools/exit-plan.d.ts.map +1 -0
- package/dist/tools/exit-plan.js +35 -0
- package/dist/tools/exit-plan.js.map +1 -0
- package/dist/tools/goals.d.ts +8 -5
- package/dist/tools/goals.d.ts.map +1 -1
- package/dist/tools/goals.js +124 -49
- package/dist/tools/goals.js.map +1 -1
- package/dist/tools/goals.test.js +356 -11
- package/dist/tools/goals.test.js.map +1 -1
- package/dist/tools/index.d.ts +11 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +18 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/plan-mode.test.js +63 -24
- package/dist/tools/plan-mode.test.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +4 -0
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/subagent.d.ts +3 -1
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/subagent.js +5 -2
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/tasks.d.ts +16 -0
- package/dist/tools/tasks.d.ts.map +1 -0
- package/dist/tools/tasks.js +93 -0
- package/dist/tools/tasks.js.map +1 -0
- package/dist/tools/write.d.ts +2 -0
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +23 -3
- package/dist/tools/write.js.map +1 -1
- package/dist/ui/App.d.ts +10 -6
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +660 -987
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/app-items.d.ts +7 -1
- package/dist/ui/app-items.d.ts.map +1 -1
- package/dist/ui/app-items.js +1 -1
- package/dist/ui/app-items.js.map +1 -1
- package/dist/ui/app-state-persistence.test.js +41 -23
- package/dist/ui/app-state-persistence.test.js.map +1 -1
- package/dist/ui/chat-layout-pinning.test.js +10 -0
- package/dist/ui/chat-layout-pinning.test.js.map +1 -1
- package/dist/ui/components/AssistantMessage.test.js +7 -7
- package/dist/ui/components/AssistantMessage.test.js.map +1 -1
- package/dist/ui/components/BackgroundTasksBar.d.ts.map +1 -1
- package/dist/ui/components/BackgroundTasksBar.js +6 -6
- package/dist/ui/components/BackgroundTasksBar.js.map +1 -1
- package/dist/ui/components/Banner.js +2 -2
- package/dist/ui/components/Banner.js.map +1 -1
- package/dist/ui/components/ChatFooterPane.d.ts +29 -0
- package/dist/ui/components/ChatFooterPane.d.ts.map +1 -0
- package/dist/ui/components/ChatFooterPane.js +16 -0
- package/dist/ui/components/ChatFooterPane.js.map +1 -0
- package/dist/ui/components/ChatInputStack.d.ts +34 -0
- package/dist/ui/components/ChatInputStack.d.ts.map +1 -0
- package/dist/ui/components/ChatInputStack.js +9 -0
- package/dist/ui/components/ChatInputStack.js.map +1 -0
- package/dist/ui/components/ChatLayout.d.ts +23 -0
- package/dist/ui/components/ChatLayout.d.ts.map +1 -0
- package/dist/ui/components/ChatLayout.js +16 -0
- package/dist/ui/components/ChatLayout.js.map +1 -0
- package/dist/ui/components/ChatLivePane.d.ts +18 -0
- package/dist/ui/components/ChatLivePane.d.ts.map +1 -0
- package/dist/ui/components/ChatLivePane.js +8 -0
- package/dist/ui/components/ChatLivePane.js.map +1 -0
- package/dist/ui/components/ChatScreen.d.ts +118 -0
- package/dist/ui/components/ChatScreen.d.ts.map +1 -0
- package/dist/ui/components/ChatScreen.js +14 -0
- package/dist/ui/components/ChatScreen.js.map +1 -0
- package/dist/ui/components/ChatStatusRow.d.ts +34 -0
- package/dist/ui/components/ChatStatusRow.d.ts.map +1 -0
- package/dist/ui/components/ChatStatusRow.js +11 -0
- package/dist/ui/components/ChatStatusRow.js.map +1 -0
- package/dist/ui/components/CompactionNotice.d.ts +4 -2
- package/dist/ui/components/CompactionNotice.d.ts.map +1 -1
- package/dist/ui/components/CompactionNotice.js +4 -4
- package/dist/ui/components/CompactionNotice.js.map +1 -1
- package/dist/ui/components/Footer.d.ts +6 -3
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +14 -4
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/FooterStatusRow.d.ts +20 -0
- package/dist/ui/components/FooterStatusRow.d.ts.map +1 -0
- package/dist/ui/components/FooterStatusRow.js +10 -0
- package/dist/ui/components/FooterStatusRow.js.map +1 -0
- package/dist/ui/components/FullScreenOverlayRouter.d.ts +19 -0
- package/dist/ui/components/FullScreenOverlayRouter.d.ts.map +1 -0
- package/dist/ui/components/FullScreenOverlayRouter.js +18 -0
- package/dist/ui/components/FullScreenOverlayRouter.js.map +1 -0
- package/dist/ui/components/GoalOverlay.d.ts +2 -1
- package/dist/ui/components/GoalOverlay.d.ts.map +1 -1
- package/dist/ui/components/GoalOverlay.js +11 -6
- package/dist/ui/components/GoalOverlay.js.map +1 -1
- package/dist/ui/components/GoalPickerMenu.d.ts +9 -0
- package/dist/ui/components/GoalPickerMenu.d.ts.map +1 -0
- package/dist/ui/components/GoalPickerMenu.js +37 -0
- package/dist/ui/components/GoalPickerMenu.js.map +1 -0
- package/dist/ui/components/GoalStatusBar.d.ts +2 -0
- package/dist/ui/components/GoalStatusBar.d.ts.map +1 -1
- package/dist/ui/components/GoalStatusBar.js +27 -11
- package/dist/ui/components/GoalStatusBar.js.map +1 -1
- package/dist/ui/components/GoalStatusBar.test.d.ts +2 -0
- package/dist/ui/components/GoalStatusBar.test.d.ts.map +1 -0
- package/dist/ui/components/GoalStatusBar.test.js +17 -0
- package/dist/ui/components/GoalStatusBar.test.js.map +1 -0
- package/dist/ui/components/InputArea.d.ts +16 -1
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +95 -6
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/PlanOverlay.d.ts +7 -0
- package/dist/ui/components/PlanOverlay.d.ts.map +1 -1
- package/dist/ui/components/PlanOverlay.js +16 -2
- package/dist/ui/components/PlanOverlay.js.map +1 -1
- package/dist/ui/components/PlanOverlay.test.d.ts +2 -0
- package/dist/ui/components/PlanOverlay.test.d.ts.map +1 -0
- package/dist/ui/components/PlanOverlay.test.js +24 -0
- package/dist/ui/components/PlanOverlay.test.js.map +1 -0
- package/dist/ui/components/QueueIndicator.d.ts +9 -0
- package/dist/ui/components/QueueIndicator.d.ts.map +1 -0
- package/dist/ui/components/QueueIndicator.js +9 -0
- package/dist/ui/components/QueueIndicator.js.map +1 -0
- package/dist/ui/components/ServerToolExecution.d.ts +2 -0
- package/dist/ui/components/ServerToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ServerToolExecution.js +3 -2
- package/dist/ui/components/ServerToolExecution.js.map +1 -1
- package/dist/ui/components/StreamingArea.js +1 -1
- package/dist/ui/components/StreamingArea.js.map +1 -1
- package/dist/ui/components/SubAgentPanel.d.ts +2 -1
- package/dist/ui/components/SubAgentPanel.d.ts.map +1 -1
- package/dist/ui/components/SubAgentPanel.js +2 -2
- package/dist/ui/components/SubAgentPanel.js.map +1 -1
- package/dist/ui/components/TaskPickerMenu.d.ts +9 -0
- package/dist/ui/components/TaskPickerMenu.d.ts.map +1 -0
- package/dist/ui/components/TaskPickerMenu.js +33 -0
- package/dist/ui/components/TaskPickerMenu.js.map +1 -0
- package/dist/ui/components/ToolExecution.d.ts +2 -0
- package/dist/ui/components/ToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolExecution.js +13 -11
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/components/ToolGroupExecution.d.ts +2 -1
- package/dist/ui/components/ToolGroupExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolGroupExecution.js +5 -3
- package/dist/ui/components/ToolGroupExecution.js.map +1 -1
- package/dist/ui/duration-format.d.ts +2 -0
- package/dist/ui/duration-format.d.ts.map +1 -0
- package/dist/ui/duration-format.js +9 -0
- package/dist/ui/duration-format.js.map +1 -0
- package/dist/ui/duration-summary.d.ts +2 -0
- package/dist/ui/duration-summary.d.ts.map +1 -0
- package/dist/ui/duration-summary.js +66 -0
- package/dist/ui/duration-summary.js.map +1 -0
- package/dist/ui/error-item.d.ts +8 -0
- package/dist/ui/error-item.d.ts.map +1 -0
- package/dist/ui/error-item.js +32 -0
- package/dist/ui/error-item.js.map +1 -0
- package/dist/ui/footer-status-layout.test.js +4 -3
- package/dist/ui/footer-status-layout.test.js.map +1 -1
- package/dist/ui/goal-events.d.ts +1 -0
- package/dist/ui/goal-events.d.ts.map +1 -1
- package/dist/ui/goal-events.js +2 -1
- package/dist/ui/goal-events.js.map +1 -1
- package/dist/ui/goal-events.test.js +16 -0
- package/dist/ui/goal-events.test.js.map +1 -1
- package/dist/ui/goal-lifecycle-orchestration.test.js +105 -18
- package/dist/ui/goal-lifecycle-orchestration.test.js.map +1 -1
- package/dist/ui/goal-progress.d.ts +1 -1
- package/dist/ui/goal-progress.d.ts.map +1 -1
- package/dist/ui/goal-progress.js +11 -13
- package/dist/ui/goal-progress.js.map +1 -1
- package/dist/ui/goal-run-helpers.d.ts +16 -0
- package/dist/ui/goal-run-helpers.d.ts.map +1 -0
- package/dist/ui/goal-run-helpers.js +61 -0
- package/dist/ui/goal-run-helpers.js.map +1 -0
- package/dist/ui/goal-status-bar.test.js +8 -6
- package/dist/ui/goal-status-bar.test.js.map +1 -1
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +38 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts.map +1 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.js +71 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.js.map +1 -0
- package/dist/ui/hooks/useGoalPickerController.d.ts +22 -0
- package/dist/ui/hooks/useGoalPickerController.d.ts.map +1 -0
- package/dist/ui/hooks/useGoalPickerController.js +35 -0
- package/dist/ui/hooks/useGoalPickerController.js.map +1 -0
- package/dist/ui/hooks/useTaskPickerController.d.ts +19 -0
- package/dist/ui/hooks/useTaskPickerController.d.ts.map +1 -0
- package/dist/ui/hooks/useTaskPickerController.js +41 -0
- package/dist/ui/hooks/useTaskPickerController.js.map +1 -0
- package/dist/ui/hooks/useTranscriptHistory.d.ts +34 -0
- package/dist/ui/hooks/useTranscriptHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useTranscriptHistory.js +96 -0
- package/dist/ui/hooks/useTranscriptHistory.js.map +1 -0
- package/dist/ui/item-helpers.d.ts +2 -0
- package/dist/ui/item-helpers.d.ts.map +1 -1
- package/dist/ui/item-helpers.js +16 -0
- package/dist/ui/item-helpers.js.map +1 -1
- package/dist/ui/layout-decisions.d.ts +3 -12
- package/dist/ui/layout-decisions.d.ts.map +1 -1
- package/dist/ui/layout-decisions.js +7 -64
- package/dist/ui/layout-decisions.js.map +1 -1
- package/dist/ui/prompt-routing.d.ts.map +1 -1
- package/dist/ui/prompt-routing.js +36 -2
- package/dist/ui/prompt-routing.js.map +1 -1
- package/dist/ui/prompt-routing.test.d.ts +2 -0
- package/dist/ui/prompt-routing.test.d.ts.map +1 -0
- package/dist/ui/prompt-routing.test.js +48 -0
- package/dist/ui/prompt-routing.test.js.map +1 -0
- package/dist/ui/render.d.ts +9 -6
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +3 -2
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/slash-command-images.test.js +3 -2
- package/dist/ui/slash-command-images.test.js.map +1 -1
- package/dist/ui/submit-prompt-command.d.ts +40 -0
- package/dist/ui/submit-prompt-command.d.ts.map +1 -0
- package/dist/ui/submit-prompt-command.js +92 -0
- package/dist/ui/submit-prompt-command.js.map +1 -0
- package/dist/ui/submit-slash-commands.d.ts +13 -0
- package/dist/ui/submit-slash-commands.d.ts.map +1 -0
- package/dist/ui/submit-slash-commands.js +36 -0
- package/dist/ui/submit-slash-commands.js.map +1 -0
- package/dist/ui/terminal-history-format.d.ts +1 -0
- package/dist/ui/terminal-history-format.d.ts.map +1 -1
- package/dist/ui/terminal-history-format.js +2 -1
- package/dist/ui/terminal-history-format.js.map +1 -1
- package/dist/ui/terminal-history-spacing.d.ts +1 -2
- package/dist/ui/terminal-history-spacing.d.ts.map +1 -1
- package/dist/ui/terminal-history-spacing.js +1 -27
- package/dist/ui/terminal-history-spacing.js.map +1 -1
- package/dist/ui/terminal-history-status-renderers.d.ts +2 -2
- package/dist/ui/terminal-history-status-renderers.d.ts.map +1 -1
- package/dist/ui/terminal-history-status-renderers.js +36 -17
- package/dist/ui/terminal-history-status-renderers.js.map +1 -1
- package/dist/ui/terminal-history.d.ts.map +1 -1
- package/dist/ui/terminal-history.js +59 -25
- package/dist/ui/terminal-history.js.map +1 -1
- package/dist/ui/terminal-history.test.js +2 -1
- package/dist/ui/terminal-history.test.js.map +1 -1
- package/dist/ui/tool-group-summary.d.ts +2 -2
- package/dist/ui/tool-group-summary.d.ts.map +1 -1
- package/dist/ui/tool-group-summary.js +18 -18
- package/dist/ui/tool-group-summary.js.map +1 -1
- package/dist/ui/transcript/GoalRows.d.ts +10 -0
- package/dist/ui/transcript/GoalRows.d.ts.map +1 -0
- package/dist/ui/transcript/GoalRows.js +35 -0
- package/dist/ui/transcript/GoalRows.js.map +1 -0
- package/dist/ui/transcript/MiscRows.d.ts +23 -0
- package/dist/ui/transcript/MiscRows.d.ts.map +1 -0
- package/dist/ui/transcript/MiscRows.js +41 -0
- package/dist/ui/transcript/MiscRows.js.map +1 -0
- package/dist/ui/transcript/StatusRow.d.ts +14 -0
- package/dist/ui/transcript/StatusRow.d.ts.map +1 -0
- package/dist/ui/transcript/StatusRow.js +14 -0
- package/dist/ui/transcript/StatusRow.js.map +1 -0
- package/dist/ui/transcript/ToolRows.d.ts +20 -0
- package/dist/ui/transcript/ToolRows.d.ts.map +1 -0
- package/dist/ui/transcript/ToolRows.js +25 -0
- package/dist/ui/transcript/ToolRows.js.map +1 -0
- package/dist/ui/transcript/TranscriptItemFrame.d.ts +8 -0
- package/dist/ui/transcript/TranscriptItemFrame.d.ts.map +1 -0
- package/dist/ui/transcript/TranscriptItemFrame.js +9 -0
- package/dist/ui/transcript/TranscriptItemFrame.js.map +1 -0
- package/dist/ui/transcript/TranscriptRenderer.d.ts +22 -0
- package/dist/ui/transcript/TranscriptRenderer.d.ts.map +1 -0
- package/dist/ui/transcript/TranscriptRenderer.js +84 -0
- package/dist/ui/transcript/TranscriptRenderer.js.map +1 -0
- package/dist/ui/transcript/presentation.d.ts +76 -0
- package/dist/ui/transcript/presentation.d.ts.map +1 -0
- package/dist/ui/transcript/presentation.js +109 -0
- package/dist/ui/transcript/presentation.js.map +1 -0
- package/dist/ui/transcript/spacing.d.ts +29 -0
- package/dist/ui/transcript/spacing.d.ts.map +1 -0
- package/dist/ui/transcript/spacing.js +91 -0
- package/dist/ui/transcript/spacing.js.map +1 -0
- package/dist/ui/transcript/spacing.test.d.ts +2 -0
- package/dist/ui/transcript/spacing.test.d.ts.map +1 -0
- package/dist/ui/transcript/spacing.test.js +21 -0
- package/dist/ui/transcript/spacing.test.js.map +1 -0
- package/dist/ui/transcript/tool-presentation.d.ts +12 -0
- package/dist/ui/transcript/tool-presentation.d.ts.map +1 -0
- package/dist/ui/transcript/tool-presentation.js +55 -0
- package/dist/ui/transcript/tool-presentation.js.map +1 -0
- package/dist/ui/tui-history-parity.test.js +6 -2
- package/dist/ui/tui-history-parity.test.js.map +1 -1
- package/dist/utils/plan-steps.d.ts.map +1 -1
- package/dist/utils/plan-steps.js +5 -1
- package/dist/utils/plan-steps.js.map +1 -1
- package/dist/utils/plan-steps.test.d.ts +2 -0
- package/dist/utils/plan-steps.test.d.ts.map +1 -0
- package/dist/utils/plan-steps.test.js +16 -0
- package/dist/utils/plan-steps.test.js.map +1 -0
- package/package.json +6 -6
- package/dist/core/repomap-budget.d.ts +0 -7
- package/dist/core/repomap-budget.d.ts.map +0 -1
- package/dist/core/repomap-budget.js +0 -10
- package/dist/core/repomap-budget.js.map +0 -1
- package/dist/core/repomap-budget.test.d.ts +0 -2
- package/dist/core/repomap-budget.test.d.ts.map +0 -1
- package/dist/core/repomap-budget.test.js +0 -26
- package/dist/core/repomap-budget.test.js.map +0 -1
- package/dist/core/repomap-context.d.ts +0 -11
- package/dist/core/repomap-context.d.ts.map +0 -1
- package/dist/core/repomap-context.js +0 -68
- package/dist/core/repomap-context.js.map +0 -1
- package/dist/core/repomap-context.test.d.ts +0 -2
- package/dist/core/repomap-context.test.d.ts.map +0 -1
- package/dist/core/repomap-context.test.js +0 -47
- package/dist/core/repomap-context.test.js.map +0 -1
- package/dist/core/repomap.d.ts +0 -74
- package/dist/core/repomap.d.ts.map +0 -1
- package/dist/core/repomap.js +0 -906
- package/dist/core/repomap.js.map +0 -1
- package/dist/core/repomap.test.d.ts +0 -2
- package/dist/core/repomap.test.d.ts.map +0 -1
- package/dist/core/repomap.test.js +0 -494
- package/dist/core/repomap.test.js.map +0 -1
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
import { decideGoalNextAction } from "./goal-controller.js";
|
|
2
|
+
import { buildGoalWorkerSystemPrompt } from "./goal-worker.js";
|
|
3
|
+
import { buildGoalSetupPromptFromPlanner, collectAssistantTextSince, } from "../ui/prompt-routing.js";
|
|
4
|
+
import { buildSystemPrompt } from "../system-prompt.js";
|
|
5
|
+
const ORIGINAL_GOAL_PROMPT_REFERENCE = "[original-goal-prompt]";
|
|
6
|
+
const CREATED_AT = "2024-01-01T00:00:00.000Z";
|
|
7
|
+
function baseRun(overrides) {
|
|
8
|
+
return {
|
|
9
|
+
id: "goal-overhead-harness",
|
|
10
|
+
title: "Goal overhead harness",
|
|
11
|
+
goal: "Optimize /goal to be faster, lower-token, less blocker-prone, and simpler while preserving durable delivery using [original-goal-prompt].",
|
|
12
|
+
status: "ready",
|
|
13
|
+
createdAt: CREATED_AT,
|
|
14
|
+
updatedAt: CREATED_AT,
|
|
15
|
+
projectPath: "/tmp/ggcoder-goal-overhead-harness",
|
|
16
|
+
successCriteria: [],
|
|
17
|
+
prerequisites: [],
|
|
18
|
+
harness: [],
|
|
19
|
+
evidencePlan: [],
|
|
20
|
+
tasks: [],
|
|
21
|
+
evidence: [
|
|
22
|
+
{
|
|
23
|
+
id: "planner-plan",
|
|
24
|
+
kind: "summary",
|
|
25
|
+
label: "Planner GOAL_PLAN",
|
|
26
|
+
content: "GOAL_PLAN\nresearch=local goal overhead harness\nsuccess=compare simple and complex /goal setup/controller overhead using [original-goal-prompt]\nEND_GOAL_PLAN",
|
|
27
|
+
createdAt: CREATED_AT,
|
|
28
|
+
},
|
|
29
|
+
],
|
|
30
|
+
blockers: [],
|
|
31
|
+
references: [
|
|
32
|
+
{
|
|
33
|
+
id: "original-goal-prompt",
|
|
34
|
+
kind: "prompt",
|
|
35
|
+
label: "Original Goal prompt",
|
|
36
|
+
source: "user",
|
|
37
|
+
content: "Users report /goal is slow, high-token, blocker-prone, and over-engineered; optimize it while preserving reliable durable delivery.",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
...overrides,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function proofGateCount(run) {
|
|
44
|
+
const verifierGate = run.verifier?.command ? 1 : 0;
|
|
45
|
+
const finalAuditGate = run.verifier?.lastResult?.status === "pass" ? 1 : 0;
|
|
46
|
+
return (run.prerequisites.length +
|
|
47
|
+
run.harness.length +
|
|
48
|
+
run.evidencePlan.length +
|
|
49
|
+
verifierGate +
|
|
50
|
+
finalAuditGate);
|
|
51
|
+
}
|
|
52
|
+
function blockerCount(run) {
|
|
53
|
+
const missingPrerequisites = run.prerequisites.filter((item) => item.status === "missing").length;
|
|
54
|
+
const blockedEvidence = run.evidencePlan.filter((item) => item.status === "blocked").length;
|
|
55
|
+
const blockedTasks = run.tasks.filter((item) => item.status === "blocked").length;
|
|
56
|
+
return run.blockers.length + missingPrerequisites + blockedEvidence + blockedTasks;
|
|
57
|
+
}
|
|
58
|
+
function promptCharCount(...prompts) {
|
|
59
|
+
return prompts.reduce((total, prompt) => total + (prompt?.length ?? 0), 0);
|
|
60
|
+
}
|
|
61
|
+
function measureControllerStage(stage, run) {
|
|
62
|
+
const decision = decideGoalNextAction(run);
|
|
63
|
+
const prompt = decision.kind === "create_task" ? decision.prompt : undefined;
|
|
64
|
+
return {
|
|
65
|
+
stage,
|
|
66
|
+
promptChars: promptCharCount(prompt),
|
|
67
|
+
taskCount: run.tasks.length,
|
|
68
|
+
blockerCount: blockerCount(run),
|
|
69
|
+
requiredProofGates: proofGateCount(run),
|
|
70
|
+
decisionKind: decision.kind,
|
|
71
|
+
decisionReasonChars: decision.reason.length,
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function scenarioTotals(scenario, stages) {
|
|
75
|
+
return {
|
|
76
|
+
scenario,
|
|
77
|
+
stageCount: stages.length,
|
|
78
|
+
promptChars: stages.reduce((total, stage) => total + stage.promptChars, 0),
|
|
79
|
+
taskCount: stages.reduce((total, stage) => total + stage.taskCount, 0),
|
|
80
|
+
blockerCount: stages.reduce((total, stage) => total + stage.blockerCount, 0),
|
|
81
|
+
requiredProofGates: stages.reduce((total, stage) => total + stage.requiredProofGates, 0),
|
|
82
|
+
stages,
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function measurePromptSetup(originalGoalPrompt, plannerOutput) {
|
|
86
|
+
const messages = [{ role: "assistant", content: plannerOutput }];
|
|
87
|
+
const collectedPlannerOutput = collectAssistantTextSince(messages, 0);
|
|
88
|
+
const setupPrompt = buildGoalSetupPromptFromPlanner({
|
|
89
|
+
originalGoalPrompt,
|
|
90
|
+
plannerOutput: collectedPlannerOutput,
|
|
91
|
+
});
|
|
92
|
+
return {
|
|
93
|
+
stage: "prompt-routing: planner-to-setup",
|
|
94
|
+
promptChars: promptCharCount(originalGoalPrompt, collectedPlannerOutput, setupPrompt),
|
|
95
|
+
taskCount: 0,
|
|
96
|
+
blockerCount: 0,
|
|
97
|
+
requiredProofGates: 0,
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
export async function runGoalOverheadHarness() {
|
|
101
|
+
const simpleOriginalPrompt = `/goal Fix a small local bug. ${ORIGINAL_GOAL_PROMPT_REFERENCE}`;
|
|
102
|
+
const complexOriginalPrompt = `/goal Optimize the GG Coder /goal system using ${ORIGINAL_GOAL_PROMPT_REFERENCE}: make runs faster, lower-token, less blocker-prone, and simpler while preserving durable delivery.`;
|
|
103
|
+
const simpleRun = baseRun({
|
|
104
|
+
successCriteria: [
|
|
105
|
+
"Local verifier proves the small bug is fixed and mentions [original-goal-prompt].",
|
|
106
|
+
],
|
|
107
|
+
evidencePlan: [
|
|
108
|
+
{
|
|
109
|
+
id: "local-proof",
|
|
110
|
+
label: "Local proof for [original-goal-prompt]",
|
|
111
|
+
mechanism: "test",
|
|
112
|
+
description: "A single local command proves the change.",
|
|
113
|
+
status: "ready",
|
|
114
|
+
evidence: "local command available",
|
|
115
|
+
command: "pnpm test --filter local-proof",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
verifier: {
|
|
119
|
+
description: "Run one local verifier for [original-goal-prompt].",
|
|
120
|
+
command: "pnpm test --filter local-proof",
|
|
121
|
+
},
|
|
122
|
+
});
|
|
123
|
+
const complexRun = baseRun({
|
|
124
|
+
successCriteria: [
|
|
125
|
+
"Compare representative simple vs complex Goal overhead by stage count and prompt characters using [original-goal-prompt].",
|
|
126
|
+
"Measure task count, blocker count, and required proof gates before changing the flow.",
|
|
127
|
+
"Preserve durable verifier and final audit reliability.",
|
|
128
|
+
],
|
|
129
|
+
prerequisites: [
|
|
130
|
+
{
|
|
131
|
+
id: "external-service",
|
|
132
|
+
label: "External benchmark service",
|
|
133
|
+
status: "missing",
|
|
134
|
+
instructions: "Provide paid benchmark credentials.",
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
harness: [
|
|
138
|
+
{
|
|
139
|
+
id: "missing-harness",
|
|
140
|
+
label: "Synthetic /goal overhead harness",
|
|
141
|
+
description: "Compares setup/controller overhead.",
|
|
142
|
+
},
|
|
143
|
+
],
|
|
144
|
+
evidencePlan: [
|
|
145
|
+
{
|
|
146
|
+
id: "overhead-metrics",
|
|
147
|
+
label: "Synthetic /goal overhead metrics for [original-goal-prompt]",
|
|
148
|
+
mechanism: "test",
|
|
149
|
+
description: "Captures stage count, prompt characters, task count, blocker count, and required proof gates.",
|
|
150
|
+
status: "planned",
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "audit-proof",
|
|
154
|
+
label: "Final audit proof gate",
|
|
155
|
+
mechanism: "command",
|
|
156
|
+
description: "Confirms reliable durable delivery remains present.",
|
|
157
|
+
status: "planned",
|
|
158
|
+
},
|
|
159
|
+
],
|
|
160
|
+
tasks: [
|
|
161
|
+
{
|
|
162
|
+
id: "task-1",
|
|
163
|
+
title: "Research hotspots",
|
|
164
|
+
prompt: "Inspect prompt-routing.ts, system-prompt.ts, goal-controller.ts, and goal-worker.ts for [original-goal-prompt].",
|
|
165
|
+
status: "done",
|
|
166
|
+
attempts: 1,
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
id: "task-2",
|
|
170
|
+
title: "Implement simplification",
|
|
171
|
+
prompt: "Reduce overhead while preserving [original-goal-prompt] reliability.",
|
|
172
|
+
status: "pending",
|
|
173
|
+
attempts: 0,
|
|
174
|
+
dependsOn: ["task-1"],
|
|
175
|
+
},
|
|
176
|
+
],
|
|
177
|
+
blockers: ["Unnecessary missing external prerequisite should be visible to blocker metrics."],
|
|
178
|
+
});
|
|
179
|
+
const simpleStages = [
|
|
180
|
+
measurePromptSetup(simpleOriginalPrompt, "GOAL_PLAN\nresearch=none\nsuccess=single local verifier using [original-goal-prompt]\nEND_GOAL_PLAN"),
|
|
181
|
+
measureControllerStage("controller: ready-to-verify", simpleRun),
|
|
182
|
+
{
|
|
183
|
+
stage: "worker: system-prompt",
|
|
184
|
+
promptChars: promptCharCount(buildGoalWorkerSystemPrompt({
|
|
185
|
+
cwd: simpleRun.projectPath,
|
|
186
|
+
goalRunId: simpleRun.id,
|
|
187
|
+
goalTaskId: "simple-task",
|
|
188
|
+
taskTitle: "Simple local work",
|
|
189
|
+
})),
|
|
190
|
+
taskCount: 1,
|
|
191
|
+
blockerCount: 0,
|
|
192
|
+
requiredProofGates: proofGateCount(simpleRun),
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
stage: "system: goal-mode prompt",
|
|
196
|
+
promptChars: promptCharCount(await buildSystemPrompt(simpleRun.projectPath, undefined, undefined, undefined, undefined, undefined, "setup")),
|
|
197
|
+
taskCount: 0,
|
|
198
|
+
blockerCount: 0,
|
|
199
|
+
requiredProofGates: 0,
|
|
200
|
+
},
|
|
201
|
+
];
|
|
202
|
+
const complexStages = [
|
|
203
|
+
measurePromptSetup(complexOriginalPrompt, "GOAL_PLAN\nresearch=prompt-routing.ts system-prompt.ts goal-controller.ts goal-worker.ts\nsuccess=stage count, prompt chars, task count, blocker count, proof gates for [original-goal-prompt]\nproof=synthetic harness\nEND_GOAL_PLAN"),
|
|
204
|
+
measureControllerStage("controller: blocked-prerequisite", complexRun),
|
|
205
|
+
measureControllerStage("controller: evidence-instrumentation", baseRun({
|
|
206
|
+
...complexRun,
|
|
207
|
+
prerequisites: [],
|
|
208
|
+
blockers: [],
|
|
209
|
+
})),
|
|
210
|
+
measureControllerStage("controller: harness-instrumentation", baseRun({
|
|
211
|
+
...complexRun,
|
|
212
|
+
prerequisites: [],
|
|
213
|
+
blockers: [],
|
|
214
|
+
evidencePlan: complexRun.evidencePlan.map((item) => ({
|
|
215
|
+
...item,
|
|
216
|
+
status: "ready",
|
|
217
|
+
evidence: "ready for harness comparison",
|
|
218
|
+
})),
|
|
219
|
+
})),
|
|
220
|
+
{
|
|
221
|
+
stage: "worker: system-prompt",
|
|
222
|
+
promptChars: promptCharCount(buildGoalWorkerSystemPrompt({
|
|
223
|
+
cwd: complexRun.projectPath,
|
|
224
|
+
goalRunId: complexRun.id,
|
|
225
|
+
goalTaskId: "complex-task",
|
|
226
|
+
taskTitle: "Complex optimization work",
|
|
227
|
+
})),
|
|
228
|
+
taskCount: complexRun.tasks.length,
|
|
229
|
+
blockerCount: blockerCount(complexRun),
|
|
230
|
+
requiredProofGates: proofGateCount(complexRun),
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
stage: "system: goal-mode prompt",
|
|
234
|
+
promptChars: promptCharCount(await buildSystemPrompt(complexRun.projectPath, undefined, undefined, undefined, undefined, undefined, "setup")),
|
|
235
|
+
taskCount: 0,
|
|
236
|
+
blockerCount: 0,
|
|
237
|
+
requiredProofGates: 0,
|
|
238
|
+
},
|
|
239
|
+
];
|
|
240
|
+
const simple = scenarioTotals("simple", simpleStages);
|
|
241
|
+
const complex = scenarioTotals("complex", complexStages);
|
|
242
|
+
return {
|
|
243
|
+
intendedExperience: "A /goal run should move from the user's original-goal-prompt to local work, verifier evidence, and durable delivery with minimal stages, compact prompts, and no avoidable blockers when local proof is possible.",
|
|
244
|
+
failureModes: [
|
|
245
|
+
"Prompt-routing or system/worker prompts inflate token use before any useful work begins.",
|
|
246
|
+
"Controller creates extra instrumentation/audit tasks for simple local goals instead of proceeding A-to-Z.",
|
|
247
|
+
"Missing or blocked prerequisites stop a run even though local/free evidence could be produced.",
|
|
248
|
+
"Proof gates multiply beyond the verifier/audit needed for reliable durable delivery.",
|
|
249
|
+
],
|
|
250
|
+
observedSignals: [
|
|
251
|
+
"stageCount",
|
|
252
|
+
"promptChars",
|
|
253
|
+
"taskCount",
|
|
254
|
+
"blockerCount",
|
|
255
|
+
"requiredProofGates",
|
|
256
|
+
"controller decision kind and reason length",
|
|
257
|
+
],
|
|
258
|
+
scenarios: [simple, complex],
|
|
259
|
+
comparisons: {
|
|
260
|
+
promptCharsComplexToSimpleRatio: Number((complex.promptChars / simple.promptChars).toFixed(2)),
|
|
261
|
+
stageCountDelta: complex.stageCount - simple.stageCount,
|
|
262
|
+
taskCountDelta: complex.taskCount - simple.taskCount,
|
|
263
|
+
blockerCountDelta: complex.blockerCount - simple.blockerCount,
|
|
264
|
+
requiredProofGateDelta: complex.requiredProofGates - simple.requiredProofGates,
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
//# sourceMappingURL=goal-overhead-harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-overhead-harness.js","sourceRoot":"","sources":["../../src/core/goal-overhead-harness.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,2BAA2B,EAAE,MAAM,kBA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tB;KACF,CAAC;IAEF,MAAM,MAAM,GAAG,cAAc,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAC;IACtD,MAAM,OAAO,GAAG,cAAc,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;IAEzD,OAAO;QACL,kBAAkB,EAChB,mNAAmN;QACrN,YAAY,EAAE;YACZ,0FAA0F;YAC1F,2GAA2G;YAC3G,gGAAgG;YAChG,sFAAsF;SACvF;QACD,eAAe,EAAE;YACf,YAAY;YACZ,aAAa;YACb,WAAW;YACX,cAAc;YACd,oBAAoB;YACpB,4CAA4C;SAC7C;QACD,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC;QAC5B,WAAW,EAAE;YACX,+BAA+B,EAAE,MAAM,CACrC,CAAC,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CACtD;YACD,eAAe,EAAE,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU;YACvD,cAAc,EAAE,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS;YACpD,iBAAiB,EAAE,OAAO,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY;YAC7D,sBAAsB,EAAE,OAAO,CAAC,kBAAkB,GAAG,MAAM,CAAC,kBAAkB;SAC/E;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -92,6 +92,7 @@ export interface GoalEvidence {
|
|
|
92
92
|
export interface GoalVerifier {
|
|
93
93
|
description: string;
|
|
94
94
|
command?: string;
|
|
95
|
+
cwd?: string;
|
|
95
96
|
lastResult?: GoalVerificationResult;
|
|
96
97
|
}
|
|
97
98
|
export interface GoalRun {
|
|
@@ -183,7 +184,9 @@ export declare function createGoalTask(input: GoalTaskInput): GoalTask;
|
|
|
183
184
|
export declare function createGoalEvidence(input: GoalEvidenceInput): GoalEvidence;
|
|
184
185
|
export declare function createGoalRun(cwd: string, input: GoalRunInput): GoalRun;
|
|
185
186
|
export declare function loadGoalRuns(cwd: string): Promise<GoalRun[]>;
|
|
187
|
+
export declare function loadGoalRunsSync(cwd: string): GoalRun[];
|
|
186
188
|
export declare function saveGoalRuns(cwd: string, runs: readonly GoalRun[]): Promise<void>;
|
|
189
|
+
export declare function saveGoalRunsSync(cwd: string, runs: readonly GoalRun[]): void;
|
|
187
190
|
export declare function reconcileActiveGoalRuns(cwd: string, options?: ReconcileActiveGoalRunsOptions): Promise<GoalReconciliationResult>;
|
|
188
191
|
export declare function upsertGoalRun(cwd: string, input: GoalRun | GoalRunInput): Promise<GoalRun>;
|
|
189
192
|
export declare function getGoalRun(cwd: string, id: string): Promise<GoalRun | null>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"goal-store.d.ts","sourceRoot":"","sources":["../../src/core/goal-store.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"goal-store.d.ts","sourceRoot":"","sources":["../../src/core/goal-store.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAC;AAEnE,MAAM,MAAM,aAAa,GACrB,OAAO,GACP,SAAS,GACT,OAAO,GACP,SAAS,GACT,WAAW,GACX,QAAQ,GACR,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEjG,MAAM,MAAM,qBAAqB,GAC7B,oBAAoB,GACpB,oBAAoB,GACpB,QAAQ,GACR,QAAQ,CAAC;AAEb,MAAM,MAAM,sBAAsB,GAAG,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAEnE,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,SAAS,GAAG,YAAY,GAAG,MAAM,GAAG,SAAS,CAAC;AAErF,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEjE,MAAM,WAAW,sBAAsB;IACrC,MAA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AAO,GAAG,IAAI,CAAC,CAkBzB;AAED,wBAAsB,cAAc,CAClC,GAAG,EAAE,MAAM,EACX,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,aAAa,GACvC,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAyCzB;AAED,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAE1E;AAED,wBAAgB,4BAA4B,CAAC,aAAa,EAAE,SAAS,gBAAgB,EAAE,GAAG,OAAO,CAEhG;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAElE;AAED,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAUhF;AAED,wBAAgB,kCAAkC,CAChD,aAAa,EAAE,SAAS,gBAAgB,EAAE,GACzC,MAAM,CAMR;AAED,wBAAgB,+BAA+B,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAEpE;AAED,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,SAAS,OAAO,EAAE,GAAG,UAAU,CAsBhF;AAED,wBAAsB,mBAAmB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAE1E;AAkED,wBAAsB,wBAAwB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAIjG"}
|
package/dist/core/goal-store.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
-
import {
|
|
2
|
+
import { readFileSync, writeFileSync } from "node:fs";
|
|
3
|
+
import { mkdir, open, readdir, readFile, rename, rm, stat, writeFile } from "node:fs/promises";
|
|
3
4
|
import { homedir } from "node:os";
|
|
4
5
|
import { basename, join, resolve } from "node:path";
|
|
5
6
|
const GOALS_BASE_ENV = "GG_GOALS_BASE";
|
|
@@ -294,6 +295,7 @@ function normalizeVerifier(value) {
|
|
|
294
295
|
return {
|
|
295
296
|
description,
|
|
296
297
|
...(optionalString(value.command) ? { command: optionalString(value.command) } : {}),
|
|
298
|
+
...(optionalString(value.cwd) ? { cwd: optionalString(value.cwd) } : {}),
|
|
297
299
|
...(normalizeVerification(value.lastResult)
|
|
298
300
|
? { lastResult: normalizeVerification(value.lastResult) }
|
|
299
301
|
: {}),
|
|
@@ -440,10 +442,43 @@ async function writeGoalRunsFile(cwd, runs) {
|
|
|
440
442
|
await Promise.all(sorted.map((run) => writeGoalProgressJournalFromRun(normalizedCwd, run)));
|
|
441
443
|
});
|
|
442
444
|
}
|
|
445
|
+
const GOAL_STORE_LOCK_WAIT_MS = 10_000;
|
|
446
|
+
const GOAL_STORE_STALE_LOCK_MS = 30_000;
|
|
447
|
+
function isProcessAlive(pid) {
|
|
448
|
+
if (!Number.isInteger(pid) || pid <= 0)
|
|
449
|
+
return false;
|
|
450
|
+
try {
|
|
451
|
+
process.kill(pid, 0);
|
|
452
|
+
return true;
|
|
453
|
+
}
|
|
454
|
+
catch (error) {
|
|
455
|
+
const code = error.code;
|
|
456
|
+
return code === "EPERM";
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
async function shouldRemoveGoalStoreLock(lockPath) {
|
|
460
|
+
let lockStats;
|
|
461
|
+
try {
|
|
462
|
+
lockStats = await stat(lockPath);
|
|
463
|
+
}
|
|
464
|
+
catch {
|
|
465
|
+
return false;
|
|
466
|
+
}
|
|
467
|
+
if (Date.now() - lockStats.mtimeMs > GOAL_STORE_STALE_LOCK_MS)
|
|
468
|
+
return true;
|
|
469
|
+
try {
|
|
470
|
+
const [pidLine] = (await readFile(lockPath, "utf-8")).split("\n");
|
|
471
|
+
const pid = Number(pidLine?.trim());
|
|
472
|
+
return !isProcessAlive(pid);
|
|
473
|
+
}
|
|
474
|
+
catch {
|
|
475
|
+
return false;
|
|
476
|
+
}
|
|
477
|
+
}
|
|
443
478
|
async function withGoalStoreLock(dir, fn) {
|
|
444
479
|
await mkdir(dir, { recursive: true });
|
|
445
480
|
const lockPath = join(dir, "goals.lock");
|
|
446
|
-
const deadline = Date.now() +
|
|
481
|
+
const deadline = Date.now() + GOAL_STORE_LOCK_WAIT_MS;
|
|
447
482
|
for (;;) {
|
|
448
483
|
let handle;
|
|
449
484
|
try {
|
|
@@ -459,7 +494,13 @@ async function withGoalStoreLock(dir, fn) {
|
|
|
459
494
|
}
|
|
460
495
|
catch (err) {
|
|
461
496
|
await handle?.close().catch(() => undefined);
|
|
462
|
-
if (err.code !== "EEXIST"
|
|
497
|
+
if (err.code !== "EEXIST")
|
|
498
|
+
throw err;
|
|
499
|
+
if (await shouldRemoveGoalStoreLock(lockPath)) {
|
|
500
|
+
await rm(lockPath, { force: true });
|
|
501
|
+
continue;
|
|
502
|
+
}
|
|
503
|
+
if (Date.now() > deadline)
|
|
463
504
|
throw err;
|
|
464
505
|
await new Promise((resolve) => setTimeout(resolve, 25));
|
|
465
506
|
}
|
|
@@ -590,9 +631,29 @@ export function createGoalRun(cwd, input) {
|
|
|
590
631
|
export async function loadGoalRuns(cwd) {
|
|
591
632
|
return readGoalRunsFile(cwd);
|
|
592
633
|
}
|
|
634
|
+
export function loadGoalRunsSync(cwd) {
|
|
635
|
+
const normalizedCwd = normalizeProjectPath(cwd);
|
|
636
|
+
try {
|
|
637
|
+
const data = readFileSync(join(projectDir(normalizedCwd), "goals.json"), "utf-8");
|
|
638
|
+
const parsed = JSON.parse(data);
|
|
639
|
+
if (!Array.isArray(parsed))
|
|
640
|
+
return [];
|
|
641
|
+
return sortNewestFirst(parsed
|
|
642
|
+
.map((item) => normalizeRun(item, normalizedCwd))
|
|
643
|
+
.filter((run) => run !== null));
|
|
644
|
+
}
|
|
645
|
+
catch {
|
|
646
|
+
return [];
|
|
647
|
+
}
|
|
648
|
+
}
|
|
593
649
|
export async function saveGoalRuns(cwd, runs) {
|
|
594
650
|
return enqueueWrite(() => writeGoalRunsFile(cwd, runs));
|
|
595
651
|
}
|
|
652
|
+
export function saveGoalRunsSync(cwd, runs) {
|
|
653
|
+
const normalizedCwd = normalizeProjectPath(cwd);
|
|
654
|
+
const sorted = sortNewestFirst([...runs]);
|
|
655
|
+
writeFileSync(join(projectDir(normalizedCwd), "goals.json"), JSON.stringify(sorted, null, 2) + "\n", "utf-8");
|
|
656
|
+
}
|
|
596
657
|
export async function reconcileActiveGoalRuns(cwd, options = {}) {
|
|
597
658
|
return enqueueWrite(async () => {
|
|
598
659
|
const runs = await loadGoalRuns(cwd);
|