@prestyj/cli 5.16.2 → 5.19.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/README.md +2 -1
- package/assets/skills/refactoring/SKILL.md +64 -0
- package/assets/skills/refactoring/references/agent-pitfalls.md +43 -0
- package/assets/skills/refactoring/references/legacy.md +49 -0
- package/assets/skills/refactoring/references/smells.md +71 -0
- package/dist/app-sidecar-sessions.d.ts +0 -1
- package/dist/app-sidecar.d.ts +0 -1
- package/dist/app-sidecar.js +40 -9
- package/dist/app-sidecar.js.map +1 -1
- package/dist/chat-agents/general.d.ts +0 -1
- package/dist/chat-agents/index.d.ts +0 -1
- package/dist/chat-agents/jiwa.d.ts +0 -1
- package/dist/chat-agents/memory.d.ts +0 -1
- package/dist/chat-agents/research.d.ts +0 -1
- package/dist/chat-agents/shared.d.ts +0 -1
- package/dist/chat-agents/therapist.d.ts +0 -1
- package/dist/chat-agents/types.d.ts +0 -1
- package/dist/cli/auth.d.ts +0 -1
- package/dist/cli/command-routing.d.ts +0 -1
- package/dist/cli/mcp.d.ts +0 -1
- package/dist/cli/mcp.js.map +1 -1
- package/dist/cli/pixel.d.ts +0 -1
- package/dist/cli/shared.d.ts +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/config.d.ts +0 -1
- package/dist/core/agent-notifications.d.ts +0 -1
- package/dist/core/agent-session.d.ts +45 -2
- package/dist/core/agent-session.js +521 -41
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +0 -1
- package/dist/core/api-benchmark.d.ts +0 -1
- package/dist/core/ask-user.d.ts +0 -1
- package/dist/core/auth/index.d.ts +0 -1
- package/dist/core/auth-providers.d.ts +0 -1
- package/dist/core/auth-storage.d.ts +0 -1
- package/dist/core/auto-update.d.ts +0 -1
- package/dist/core/autopilot-cycle.d.ts +7 -4
- package/dist/core/autopilot-cycle.js +43 -6
- package/dist/core/autopilot-cycle.js.map +1 -1
- package/dist/core/autopilot-gate.d.ts +0 -1
- package/dist/core/autopilot-gate.js.map +1 -1
- package/dist/core/autopilot-verdict.d.ts +2 -1
- package/dist/core/autopilot-verdict.js +25 -0
- package/dist/core/autopilot-verdict.js.map +1 -1
- package/dist/core/bash-spawn-benchmark.d.ts +0 -1
- package/dist/core/bundled-agents.d.ts +0 -1
- package/dist/core/cache-warm-benchmark.d.ts +0 -1
- package/dist/core/checkpoint-store.d.ts +0 -1
- package/dist/core/claude-code-version.d.ts +0 -1
- package/dist/core/code-retrieval-chunkers.d.ts +0 -1
- package/dist/core/code-retrieval.d.ts +0 -1
- package/dist/core/compaction/active-context.d.ts +0 -1
- package/dist/core/compaction/compactor.d.ts +34 -1
- package/dist/core/compaction/compactor.js +161 -2
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/policy.d.ts +0 -1
- package/dist/core/compaction/query-aware-selector.d.ts +0 -1
- package/dist/core/compaction/token-estimator.d.ts +0 -1
- package/dist/core/compaction/tool-result-pruner.d.ts +0 -1
- package/dist/core/context-limits.d.ts +0 -1
- package/dist/core/custom-commands.d.ts +0 -1
- package/dist/core/encode-cwd.d.ts +0 -1
- package/dist/core/env-delta.d.ts +0 -1
- package/dist/core/event-bus.d.ts +5 -1
- package/dist/core/event-bus.js.map +1 -1
- package/dist/core/extensions/loader.d.ts +0 -1
- package/dist/core/extensions/plugin-bundles.d.ts +0 -1
- package/dist/core/extensions/types.d.ts +0 -1
- package/dist/core/fast-apply-benchmark.d.ts +0 -1
- package/dist/core/file-lock.d.ts +0 -1
- package/dist/core/foreign-session-import.d.ts +0 -1
- package/dist/core/foreign-transcript-blocks.d.ts +0 -1
- package/dist/core/goal-controller.d.ts +0 -1
- package/dist/core/goal-prerequisites.d.ts +0 -1
- package/dist/core/goal-store.d.ts +0 -1
- package/dist/core/goal-store.js.map +1 -1
- package/dist/core/goal-verifier.d.ts +0 -1
- package/dist/core/goal-verifier.js.map +1 -1
- package/dist/core/goal-worker.d.ts +0 -1
- package/dist/core/goal-worker.js.map +1 -1
- package/dist/core/hashline-edit-benchmark.d.ts +0 -1
- package/dist/core/hashline.d.ts +0 -1
- package/dist/core/ideal-review-subagent.d.ts +42 -0
- package/dist/core/ideal-review-subagent.js +95 -0
- package/dist/core/ideal-review-subagent.js.map +1 -0
- package/dist/core/ideal-review.d.ts +0 -1
- package/dist/core/ideal-review.js +18 -5
- package/dist/core/ideal-review.js.map +1 -1
- package/dist/core/index.d.ts +0 -1
- package/dist/core/internal-diagnostics.d.ts +142 -0
- package/dist/core/internal-diagnostics.js +450 -0
- package/dist/core/internal-diagnostics.js.map +1 -0
- package/dist/core/language-detector.d.ts +0 -1
- package/dist/core/local-endpoint-store.d.ts +0 -1
- package/dist/core/logger.d.ts +0 -1
- package/dist/core/loop-breaker.d.ts +0 -1
- package/dist/core/lsp/client.d.ts +8 -6
- package/dist/core/lsp/client.js +68 -18
- package/dist/core/lsp/client.js.map +1 -1
- package/dist/core/lsp/edit-telemetry.d.ts +0 -1
- package/dist/core/lsp/format.d.ts +0 -1
- package/dist/core/lsp/jsonrpc.d.ts +0 -1
- package/dist/core/lsp/manager.d.ts +16 -2
- package/dist/core/lsp/manager.js +170 -9
- package/dist/core/lsp/manager.js.map +1 -1
- package/dist/core/lsp/pool.d.ts +0 -1
- package/dist/core/lsp/pool.js.map +1 -1
- package/dist/core/lsp/servers.d.ts +0 -1
- package/dist/core/lsp/test-support.d.ts +0 -1
- package/dist/core/mcp/catalog-cache.d.ts +0 -1
- package/dist/core/mcp/client.d.ts +0 -1
- package/dist/core/mcp/content.d.ts +0 -1
- package/dist/core/mcp/defaults.d.ts +0 -1
- package/dist/core/mcp/deferred-catalog.d.ts +0 -1
- package/dist/core/mcp/elicitation-bridge.d.ts +0 -1
- package/dist/core/mcp/index.d.ts +0 -1
- package/dist/core/mcp/loopback.d.ts +0 -1
- package/dist/core/mcp/oauth-provider.d.ts +0 -1
- package/dist/core/mcp/oauth-store.d.ts +0 -1
- package/dist/core/mcp/parse-add-command.d.ts +0 -1
- package/dist/core/mcp/resolve-stdio.d.ts +0 -1
- package/dist/core/mcp/shared-pool.d.ts +0 -1
- package/dist/core/mcp/store.d.ts +0 -1
- package/dist/core/mcp/types.d.ts +0 -1
- package/dist/core/message-images.d.ts +0 -1
- package/dist/core/model-registry.d.ts +0 -1
- package/dist/core/network-guard.d.ts +0 -1
- package/dist/core/nolan-context.d.ts +5 -1
- package/dist/core/nolan-context.js +9 -2
- package/dist/core/nolan-context.js.map +1 -1
- package/dist/core/nolan-model.d.ts +0 -1
- package/dist/core/nolan-prompt.d.ts +0 -1
- package/dist/core/nolan-prompt.js +32 -14
- package/dist/core/nolan-prompt.js.map +1 -1
- package/dist/core/oauth/anthropic.d.ts +0 -1
- package/dist/core/oauth/gemini.d.ts +0 -1
- package/dist/core/oauth/kimi.d.ts +0 -1
- package/dist/core/oauth/openai.d.ts +0 -1
- package/dist/core/oauth/pkce.d.ts +0 -1
- package/dist/core/oauth/types.d.ts +0 -1
- package/dist/core/oauth/xai.d.ts +0 -1
- package/dist/core/parked-requests.d.ts +0 -1
- package/dist/core/persistent-shell.d.ts +0 -1
- package/dist/core/persistent-shell.js +3 -1
- package/dist/core/persistent-shell.js.map +1 -1
- package/dist/core/pixel-fix-agent.d.ts +0 -1
- package/dist/core/pixel-fix.d.ts +0 -1
- package/dist/core/pixel.d.ts +0 -1
- package/dist/core/platform-clis.d.ts +0 -1
- package/dist/core/process-gate.d.ts +0 -1
- package/dist/core/process-manager.d.ts +7 -4
- package/dist/core/process-manager.js +23 -7
- package/dist/core/process-manager.js.map +1 -1
- package/dist/core/progress/engine.d.ts +0 -1
- package/dist/core/progress/git-xp.d.ts +0 -1
- package/dist/core/progress/ranks.d.ts +0 -1
- package/dist/core/progress/rebuild.d.ts +0 -1
- package/dist/core/progress/store.d.ts +0 -1
- package/dist/core/progress/types.d.ts +0 -1
- package/dist/core/project-discovery.d.ts +0 -1
- package/dist/core/prompt-commands.d.ts +0 -1
- package/dist/core/radio.d.ts +0 -1
- package/dist/core/regrounding.d.ts +0 -1
- package/dist/core/resolve-start.d.ts +0 -1
- package/dist/core/run-claim.d.ts +0 -1
- package/dist/core/run-lifecycle.d.ts +0 -1
- package/dist/core/runtime-mode.d.ts +0 -1
- package/dist/core/sandbox-domains.d.ts +0 -1
- package/dist/core/sandbox-feedback.d.ts +0 -1
- package/dist/core/sandbox.d.ts +0 -1
- package/dist/core/semantic-loop-check.d.ts +58 -0
- package/dist/core/semantic-loop-check.js +103 -0
- package/dist/core/semantic-loop-check.js.map +1 -0
- package/dist/core/semantic-search-benchmark.d.ts +0 -1
- package/dist/core/session-compaction.d.ts +0 -1
- package/dist/core/session-export.d.ts +0 -1
- package/dist/core/session-history.d.ts +0 -1
- package/dist/core/session-manager.d.ts +1 -2
- package/dist/core/session-preview.d.ts +0 -1
- package/dist/core/session-storage.d.ts +0 -1
- package/dist/core/settings-manager.d.ts +0 -1
- package/dist/core/setup-history.d.ts +0 -1
- package/dist/core/shell-path.d.ts +0 -1
- package/dist/core/shell.d.ts +0 -1
- package/dist/core/shell.js +6 -3
- package/dist/core/shell.js.map +1 -1
- package/dist/core/shutdown.d.ts +0 -1
- package/dist/core/skills.d.ts +0 -1
- package/dist/core/slash-commands.d.ts +3 -2
- package/dist/core/slash-commands.js +6 -4
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-maps.d.ts +0 -1
- package/dist/core/speed-benchmark.d.ts +0 -1
- package/dist/core/steering.d.ts +0 -1
- package/dist/core/steroids.d.ts +0 -1
- package/dist/core/style-packs/index.d.ts +0 -1
- package/dist/core/style-packs/packs.d.ts +0 -1
- package/dist/core/subagent-manager.d.ts +7 -2
- package/dist/core/subagent-manager.js +15 -5
- package/dist/core/subagent-manager.js.map +1 -1
- package/dist/core/subagent-policy.d.ts +0 -1
- package/dist/core/subagent-store.d.ts +0 -1
- package/dist/core/subagent-turn-record.d.ts +0 -1
- package/dist/core/task-store.d.ts +0 -1
- package/dist/core/telegram-config.d.ts +0 -1
- package/dist/core/telegram.d.ts +0 -1
- package/dist/core/thinking-level.d.ts +0 -1
- package/dist/core/verification-evidence.d.ts +11 -2
- package/dist/core/verification-evidence.js +96 -22
- package/dist/core/verification-evidence.js.map +1 -1
- package/dist/core/verification-gate.d.ts +75 -36
- package/dist/core/verification-gate.js +301 -37
- package/dist/core/verification-gate.js.map +1 -1
- package/dist/core/verification-snapshot.d.ts +7 -0
- package/dist/core/verification-snapshot.js +111 -0
- package/dist/core/verification-snapshot.js.map +1 -0
- package/dist/core/verify-commands.d.ts +0 -1
- package/dist/core/voice-transcriber.d.ts +0 -1
- package/dist/core/workspace-guard.d.ts +0 -1
- package/dist/hf-pull.d.ts +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/interactive.d.ts +0 -1
- package/dist/modes/acp-mode.d.ts +0 -1
- package/dist/modes/agent-home-mode.d.ts +0 -1
- package/dist/modes/index.d.ts +0 -1
- package/dist/modes/json-mode.d.ts +0 -1
- package/dist/modes/print-mode.d.ts +0 -1
- package/dist/modes/rpc-mode.d.ts +0 -1
- package/dist/modes/serve-mode.d.ts +0 -1
- package/dist/modes/subagent-worker-mode.d.ts +0 -1
- package/dist/session.d.ts +0 -1
- package/dist/system-prompt.d.ts +0 -1
- package/dist/system-prompt.js +53 -124
- package/dist/system-prompt.js.map +1 -1
- package/dist/test-support/fake-home.d.ts +0 -1
- package/dist/tools/ask-user.d.ts +0 -1
- package/dist/tools/bash.d.ts +0 -1
- package/dist/tools/bash.js +9 -4
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/code-nav.d.ts +0 -1
- package/dist/tools/code-skeleton.d.ts +0 -1
- package/dist/tools/compress.d.ts +0 -1
- package/dist/tools/edit-diff.d.ts +19 -2
- package/dist/tools/edit-diff.js +16 -3
- package/dist/tools/edit-diff.js.map +1 -1
- package/dist/tools/edit.d.ts +1 -2
- package/dist/tools/edit.js +36 -12
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/enter-plan.d.ts +0 -1
- package/dist/tools/exit-plan.d.ts +0 -1
- package/dist/tools/find.d.ts +0 -1
- package/dist/tools/generate-image.d.ts +5 -1
- package/dist/tools/generate-image.js +25 -7
- package/dist/tools/generate-image.js.map +1 -1
- package/dist/tools/goals.d.ts +0 -1
- package/dist/tools/grep.d.ts +0 -1
- package/dist/tools/html-extract.d.ts +0 -1
- package/dist/tools/index.d.ts +3 -2
- package/dist/tools/index.js +3 -1
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/ls.d.ts +0 -1
- package/dist/tools/operations.d.ts +0 -1
- package/dist/tools/overflow.d.ts +0 -1
- package/dist/tools/path-utils.d.ts +0 -1
- package/dist/tools/pdf-extract.d.ts +0 -1
- package/dist/tools/prompt-hints.d.ts +0 -1
- package/dist/tools/prompt-hints.js +1 -1
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-only-bash.d.ts +0 -1
- package/dist/tools/read-tracker.d.ts +0 -1
- package/dist/tools/read.d.ts +0 -1
- package/dist/tools/safe-env.d.ts +0 -1
- package/dist/tools/screenshot.d.ts +0 -1
- package/dist/tools/search-code.d.ts +0 -1
- package/dist/tools/session-stats.d.ts +26 -0
- package/dist/tools/session-stats.js +51 -0
- package/dist/tools/session-stats.js.map +1 -0
- package/dist/tools/skill.d.ts +0 -1
- package/dist/tools/skill.js +3 -5
- package/dist/tools/skill.js.map +1 -1
- package/dist/tools/source-path.d.ts +0 -1
- package/dist/tools/steroids.d.ts +0 -1
- package/dist/tools/steroids.js +1 -1
- package/dist/tools/subagent-control.d.ts +0 -1
- package/dist/tools/subagent-shared.d.ts +0 -1
- package/dist/tools/subagent.d.ts +0 -1
- package/dist/tools/task-output.d.ts +0 -1
- package/dist/tools/task-output.js +13 -6
- package/dist/tools/task-output.js.map +1 -1
- package/dist/tools/task-send.d.ts +0 -1
- package/dist/tools/task-stop.d.ts +0 -1
- package/dist/tools/tasks.d.ts +0 -1
- package/dist/tools/tool-search.d.ts +0 -1
- package/dist/tools/tool-tiers.d.ts +0 -1
- package/dist/tools/truncate.d.ts +0 -1
- package/dist/tools/web-fetch.d.ts +0 -1
- package/dist/tools/web-search.d.ts +0 -1
- package/dist/tools/write.d.ts +0 -1
- package/dist/types.d.ts +0 -1
- package/dist/ui/App.d.ts +0 -1
- package/dist/ui/App.js +6 -1
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/activity-phrases.d.ts +0 -1
- package/dist/ui/app-items.d.ts +0 -1
- package/dist/ui/components/ActivityIndicator.d.ts +0 -1
- package/dist/ui/components/AnimationContext.d.ts +0 -1
- package/dist/ui/components/AssistantMessage.d.ts +0 -1
- package/dist/ui/components/BackgroundTasksBar.d.ts +0 -1
- package/dist/ui/components/Banner.d.ts +0 -1
- package/dist/ui/components/ChatFooterPane.d.ts +0 -1
- package/dist/ui/components/ChatInputStack.d.ts +0 -1
- package/dist/ui/components/ChatLayout.d.ts +0 -1
- package/dist/ui/components/ChatLivePane.d.ts +0 -1
- package/dist/ui/components/ChatScreen.d.ts +0 -1
- package/dist/ui/components/ChatStatusRow.d.ts +0 -1
- package/dist/ui/components/CompactionNotice.d.ts +0 -1
- package/dist/ui/components/DiffFrame.d.ts +0 -1
- package/dist/ui/components/DiffView.d.ts +0 -1
- package/dist/ui/components/Footer.d.ts +0 -1
- package/dist/ui/components/FooterStatusRow.d.ts +0 -1
- package/dist/ui/components/FullScreenOverlayRouter.d.ts +0 -1
- package/dist/ui/components/GoalOverlay.d.ts +0 -1
- package/dist/ui/components/GoalStatusBar.d.ts +0 -1
- package/dist/ui/components/IdealHookMessage.d.ts +0 -1
- package/dist/ui/components/InputArea.d.ts +0 -1
- package/dist/ui/components/LiveToolPanel.d.ts +0 -1
- package/dist/ui/components/Markdown.d.ts +0 -1
- package/dist/ui/components/MessageResponse.d.ts +0 -1
- package/dist/ui/components/ModelSelector.d.ts +0 -1
- package/dist/ui/components/NoSelect.d.ts +0 -1
- package/dist/ui/components/Overlay.d.ts +0 -1
- package/dist/ui/components/PixelOverlay.d.ts +0 -1
- package/dist/ui/components/PlanApproval.d.ts +0 -1
- package/dist/ui/components/PlanBanner.d.ts +0 -1
- package/dist/ui/components/PlanModeLogo.d.ts +0 -1
- package/dist/ui/components/PlanOverlay.d.ts +0 -1
- package/dist/ui/components/PlanProgress.d.ts +0 -1
- package/dist/ui/components/QueueIndicator.d.ts +0 -1
- package/dist/ui/components/Ratchet.d.ts +0 -1
- package/dist/ui/components/RewindOverlay.d.ts +0 -1
- package/dist/ui/components/SelectList.d.ts +0 -1
- package/dist/ui/components/ServerToolExecution.d.ts +0 -1
- package/dist/ui/components/SessionSelector.d.ts +0 -1
- package/dist/ui/components/SessionSummary.d.ts +0 -1
- package/dist/ui/components/SettingsSelector.d.ts +0 -1
- package/dist/ui/components/SkillsOverlay.d.ts +0 -1
- package/dist/ui/components/SlashCommandMenu.d.ts +0 -1
- package/dist/ui/components/SlashStyledSelectList.d.ts +0 -1
- package/dist/ui/components/Spinner.d.ts +0 -1
- package/dist/ui/components/StreamingArea.d.ts +0 -1
- package/dist/ui/components/SubAgentPanel.d.ts +0 -1
- package/dist/ui/components/TaskOverlay.d.ts +0 -1
- package/dist/ui/components/TaskPickerMenu.d.ts +0 -1
- package/dist/ui/components/ThemeSelector.d.ts +0 -1
- package/dist/ui/components/ThinkingBlock.d.ts +0 -1
- package/dist/ui/components/ToolExecution.d.ts +0 -1
- package/dist/ui/components/ToolGroupExecution.d.ts +0 -1
- package/dist/ui/components/ToolUseLoader.d.ts +0 -1
- package/dist/ui/components/TranscriptViewport.d.ts +0 -1
- package/dist/ui/components/UserMessage.d.ts +0 -1
- package/dist/ui/components/force-color.d.ts +0 -1
- package/dist/ui/components/index.d.ts +0 -1
- package/dist/ui/constants/figures.d.ts +0 -1
- package/dist/ui/duration-format.d.ts +0 -1
- package/dist/ui/duration-summary.d.ts +0 -1
- package/dist/ui/error-item.d.ts +0 -1
- package/dist/ui/goal-events.d.ts +0 -1
- package/dist/ui/goal-events.js.map +1 -1
- package/dist/ui/goal-summary.d.ts +0 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +0 -1
- package/dist/ui/hooks/useBlink.d.ts +0 -1
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +0 -1
- package/dist/ui/hooks/useContextCompaction.d.ts +0 -1
- package/dist/ui/hooks/useDoublePress.d.ts +0 -1
- package/dist/ui/hooks/useMinDisplayTime.d.ts +0 -1
- package/dist/ui/hooks/useModeState.d.ts +0 -1
- package/dist/ui/hooks/usePixelFixFlow.d.ts +0 -1
- package/dist/ui/hooks/useSessionManager.d.ts +0 -1
- package/dist/ui/hooks/useSessionPersistence.d.ts +0 -1
- package/dist/ui/hooks/useSlashCommands.d.ts +0 -1
- package/dist/ui/hooks/useTaskPickerController.d.ts +0 -1
- package/dist/ui/hooks/useTerminalSize.d.ts +0 -1
- package/dist/ui/hooks/useTerminalTitle.d.ts +0 -1
- package/dist/ui/hooks/useTranscriptHistory.d.ts +0 -1
- package/dist/ui/hooks/useTranscriptScroll.d.ts +0 -1
- package/dist/ui/item-helpers.d.ts +0 -1
- package/dist/ui/layout-decisions.d.ts +0 -1
- package/dist/ui/live-area-height.d.ts +0 -1
- package/dist/ui/live-item-flush.d.ts +0 -1
- package/dist/ui/login.d.ts +0 -1
- package/dist/ui/mcp.d.ts +0 -1
- package/dist/ui/pixel.d.ts +0 -1
- package/dist/ui/prompt-routing.d.ts +0 -1
- package/dist/ui/render.d.ts +0 -1
- package/dist/ui/session-summary.d.ts +0 -1
- package/dist/ui/sessions.d.ts +0 -1
- package/dist/ui/spinner-frames.d.ts +0 -1
- package/dist/ui/stores/create-store.d.ts +0 -1
- package/dist/ui/stores/index.d.ts +0 -1
- package/dist/ui/stores/taskbar-store.d.ts +0 -1
- package/dist/ui/stores/transcript-scroll-store.d.ts +0 -1
- package/dist/ui/submit-prompt-command.d.ts +0 -1
- package/dist/ui/submit-slash-commands.d.ts +0 -1
- package/dist/ui/terminal-history-format.d.ts +0 -1
- package/dist/ui/terminal-history-spacing.d.ts +0 -1
- package/dist/ui/terminal-history-status-renderers.d.ts +0 -1
- package/dist/ui/terminal-history.d.ts +0 -1
- package/dist/ui/testing/screen-recorder.d.ts +0 -1
- package/dist/ui/theme/detect-theme.d.ts +0 -1
- package/dist/ui/theme/theme.d.ts +0 -1
- package/dist/ui/theme/theme.js.map +1 -1
- package/dist/ui/thinking-level.d.ts +0 -1
- package/dist/ui/tool-group-summary.d.ts +0 -1
- package/dist/ui/tool-line-summary.d.ts +0 -1
- package/dist/ui/transcript/MiscRows.d.ts +0 -1
- package/dist/ui/transcript/StatusRow.d.ts +0 -1
- package/dist/ui/transcript/ToolRows.d.ts +0 -1
- package/dist/ui/transcript/TranscriptItemFrame.d.ts +0 -1
- package/dist/ui/transcript/TranscriptRenderer.d.ts +0 -1
- package/dist/ui/transcript/presentation.d.ts +0 -1
- package/dist/ui/transcript/spacing.d.ts +0 -1
- package/dist/ui/transcript/tool-presentation.d.ts +0 -1
- package/dist/ui/transcript/tool-presentation.js.map +1 -1
- package/dist/ui/transcript/transcript-lines.d.ts +0 -1
- package/dist/ui/utils/assistant-stream-split.d.ts +0 -1
- package/dist/ui/utils/highlight.d.ts +0 -1
- package/dist/ui/utils/hyperlink.d.ts +0 -1
- package/dist/ui/utils/latex-to-unicode.d.ts +0 -1
- package/dist/ui/utils/markdown-cache.d.ts +0 -1
- package/dist/ui/utils/markdown-renderer.d.ts +0 -1
- package/dist/ui/utils/markdown-table.d.ts +0 -1
- package/dist/ui/utils/signal.d.ts +0 -1
- package/dist/ui/utils/supports-hyperlinks.d.ts +0 -1
- package/dist/ui/utils/table-text.d.ts +0 -1
- package/dist/ui/utils/terminal-graphics.d.ts +0 -1
- package/dist/ui/utils/terminal-input.d.ts +0 -1
- package/dist/ui/utils/text-utils.d.ts +0 -1
- package/dist/ui/utils/token-to-ansi.d.ts +0 -1
- package/dist/ui/utils/user-message-display.d.ts +0 -1
- package/dist/ui/utils/word-diff.d.ts +0 -1
- package/dist/utils/error-handler.d.ts +0 -1
- package/dist/utils/format.d.ts +0 -1
- package/dist/utils/git.d.ts +0 -1
- package/dist/utils/github-ci.d.ts +18 -0
- package/dist/utils/github-ci.js +137 -0
- package/dist/utils/github-ci.js.map +1 -0
- package/dist/utils/github.d.ts +0 -1
- package/dist/utils/http-body.d.ts +0 -1
- package/dist/utils/image.d.ts +0 -1
- package/dist/utils/open-browser.d.ts +0 -1
- package/dist/utils/plan-steps.d.ts +0 -1
- package/dist/utils/plan-steps.js.map +1 -1
- package/dist/utils/process.d.ts +0 -1
- package/dist/utils/prompt-enhancer.d.ts +6 -3
- package/dist/utils/prompt-enhancer.js +61 -13
- package/dist/utils/prompt-enhancer.js.map +1 -1
- package/dist/utils/shell.d.ts +0 -1
- package/dist/utils/sound.d.ts +0 -1
- package/dist/utils/text.d.ts +0 -1
- package/package.json +8 -8
- package/dist/app-sidecar-sessions.d.ts.map +0 -1
- package/dist/app-sidecar.d.ts.map +0 -1
- package/dist/chat-agents/general.d.ts.map +0 -1
- package/dist/chat-agents/index.d.ts.map +0 -1
- package/dist/chat-agents/jiwa.d.ts.map +0 -1
- package/dist/chat-agents/memory.d.ts.map +0 -1
- package/dist/chat-agents/research.d.ts.map +0 -1
- package/dist/chat-agents/shared.d.ts.map +0 -1
- package/dist/chat-agents/therapist.d.ts.map +0 -1
- package/dist/chat-agents/types.d.ts.map +0 -1
- package/dist/cli/auth.d.ts.map +0 -1
- package/dist/cli/command-routing.d.ts.map +0 -1
- package/dist/cli/mcp.d.ts.map +0 -1
- package/dist/cli/pixel.d.ts.map +0 -1
- package/dist/cli/shared.d.ts.map +0 -1
- package/dist/cli.d.ts.map +0 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/core/agent-notifications.d.ts.map +0 -1
- package/dist/core/agent-session.d.ts.map +0 -1
- package/dist/core/agents.d.ts.map +0 -1
- package/dist/core/api-benchmark.d.ts.map +0 -1
- package/dist/core/ask-user.d.ts.map +0 -1
- package/dist/core/auth/index.d.ts.map +0 -1
- package/dist/core/auth-providers.d.ts.map +0 -1
- package/dist/core/auth-storage.d.ts.map +0 -1
- package/dist/core/auto-update.d.ts.map +0 -1
- package/dist/core/autopilot-cycle.d.ts.map +0 -1
- package/dist/core/autopilot-gate.d.ts.map +0 -1
- package/dist/core/autopilot-verdict.d.ts.map +0 -1
- package/dist/core/bash-spawn-benchmark.d.ts.map +0 -1
- package/dist/core/bundled-agents.d.ts.map +0 -1
- package/dist/core/cache-warm-benchmark.d.ts.map +0 -1
- package/dist/core/checkpoint-store.d.ts.map +0 -1
- package/dist/core/claude-code-version.d.ts.map +0 -1
- package/dist/core/code-retrieval-chunkers.d.ts.map +0 -1
- package/dist/core/code-retrieval.d.ts.map +0 -1
- package/dist/core/compaction/active-context.d.ts.map +0 -1
- package/dist/core/compaction/compactor.d.ts.map +0 -1
- package/dist/core/compaction/policy.d.ts.map +0 -1
- package/dist/core/compaction/query-aware-selector.d.ts.map +0 -1
- package/dist/core/compaction/token-estimator.d.ts.map +0 -1
- package/dist/core/compaction/tool-result-pruner.d.ts.map +0 -1
- package/dist/core/context-limits.d.ts.map +0 -1
- package/dist/core/custom-commands.d.ts.map +0 -1
- package/dist/core/encode-cwd.d.ts.map +0 -1
- package/dist/core/env-delta.d.ts.map +0 -1
- package/dist/core/event-bus.d.ts.map +0 -1
- package/dist/core/extensions/loader.d.ts.map +0 -1
- package/dist/core/extensions/plugin-bundles.d.ts.map +0 -1
- package/dist/core/extensions/types.d.ts.map +0 -1
- package/dist/core/fast-apply-benchmark.d.ts.map +0 -1
- package/dist/core/file-lock.d.ts.map +0 -1
- package/dist/core/foreign-session-import.d.ts.map +0 -1
- package/dist/core/foreign-transcript-blocks.d.ts.map +0 -1
- package/dist/core/goal-controller.d.ts.map +0 -1
- package/dist/core/goal-prerequisites.d.ts.map +0 -1
- package/dist/core/goal-store.d.ts.map +0 -1
- package/dist/core/goal-verifier.d.ts.map +0 -1
- package/dist/core/goal-worker.d.ts.map +0 -1
- package/dist/core/hashline-edit-benchmark.d.ts.map +0 -1
- package/dist/core/hashline.d.ts.map +0 -1
- package/dist/core/ideal-review.d.ts.map +0 -1
- package/dist/core/index.d.ts.map +0 -1
- package/dist/core/language-detector.d.ts.map +0 -1
- package/dist/core/local-endpoint-store.d.ts.map +0 -1
- package/dist/core/logger.d.ts.map +0 -1
- package/dist/core/loop-breaker.d.ts.map +0 -1
- package/dist/core/lsp/client.d.ts.map +0 -1
- package/dist/core/lsp/edit-telemetry.d.ts.map +0 -1
- package/dist/core/lsp/format.d.ts.map +0 -1
- package/dist/core/lsp/jsonrpc.d.ts.map +0 -1
- package/dist/core/lsp/manager.d.ts.map +0 -1
- package/dist/core/lsp/pool.d.ts.map +0 -1
- package/dist/core/lsp/servers.d.ts.map +0 -1
- package/dist/core/lsp/test-support.d.ts.map +0 -1
- package/dist/core/mcp/catalog-cache.d.ts.map +0 -1
- package/dist/core/mcp/client.d.ts.map +0 -1
- package/dist/core/mcp/content.d.ts.map +0 -1
- package/dist/core/mcp/defaults.d.ts.map +0 -1
- package/dist/core/mcp/deferred-catalog.d.ts.map +0 -1
- package/dist/core/mcp/elicitation-bridge.d.ts.map +0 -1
- package/dist/core/mcp/index.d.ts.map +0 -1
- package/dist/core/mcp/loopback.d.ts.map +0 -1
- package/dist/core/mcp/oauth-provider.d.ts.map +0 -1
- package/dist/core/mcp/oauth-store.d.ts.map +0 -1
- package/dist/core/mcp/parse-add-command.d.ts.map +0 -1
- package/dist/core/mcp/resolve-stdio.d.ts.map +0 -1
- package/dist/core/mcp/shared-pool.d.ts.map +0 -1
- package/dist/core/mcp/store.d.ts.map +0 -1
- package/dist/core/mcp/types.d.ts.map +0 -1
- package/dist/core/message-images.d.ts.map +0 -1
- package/dist/core/model-registry.d.ts.map +0 -1
- package/dist/core/network-guard.d.ts.map +0 -1
- package/dist/core/nolan-context.d.ts.map +0 -1
- package/dist/core/nolan-model.d.ts.map +0 -1
- package/dist/core/nolan-prompt.d.ts.map +0 -1
- package/dist/core/oauth/anthropic.d.ts.map +0 -1
- package/dist/core/oauth/gemini.d.ts.map +0 -1
- package/dist/core/oauth/kimi.d.ts.map +0 -1
- package/dist/core/oauth/openai.d.ts.map +0 -1
- package/dist/core/oauth/pkce.d.ts.map +0 -1
- package/dist/core/oauth/types.d.ts.map +0 -1
- package/dist/core/oauth/xai.d.ts.map +0 -1
- package/dist/core/parked-requests.d.ts.map +0 -1
- package/dist/core/persistent-shell.d.ts.map +0 -1
- package/dist/core/pixel-fix-agent.d.ts.map +0 -1
- package/dist/core/pixel-fix.d.ts.map +0 -1
- package/dist/core/pixel.d.ts.map +0 -1
- package/dist/core/platform-clis.d.ts.map +0 -1
- package/dist/core/process-gate.d.ts.map +0 -1
- package/dist/core/process-manager.d.ts.map +0 -1
- package/dist/core/progress/engine.d.ts.map +0 -1
- package/dist/core/progress/git-xp.d.ts.map +0 -1
- package/dist/core/progress/ranks.d.ts.map +0 -1
- package/dist/core/progress/rebuild.d.ts.map +0 -1
- package/dist/core/progress/store.d.ts.map +0 -1
- package/dist/core/progress/types.d.ts.map +0 -1
- package/dist/core/project-discovery.d.ts.map +0 -1
- package/dist/core/prompt-commands.d.ts.map +0 -1
- package/dist/core/radio.d.ts.map +0 -1
- package/dist/core/regrounding.d.ts.map +0 -1
- package/dist/core/resolve-start.d.ts.map +0 -1
- package/dist/core/run-claim.d.ts.map +0 -1
- package/dist/core/run-lifecycle.d.ts.map +0 -1
- package/dist/core/runtime-mode.d.ts.map +0 -1
- package/dist/core/sandbox-domains.d.ts.map +0 -1
- package/dist/core/sandbox-feedback.d.ts.map +0 -1
- package/dist/core/sandbox.d.ts.map +0 -1
- package/dist/core/semantic-search-benchmark.d.ts.map +0 -1
- package/dist/core/session-compaction.d.ts.map +0 -1
- package/dist/core/session-export.d.ts.map +0 -1
- package/dist/core/session-history.d.ts.map +0 -1
- package/dist/core/session-manager.d.ts.map +0 -1
- package/dist/core/session-preview.d.ts.map +0 -1
- package/dist/core/session-storage.d.ts.map +0 -1
- package/dist/core/settings-manager.d.ts.map +0 -1
- package/dist/core/setup-history.d.ts.map +0 -1
- package/dist/core/shell-path.d.ts.map +0 -1
- package/dist/core/shell.d.ts.map +0 -1
- package/dist/core/shutdown.d.ts.map +0 -1
- package/dist/core/skills.d.ts.map +0 -1
- package/dist/core/slash-commands.d.ts.map +0 -1
- package/dist/core/source-maps.d.ts.map +0 -1
- package/dist/core/speed-benchmark.d.ts.map +0 -1
- package/dist/core/steering.d.ts.map +0 -1
- package/dist/core/steroids.d.ts.map +0 -1
- package/dist/core/style-packs/index.d.ts.map +0 -1
- package/dist/core/style-packs/packs.d.ts.map +0 -1
- package/dist/core/subagent-manager.d.ts.map +0 -1
- package/dist/core/subagent-policy.d.ts.map +0 -1
- package/dist/core/subagent-store.d.ts.map +0 -1
- package/dist/core/subagent-turn-record.d.ts.map +0 -1
- package/dist/core/task-store.d.ts.map +0 -1
- package/dist/core/telegram-config.d.ts.map +0 -1
- package/dist/core/telegram.d.ts.map +0 -1
- package/dist/core/thinking-level.d.ts.map +0 -1
- package/dist/core/verification-evidence.d.ts.map +0 -1
- package/dist/core/verification-gate.d.ts.map +0 -1
- package/dist/core/verify-commands.d.ts.map +0 -1
- package/dist/core/voice-transcriber.d.ts.map +0 -1
- package/dist/core/workspace-guard.d.ts.map +0 -1
- package/dist/hf-pull.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interactive.d.ts.map +0 -1
- package/dist/modes/acp-mode.d.ts.map +0 -1
- package/dist/modes/agent-home-mode.d.ts.map +0 -1
- package/dist/modes/index.d.ts.map +0 -1
- package/dist/modes/json-mode.d.ts.map +0 -1
- package/dist/modes/print-mode.d.ts.map +0 -1
- package/dist/modes/rpc-mode.d.ts.map +0 -1
- package/dist/modes/serve-mode.d.ts.map +0 -1
- package/dist/modes/subagent-worker-mode.d.ts.map +0 -1
- package/dist/session.d.ts.map +0 -1
- package/dist/system-prompt.d.ts.map +0 -1
- package/dist/test-support/fake-home.d.ts.map +0 -1
- package/dist/tools/ask-user.d.ts.map +0 -1
- package/dist/tools/bash.d.ts.map +0 -1
- package/dist/tools/code-nav.d.ts.map +0 -1
- package/dist/tools/code-skeleton.d.ts.map +0 -1
- package/dist/tools/compress.d.ts.map +0 -1
- package/dist/tools/edit-diff.d.ts.map +0 -1
- package/dist/tools/edit.d.ts.map +0 -1
- package/dist/tools/enter-plan.d.ts.map +0 -1
- package/dist/tools/exit-plan.d.ts.map +0 -1
- package/dist/tools/find.d.ts.map +0 -1
- package/dist/tools/generate-image.d.ts.map +0 -1
- package/dist/tools/goals.d.ts.map +0 -1
- package/dist/tools/grep.d.ts.map +0 -1
- package/dist/tools/html-extract.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/ls.d.ts.map +0 -1
- package/dist/tools/operations.d.ts.map +0 -1
- package/dist/tools/overflow.d.ts.map +0 -1
- package/dist/tools/path-utils.d.ts.map +0 -1
- package/dist/tools/pdf-extract.d.ts.map +0 -1
- package/dist/tools/prompt-hints.d.ts.map +0 -1
- package/dist/tools/read-only-bash.d.ts.map +0 -1
- package/dist/tools/read-tracker.d.ts.map +0 -1
- package/dist/tools/read.d.ts.map +0 -1
- package/dist/tools/safe-env.d.ts.map +0 -1
- package/dist/tools/screenshot.d.ts.map +0 -1
- package/dist/tools/search-code.d.ts.map +0 -1
- package/dist/tools/skill.d.ts.map +0 -1
- package/dist/tools/source-path.d.ts.map +0 -1
- package/dist/tools/steroids.d.ts.map +0 -1
- package/dist/tools/subagent-control.d.ts.map +0 -1
- package/dist/tools/subagent-shared.d.ts.map +0 -1
- package/dist/tools/subagent.d.ts.map +0 -1
- package/dist/tools/task-output.d.ts.map +0 -1
- package/dist/tools/task-send.d.ts.map +0 -1
- package/dist/tools/task-stop.d.ts.map +0 -1
- package/dist/tools/tasks.d.ts.map +0 -1
- package/dist/tools/tool-search.d.ts.map +0 -1
- package/dist/tools/tool-tiers.d.ts.map +0 -1
- package/dist/tools/truncate.d.ts.map +0 -1
- package/dist/tools/web-fetch.d.ts.map +0 -1
- package/dist/tools/web-search.d.ts.map +0 -1
- package/dist/tools/write.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/ui/App.d.ts.map +0 -1
- package/dist/ui/activity-phrases.d.ts.map +0 -1
- package/dist/ui/app-items.d.ts.map +0 -1
- package/dist/ui/components/ActivityIndicator.d.ts.map +0 -1
- package/dist/ui/components/AnimationContext.d.ts.map +0 -1
- package/dist/ui/components/AssistantMessage.d.ts.map +0 -1
- package/dist/ui/components/BackgroundTasksBar.d.ts.map +0 -1
- package/dist/ui/components/Banner.d.ts.map +0 -1
- package/dist/ui/components/ChatFooterPane.d.ts.map +0 -1
- package/dist/ui/components/ChatInputStack.d.ts.map +0 -1
- package/dist/ui/components/ChatLayout.d.ts.map +0 -1
- package/dist/ui/components/ChatLivePane.d.ts.map +0 -1
- package/dist/ui/components/ChatScreen.d.ts.map +0 -1
- package/dist/ui/components/ChatStatusRow.d.ts.map +0 -1
- package/dist/ui/components/CompactionNotice.d.ts.map +0 -1
- package/dist/ui/components/DiffFrame.d.ts.map +0 -1
- package/dist/ui/components/DiffView.d.ts.map +0 -1
- package/dist/ui/components/Footer.d.ts.map +0 -1
- package/dist/ui/components/FooterStatusRow.d.ts.map +0 -1
- package/dist/ui/components/FullScreenOverlayRouter.d.ts.map +0 -1
- package/dist/ui/components/GoalOverlay.d.ts.map +0 -1
- package/dist/ui/components/GoalStatusBar.d.ts.map +0 -1
- package/dist/ui/components/IdealHookMessage.d.ts.map +0 -1
- package/dist/ui/components/InputArea.d.ts.map +0 -1
- package/dist/ui/components/LiveToolPanel.d.ts.map +0 -1
- package/dist/ui/components/Markdown.d.ts.map +0 -1
- package/dist/ui/components/MessageResponse.d.ts.map +0 -1
- package/dist/ui/components/ModelSelector.d.ts.map +0 -1
- package/dist/ui/components/NoSelect.d.ts.map +0 -1
- package/dist/ui/components/Overlay.d.ts.map +0 -1
- package/dist/ui/components/PixelOverlay.d.ts.map +0 -1
- package/dist/ui/components/PlanApproval.d.ts.map +0 -1
- package/dist/ui/components/PlanBanner.d.ts.map +0 -1
- package/dist/ui/components/PlanModeLogo.d.ts.map +0 -1
- package/dist/ui/components/PlanOverlay.d.ts.map +0 -1
- package/dist/ui/components/PlanProgress.d.ts.map +0 -1
- package/dist/ui/components/QueueIndicator.d.ts.map +0 -1
- package/dist/ui/components/Ratchet.d.ts.map +0 -1
- package/dist/ui/components/RewindOverlay.d.ts.map +0 -1
- package/dist/ui/components/SelectList.d.ts.map +0 -1
- package/dist/ui/components/ServerToolExecution.d.ts.map +0 -1
- package/dist/ui/components/SessionSelector.d.ts.map +0 -1
- package/dist/ui/components/SessionSummary.d.ts.map +0 -1
- package/dist/ui/components/SettingsSelector.d.ts.map +0 -1
- package/dist/ui/components/SkillsOverlay.d.ts.map +0 -1
- package/dist/ui/components/SlashCommandMenu.d.ts.map +0 -1
- package/dist/ui/components/SlashStyledSelectList.d.ts.map +0 -1
- package/dist/ui/components/Spinner.d.ts.map +0 -1
- package/dist/ui/components/StreamingArea.d.ts.map +0 -1
- package/dist/ui/components/SubAgentPanel.d.ts.map +0 -1
- package/dist/ui/components/TaskOverlay.d.ts.map +0 -1
- package/dist/ui/components/TaskPickerMenu.d.ts.map +0 -1
- package/dist/ui/components/ThemeSelector.d.ts.map +0 -1
- package/dist/ui/components/ThinkingBlock.d.ts.map +0 -1
- package/dist/ui/components/ToolExecution.d.ts.map +0 -1
- package/dist/ui/components/ToolGroupExecution.d.ts.map +0 -1
- package/dist/ui/components/ToolUseLoader.d.ts.map +0 -1
- package/dist/ui/components/TranscriptViewport.d.ts.map +0 -1
- package/dist/ui/components/UserMessage.d.ts.map +0 -1
- package/dist/ui/components/force-color.d.ts.map +0 -1
- package/dist/ui/components/index.d.ts.map +0 -1
- package/dist/ui/constants/figures.d.ts.map +0 -1
- package/dist/ui/duration-format.d.ts.map +0 -1
- package/dist/ui/duration-summary.d.ts.map +0 -1
- package/dist/ui/error-item.d.ts.map +0 -1
- package/dist/ui/goal-events.d.ts.map +0 -1
- package/dist/ui/goal-summary.d.ts.map +0 -1
- package/dist/ui/hooks/useAgentLoop.d.ts.map +0 -1
- package/dist/ui/hooks/useBlink.d.ts.map +0 -1
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts.map +0 -1
- package/dist/ui/hooks/useContextCompaction.d.ts.map +0 -1
- package/dist/ui/hooks/useDoublePress.d.ts.map +0 -1
- package/dist/ui/hooks/useMinDisplayTime.d.ts.map +0 -1
- package/dist/ui/hooks/useModeState.d.ts.map +0 -1
- package/dist/ui/hooks/usePixelFixFlow.d.ts.map +0 -1
- package/dist/ui/hooks/useSessionManager.d.ts.map +0 -1
- package/dist/ui/hooks/useSessionPersistence.d.ts.map +0 -1
- package/dist/ui/hooks/useSlashCommands.d.ts.map +0 -1
- package/dist/ui/hooks/useTaskPickerController.d.ts.map +0 -1
- package/dist/ui/hooks/useTerminalSize.d.ts.map +0 -1
- package/dist/ui/hooks/useTerminalTitle.d.ts.map +0 -1
- package/dist/ui/hooks/useTranscriptHistory.d.ts.map +0 -1
- package/dist/ui/hooks/useTranscriptScroll.d.ts.map +0 -1
- package/dist/ui/item-helpers.d.ts.map +0 -1
- package/dist/ui/layout-decisions.d.ts.map +0 -1
- package/dist/ui/live-area-height.d.ts.map +0 -1
- package/dist/ui/live-item-flush.d.ts.map +0 -1
- package/dist/ui/login.d.ts.map +0 -1
- package/dist/ui/mcp.d.ts.map +0 -1
- package/dist/ui/pixel.d.ts.map +0 -1
- package/dist/ui/prompt-routing.d.ts.map +0 -1
- package/dist/ui/render.d.ts.map +0 -1
- package/dist/ui/session-summary.d.ts.map +0 -1
- package/dist/ui/sessions.d.ts.map +0 -1
- package/dist/ui/spinner-frames.d.ts.map +0 -1
- package/dist/ui/stores/create-store.d.ts.map +0 -1
- package/dist/ui/stores/index.d.ts.map +0 -1
- package/dist/ui/stores/taskbar-store.d.ts.map +0 -1
- package/dist/ui/stores/transcript-scroll-store.d.ts.map +0 -1
- package/dist/ui/submit-prompt-command.d.ts.map +0 -1
- package/dist/ui/submit-slash-commands.d.ts.map +0 -1
- package/dist/ui/terminal-history-format.d.ts.map +0 -1
- package/dist/ui/terminal-history-spacing.d.ts.map +0 -1
- package/dist/ui/terminal-history-status-renderers.d.ts.map +0 -1
- package/dist/ui/terminal-history.d.ts.map +0 -1
- package/dist/ui/testing/screen-recorder.d.ts.map +0 -1
- package/dist/ui/theme/detect-theme.d.ts.map +0 -1
- package/dist/ui/theme/theme.d.ts.map +0 -1
- package/dist/ui/thinking-level.d.ts.map +0 -1
- package/dist/ui/tool-group-summary.d.ts.map +0 -1
- package/dist/ui/tool-line-summary.d.ts.map +0 -1
- package/dist/ui/transcript/MiscRows.d.ts.map +0 -1
- package/dist/ui/transcript/StatusRow.d.ts.map +0 -1
- package/dist/ui/transcript/ToolRows.d.ts.map +0 -1
- package/dist/ui/transcript/TranscriptItemFrame.d.ts.map +0 -1
- package/dist/ui/transcript/TranscriptRenderer.d.ts.map +0 -1
- package/dist/ui/transcript/presentation.d.ts.map +0 -1
- package/dist/ui/transcript/spacing.d.ts.map +0 -1
- package/dist/ui/transcript/tool-presentation.d.ts.map +0 -1
- package/dist/ui/transcript/transcript-lines.d.ts.map +0 -1
- package/dist/ui/utils/assistant-stream-split.d.ts.map +0 -1
- package/dist/ui/utils/highlight.d.ts.map +0 -1
- package/dist/ui/utils/hyperlink.d.ts.map +0 -1
- package/dist/ui/utils/latex-to-unicode.d.ts.map +0 -1
- package/dist/ui/utils/markdown-cache.d.ts.map +0 -1
- package/dist/ui/utils/markdown-renderer.d.ts.map +0 -1
- package/dist/ui/utils/markdown-table.d.ts.map +0 -1
- package/dist/ui/utils/signal.d.ts.map +0 -1
- package/dist/ui/utils/supports-hyperlinks.d.ts.map +0 -1
- package/dist/ui/utils/table-text.d.ts.map +0 -1
- package/dist/ui/utils/terminal-graphics.d.ts.map +0 -1
- package/dist/ui/utils/terminal-input.d.ts.map +0 -1
- package/dist/ui/utils/text-utils.d.ts.map +0 -1
- package/dist/ui/utils/token-to-ansi.d.ts.map +0 -1
- package/dist/ui/utils/user-message-display.d.ts.map +0 -1
- package/dist/ui/utils/word-diff.d.ts.map +0 -1
- package/dist/utils/error-handler.d.ts.map +0 -1
- package/dist/utils/format.d.ts.map +0 -1
- package/dist/utils/git.d.ts.map +0 -1
- package/dist/utils/github.d.ts.map +0 -1
- package/dist/utils/http-body.d.ts.map +0 -1
- package/dist/utils/image.d.ts.map +0 -1
- package/dist/utils/open-browser.d.ts.map +0 -1
- package/dist/utils/plan-steps.d.ts.map +0 -1
- package/dist/utils/process.d.ts.map +0 -1
- package/dist/utils/prompt-enhancer.d.ts.map +0 -1
- package/dist/utils/shell.d.ts.map +0 -1
- package/dist/utils/sound.d.ts.map +0 -1
- package/dist/utils/text.d.ts.map +0 -1
package/README.md
CHANGED
|
@@ -206,7 +206,7 @@ Reusable behaviors across projects. Drop `.md` files in:
|
|
|
206
206
|
|
|
207
207
|
They get loaded into the system prompt automatically. The agent knows what it can do without you explaining it each session. <kbd>Ctrl+S</kbd> opens a pane to browse and toggle them.
|
|
208
208
|
|
|
209
|
-
|
|
209
|
+
Eleven ship built in, and route themselves when the work matches:
|
|
210
210
|
|
|
211
211
|
| Skill | Fires on |
|
|
212
212
|
| ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
@@ -217,6 +217,7 @@ Ten ship built in, and route themselves when the work matches:
|
|
|
217
217
|
| `durable` | User data must not be lost — first database/table, migrations, backfills/imports, destructive operations, backups and recovery; any store (Postgres, MySQL, SQLite, Mongo, serverless). |
|
|
218
218
|
| `evidence-led-ui` | Broad or design-sensitive UI work — new screens, redesigns, design systems, accessibility passes. |
|
|
219
219
|
| `lean` | Speed and resource efficiency — slow loading/startup, jank, high CPU, memory leaks and hogging, zombie/orphan processes, bundle bloat, dead code/styles, Core Web Vitals; while building anything that should stay fast, or a perf pass on an existing project. Any stack: web, backend, Electron, Tauri, mobile, native, game, ML. |
|
|
220
|
+
| `refactoring` | Restructuring existing code without changing behavior — "refactor", "clean up", "reduce tech debt", "modernize" or migrate legacy code; test-guarded steps, revert-on-red, characterization tests for untested code. |
|
|
220
221
|
| `root-cause` | A bug that resists the obvious fix, makes no sense, or keeps coming back — gated diagnosis from red repro to ranked hypotheses to regression test. |
|
|
221
222
|
| `shared-language` | Fuzzy or drifting domain vocabulary, recurring naming decisions, and hard-to-reverse decisions worth recording (glossary + decision records). |
|
|
222
223
|
| `tdd` | Test-driven development — red-green-refactor with pre-agreed seams, when the user asks for test-first work. |
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: refactoring
|
|
3
|
+
description: Use when restructuring existing code without changing behavior — "refactor", "clean up this module", "reduce tech debt/duplication", "split this god class/function", "improve code quality", "modernize" or migrate legacy code (strangler fig, framework/dependency upgrades, callback→async), or when planning a refactor before touching code. Two hats, test-guarded steps, revert-on-red. Do NOT use for new feature work, bug fixes with known symptoms (root-cause), styling or copy changes, the refactor step inside a user-requested TDD flow (tdd), or when the user asks to rewrite from scratch.
|
|
4
|
+
license: Behavior-preservation methodology synthesized from public sources (Fowler's Refactoring catalog, Tidy First?, and community agent skills by bienhoang, wondelai, mattpocock, jeffallan, vasilyu1983), audited 2026-09-12.
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Refactoring
|
|
8
|
+
|
|
9
|
+
Change the structure of code without changing what it does. Every observable behavior that exists before the refactoring — including the bugs — must exist after it. This skill exists because agents drift: without hard gates, "refactoring" silently becomes rewriting, and rewriting untested code is how behavior is lost.
|
|
10
|
+
|
|
11
|
+
**Without tests, you're not refactoring — you're editing.**
|
|
12
|
+
|
|
13
|
+
## Governing rules
|
|
14
|
+
|
|
15
|
+
1. **Two hats.** You are either adding function or restructuring, never both in the same change. Mixing them makes each unprovable. If new behavior is genuinely required, finish the structural change first, prove it, then change behavior in a separate step.
|
|
16
|
+
2. **The baseline is a gate, not advice.** Before the first edit: the test suite runs green on unmodified code, or you build a safety net first (see mode 3). Record what you ran and its result. A suite that was already red tells you nothing — fix or quarantine the noise before counting on it.
|
|
17
|
+
3. **One named transformation per step.** Each step applies exactly one refactoring (Extract Method, Move Function, Introduce Parameter…) and has a name you can state. If you cannot name it, it is not a refactoring — it is a rewrite wearing a costume.
|
|
18
|
+
4. **Red means revert, not debug.** After each step, run the smallest relevant suite. Green ⇒ commit (when per-step commits were agreed — see the loop's checkpoint), message names the transformation. Red ⇒ revert the step immediately (`git restore`/`git checkout` the touched files). A red intermediate means the step was too big or wrong; debugging a broken step costs more than re-slicing it.
|
|
19
|
+
5. **Never touch tests to get green.** In a pure refactor, modifying, loosening, or deleting an assertion is the cardinal sin — it destroys the only proof you have. If a test blocks legitimate structural change (asserts private internals), convert it to assert observable behavior *before* the transformation, as its own commit. Any unexplained test change in a refactor diff is a red flag.
|
|
20
|
+
6. **Smallest suite per step, full suite per finish.** Iterate fast on the touched area, but before declaring done: full test suite + typecheck + lint, on the same commands CI runs.
|
|
21
|
+
7. **Prove it, don't vibe it.** The closing question is not "is this good code" but "can I prove nothing observable changed?" Answer with evidence: suites run, before/after outputs, mutation spot-checks when the boundary is critical. Say plainly what you could not verify.
|
|
22
|
+
8. **Make the change easy, then make the easy change** (Beck). Preparatory refactoring — small structural setup that makes the coming feature trivial — is the highest-ROI kind. Do it, then stop.
|
|
23
|
+
9. **Public API surface is observable behavior.** Renaming or reshaping an exported symbol, endpoint, or file layout preserves runtime behavior but breaks consumers. Inside the module: refactor freely. Across a published boundary: deprecate-and-alias, never hard-break, unless the user chose the break.
|
|
24
|
+
10. **Edit sources, not generated output.** `dist/`, vendored, or generated files are regenerated by their toolchain — hand-editing them is a change that the next build erases. Change the generator or the source, then regenerate.
|
|
25
|
+
|
|
26
|
+
## Modes
|
|
27
|
+
|
|
28
|
+
**1. In-the-small** — tidy a module, extract a function, kill duplication while working. The execute loop below, inline, without ceremony. Keep litter-pickup bounded to files you are already touching; a boy-scout sweep across the repo is scope creep.
|
|
29
|
+
|
|
30
|
+
**2. Plan-first** — the user asks for a refactor plan, the change is architectural, or multiple approaches compete. Interview the problem, explore the repo to verify claims, fix scope as in/out lists, check test coverage (thin coverage is a question to the user, not an assumption), then break the work into a plan of tiny commits — each commit leaves the codebase working. File it where the user wants (issue, doc, or just the reply). Do NOT embed file paths or code snippets in the plan — they go stale before the work starts.
|
|
31
|
+
|
|
32
|
+
**3. Legacy / untested** — no tests, unrunnable suite, or a migration too large for one session. Do not proceed with the normal loop. Go to `references/legacy.md`: characterization tests capturing *actual* current behavior (bugs included — log them, don't silently fix them), seams, branch-by-abstraction, parallel change (expand–migrate–contract), strangler fig.
|
|
33
|
+
|
|
34
|
+
## Execute loop
|
|
35
|
+
|
|
36
|
+
1. **Baseline.** Run the suite on unmodified code; record green. If red or absent → mode 3. If the project has no VCS or the working tree is dirty with unrelated changes, say so and stop for direction — a dirty baseline destroys the revert safety.
|
|
37
|
+
2. **Commit checkpoint.** Refactoring is safest with per-step commits on a dedicated branch — ask the user once, up front: "I'll commit each verified step on a branch — good?" If they decline, keep steps small and separable and report the step list for review at the end. Never commit without authorization; without any VCS, or with unrelated uncommitted changes in the tree, say so and stop for direction — a dirty baseline destroys the revert safety.
|
|
38
|
+
3. **Pick one target.** Ranked by risk-adjusted value, not by how interesting it is: security → correctness → structure → duplication → naming. Hotspots first — files where churn (recent edit frequency) meets complexity. Smell catalog and metrics thresholds: `references/smells.md`.
|
|
39
|
+
4. **Apply one named transformation.** Full mechanics per transformation live in `references/smells.md`. Prefer language-aware tooling (IDE rename, AST codemods) over regex edits; at scale (>~10 files or >~500 lines), a codemod is the safe path and regex is the wrong one.
|
|
40
|
+
5. **Verify.** Smallest relevant suite → green ⇒ commit (message = transformation name) → next target. Red ⇒ rule 4 of the governing rules: revert, take a smaller step.
|
|
41
|
+
6. **Close.** Full suite + typecheck + lint, on the same commands CI runs — including every package that imports the code you touched, not just the one you edited (monorepos: respect build order). Report: transformations applied (named), before/after state, smells left and why, anything deferred. Agent-specific drift modes to check before closing: `references/agent-pitfalls.md`.
|
|
42
|
+
|
|
43
|
+
## Risk levels set the safety net
|
|
44
|
+
|
|
45
|
+
| Risk | Touching | Minimum net before editing |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| Low | Pure internals, no I/O | Unit tests + types |
|
|
48
|
+
| Medium | Module boundary, parsing, state | + contract tests at the seam |
|
|
49
|
+
| High | Money, auth, concurrency, migrations, data | + integration tests, a rollback plan, and small phases |
|
|
50
|
+
|
|
51
|
+
When unsure whether behavior could change: **do not apply — ask.**
|
|
52
|
+
|
|
53
|
+
## When NOT to refactor
|
|
54
|
+
|
|
55
|
+
- No failing demand: nothing to add, nothing hurting. Refactoring without a driver is gold-plating.
|
|
56
|
+
- The code is about to be deleted or replaced. Deleting is cheaper.
|
|
57
|
+
- You cannot run or construct any safety net and the risk is medium+. Report and stop.
|
|
58
|
+
- The rewrite instinct hits ("this is all wrong, let me start fresh"). That is a different conversation with the user, not a refactor — and big-bang rewrites lose the one thing refactoring keeps: working software at every step.
|
|
59
|
+
|
|
60
|
+
## References
|
|
61
|
+
|
|
62
|
+
- `references/smells.md` — smell catalog, metrics thresholds, prioritization, transformation mechanics
|
|
63
|
+
- `references/legacy.md` — characterization tests, seams, branch-by-abstraction, parallel change, strangler fig, per-phase checkpoints
|
|
64
|
+
- `references/agent-pitfalls.md` — how LLM agents specifically break "behavior-preserving", and the layered proof that catches it
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Agent Pitfalls: How Refactors Drift
|
|
2
|
+
|
|
3
|
+
LLM agents fail refactoring in specific, repeated ways. Human seniors watch for these; here is the checklist. Run it over your own diff before closing any refactor.
|
|
4
|
+
|
|
5
|
+
## Drift modes (check each)
|
|
6
|
+
|
|
7
|
+
- **Error-handling drift** — the old code swallowed or narrowly caught; the rewrite broadens to `catch (e)` "to be safe", or converts errors to exceptions/returns. Observable behavior changed.
|
|
8
|
+
- **Boundary drift** — `>` becomes `>=`, `<` becomes `<=`, off-by-one in slices/loops, `length` vs `length-1`. Classic agent slip, invisible to typecheck.
|
|
9
|
+
- **Rounding and numeric drift** — reordered arithmetic that changes floating-point results; integer division appearing where float was; new formatting on numbers.
|
|
10
|
+
- **Ordering and concurrency drift** — Map/Set/object iteration order assumed where it wasn't guaranteed; sequential awaits parallelized with `Promise.all`; synchronous effects made async (or the reverse).
|
|
11
|
+
- **Null/undefined semantics drift** — old code crashed on null; new code defaults it. Or falsy-checks (`x || y`) "simplified" from explicit `!== undefined` where `0`/`""` are valid values.
|
|
12
|
+
- **Scope and visibility drift** — module-level state introduced where locals were; caching added for performance that changes identity or staleness semantics.
|
|
13
|
+
- **Silent feature addition** — validation, logging, or "improvements" smuggled in because the old code "looked wrong". The old behavior was the spec.
|
|
14
|
+
- **Flaky green** — a test fails, passes on rerun, and gets shrugged off. During a refactor, one flaky red invalidates the whole green: rerun it, and if it flakes, quarantine and fix the flakiness before trusting any suite result.
|
|
15
|
+
|
|
16
|
+
## Test-healing anti-pattern
|
|
17
|
+
|
|
18
|
+
The agent's tests go red; instead of reverting the code, it loosens the test. Any test-file change in a pure-refactor diff is a red flag requiring an explicit justification of the form: "this test asserted private internals; converted to assert observable behavior, in a separate prior commit." Loosened bounds, deleted assertions, added `.skip`, `any` casts in assertions — all count.
|
|
19
|
+
|
|
20
|
+
## Chesterton's Fence
|
|
21
|
+
|
|
22
|
+
Before deleting code that looks pointless: `git blame`, read the commit message, check issue/changelog references. Code that survives despite looking wrong often guards an incident. If history is unavailable and the reason is unknowable, flag it to the user instead of deleting.
|
|
23
|
+
|
|
24
|
+
## Layered verification, cheapest first
|
|
25
|
+
|
|
26
|
+
Escalate only as far as the risk level demands:
|
|
27
|
+
|
|
28
|
+
1. **Typecheck** — catches signature/shape drift for freer.
|
|
29
|
+
2. **Lint** — catches dead code, suspicious patterns, unintended scope.
|
|
30
|
+
3. **Unit + characterization suites** — the core proof; smallest relevant suite per step, full suite at close.
|
|
31
|
+
4. **Contract test at the changed boundary** — input/output fixtures frozen before the refactor, diffed after.
|
|
32
|
+
5. **Mutation spot-check** (high-risk boundaries only) — hand-mutate the refactored code (flip a comparison, drop a condition); tests must fail. If they don't, the net has holes: strengthen tests before trusting green.
|
|
33
|
+
|
|
34
|
+
## Closing self-review
|
|
35
|
+
|
|
36
|
+
Re-read your own full diff and answer, in the report:
|
|
37
|
+
|
|
38
|
+
- Which drift modes above did I check, and how do I know each is absent?
|
|
39
|
+
- Did I modify any test file? If yes, justify per the anti-pattern rule.
|
|
40
|
+
- What did the suites run, exactly (commands), and were they green on unmodified code first?
|
|
41
|
+
- What could I not verify, and what residual risk does the user hold?
|
|
42
|
+
|
|
43
|
+
"Can I prove nothing observable changed" — not "is the code nicer now".
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Legacy and Untested Code
|
|
2
|
+
|
|
3
|
+
For codebases or areas where the baseline gate cannot be met: no tests, an unrunnable suite, or a migration too large to land as small commits. The prime directive still holds — observable behavior preserved, bugs included (log them; fixing them is separate work the user must choose).
|
|
4
|
+
|
|
5
|
+
## Sequence
|
|
6
|
+
|
|
7
|
+
**1. Make the system runnable and observable.** Get it to start locally with realistic data. If you cannot execute it, say so and stop — static-only refactoring of critical legacy paths is a coin flip.
|
|
8
|
+
|
|
9
|
+
**2. Build characterization tests (golden master).** Tests that assert what the code *actually does*, not what it should do:
|
|
10
|
+
|
|
11
|
+
- Call the boundary (public API, CLI, event handler, exported function) with real inputs.
|
|
12
|
+
- Capture the full observable output — return values, written files, emitted events, HTTP responses, log lines.
|
|
13
|
+
- Assert the captured behavior, including wrong-looking output. If output looks like a bug, record the bug and pin the bug.
|
|
14
|
+
- Sufficient coverage: the paths your refactor will touch and their immediate callers. 80% project coverage is not the bar; coverage of the change surface is.
|
|
15
|
+
|
|
16
|
+
Gate: the characterization suite is **green against the unmodified system** before any refactoring. A red baseline proves nothing later.
|
|
17
|
+
|
|
18
|
+
**3. Create seams before structure.** A seam is a place where behavior can be intercepted without editing the logic:
|
|
19
|
+
|
|
20
|
+
- Extract an interface over the dependency, implement it twice (old, new).
|
|
21
|
+
- Dependency injection for clocks, RNGs, IDs, filesystem, network — anything that makes behavior nondeterministic.
|
|
22
|
+
- Adapter wrapping the legacy module so new code consumes the adapter, not the legacy internals.
|
|
23
|
+
|
|
24
|
+
**4. Migrate by one of the incremental strategies below** — never big-bang.
|
|
25
|
+
|
|
26
|
+
**5. Delete last.** The legacy path is removed only after the new path has provably carried the full behavior (characterization suite green against the new path). Before deleting anything old, check why it exists — `git blame` / changelog; code that looks pointless sometimes guards an incident (Chesterton's Fence).
|
|
27
|
+
|
|
28
|
+
## Incremental migration strategies
|
|
29
|
+
|
|
30
|
+
### Branch by Abstraction
|
|
31
|
+
For replacing an internal implementation that many callers use. Create an abstraction over the old implementation → migrate callers to it one by one (each a working commit) → implement the new behind the abstraction → flip the default → delete the old. Hybrid states are acceptable and working at every commit.
|
|
32
|
+
|
|
33
|
+
### Parallel Change (expand–migrate–contract)
|
|
34
|
+
For changing a live contract (API, storage schema, queue message) where old and new consumers coexist:
|
|
35
|
+
|
|
36
|
+
1. **Expand** — support both old and new forms side by side; write the new form.
|
|
37
|
+
2. **Migrate** — move every consumer to the new form, one by one.
|
|
38
|
+
3. **Contract** — after all readers are migrated and nothing reads the old form, remove it.
|
|
39
|
+
|
|
40
|
+
Never skip the migration phase because tests pass — external consumers may exist that tests don't model.
|
|
41
|
+
|
|
42
|
+
### Strangler Fig
|
|
43
|
+
For replacing a subsystem wholesale. Put a facade in front of the legacy system → route traffic through the facade → intercept one route/slice at a time, implementing it fresh behind the facade (guarded by a feature flag when the slice is risky) → when all slices are intercepted, the legacy core is unused; delete it. Each interception must keep the characterization suite green.
|
|
44
|
+
|
|
45
|
+
## Per-phase discipline (all strategies)
|
|
46
|
+
|
|
47
|
+
Every phase ends with a **validation checkpoint**: characterization + full suite green, and a stated **rollback trigger** — the condition under which this phase is reverted (a commit, a flag flip, never a re-merge). Keep commits bisectable: one phase-step per commit, `git bisect` must stay usable for finding which step changed behavior.
|
|
48
|
+
|
|
49
|
+
Feature flags guard risky slices, but flags are debt: each one gets a removal issue at creation, and is retired as soon as the new path is proven.
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# Smells, Metrics, Prioritization
|
|
2
|
+
|
|
3
|
+
Detection and targeting material for the refactoring skill. Thresholds are heuristics for *where to look*, never rules that a file crossing one must be refactored.
|
|
4
|
+
|
|
5
|
+
## Metrics quick reference
|
|
6
|
+
|
|
7
|
+
Estimate without tooling: cyclomatic complexity ≈ count of decision points (`if`, `while`, `for`, `&&`, `||`, `case`, `catch`, ternary) + 1. Cognitive complexity adds weighting for nesting.
|
|
8
|
+
|
|
9
|
+
| Metric | Comfortable | Refactor signal |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| Cyclomatic complexity (function) | < 10 | 16+ |
|
|
12
|
+
| Cognitive complexity (function) | < 10 | 15+ |
|
|
13
|
+
| Function length | < 30 lines | 50+ (or one screen) |
|
|
14
|
+
| Class/module length | < 300 lines | 500+ |
|
|
15
|
+
| Parameters | ≤ 3 | 6+ (or booleans that change behavior) |
|
|
16
|
+
| Duplication | — | Same logic 3+ places (Rule of Three) |
|
|
17
|
+
|
|
18
|
+
## Smell catalog
|
|
19
|
+
|
|
20
|
+
Work top of list first within a risk band. Each entry: signal → usual transformation.
|
|
21
|
+
|
|
22
|
+
### Bloaters
|
|
23
|
+
- **Long method / function** — exceeds a screen, needs comments to explain sections → Extract Method; conditional blocks each become guard clauses or extracted methods.
|
|
24
|
+
- **God class / module** — knows everything, changes for every reason → Extract Class by responsibility; move features to the module that owns the data (Feature Envy fix).
|
|
25
|
+
- **Long parameter list** — callers pass the same cluster → Introduce Parameter Object; or pass the object the params came from.
|
|
26
|
+
- **Primitive obsession** — coordinates, money, IDs as bare strings/numbers everywhere → Introduce Value Object with validation at creation.
|
|
27
|
+
|
|
28
|
+
### Change preventers
|
|
29
|
+
- **Divergent change** — one module changed for many unrelated reasons → split by reason (Extract Class).
|
|
30
|
+
- **Shotgun surgery** — one change scattered across many files → Move Function/Field until one module owns the concept.
|
|
31
|
+
- **Parallel inheritance hierarchies** — two hierarchies that must move together → reference one from the other, or unify with a strategy.
|
|
32
|
+
|
|
33
|
+
### Dispensables
|
|
34
|
+
- **Duplicate code** — same logic 3+ places (Rule of Three: tolerate twice, extract on the third) → Extract Function, share it. Two occurrences with divergence is a bug factory.
|
|
35
|
+
- **Dead code** — unreached branches, unused exports, commented-out blocks → delete. Git history has it.
|
|
36
|
+
- **Speculative generality** — abstraction with one caller, flags always passed the same value, "we might need it" → inline and delete. Treat as aggressively as bloat; agents generate this smell by default.
|
|
37
|
+
- **Magic numbers** — unexplained literals → named constant placed where its meaning lives.
|
|
38
|
+
|
|
39
|
+
### Couplers
|
|
40
|
+
- **Feature envy** — method mostly reads another module's data → Move Function to the data.
|
|
41
|
+
- **Inappropriate intimacy** — modules poking each other's privates → Move Method/Field, or extract the shared concept.
|
|
42
|
+
- **Message chains** — `a.b().c().d()` → hide the chain behind a method on the object you know.
|
|
43
|
+
- **Middle man** — class that only forwards → remove it, let callers talk directly.
|
|
44
|
+
|
|
45
|
+
### Conditionals
|
|
46
|
+
- **Deep nesting** — 3+ levels → guard clauses, then Extract Method per branch; Replace Nested Conditional with Guard Clauses.
|
|
47
|
+
- **Complex switch repeated** — same switch on type in multiple places → Replace Conditional with Polymorphism (or a lookup table for the simple data case — do not build a class hierarchy to avoid an object literal).
|
|
48
|
+
- **Boolean-flag parameters** — `doThing(x, true)` → split into two named functions.
|
|
49
|
+
|
|
50
|
+
## Transformation mechanics (the load-bearing ones)
|
|
51
|
+
|
|
52
|
+
Each must be mechanically checkable — "does everything still compile/tests green" — before the next.
|
|
53
|
+
|
|
54
|
+
- **Extract Method/Function**: create the new function, copy code, pass locals as params, replace body with a call. Pitfall: extraction that captures mutable local state — pass state explicitly or take smaller slices.
|
|
55
|
+
- **Rename**: language-aware rename (LSP/IDE) only at any nontrivial scope; never textual find-replace on names shorter than the unique threshold. Renaming is the highest-value, lowest-risk transformation — do it early and often.
|
|
56
|
+
- **Move Function**: move, fix references, adjust visibility. Best when the function's data lives in the destination (Feature Envy).
|
|
57
|
+
- **Introduce Parameter Object**: group params into a record, migrate callers mechanically.
|
|
58
|
+
- **Replace Conditional with Polymorphism**: only after the switch is duplicated in 2+ places; introduce subtype per branch, migrate case by case, delete the switch last.
|
|
59
|
+
- **Replace Magic Number / Introduce Named Constant**: constant named by *meaning*, not value (`MAX_RETRIES`, not `THREE`).
|
|
60
|
+
|
|
61
|
+
## Prioritization
|
|
62
|
+
|
|
63
|
+
Order targets by **risk-adjusted value**:
|
|
64
|
+
|
|
65
|
+
1. **Security** — smells near auth, input handling, crypto.
|
|
66
|
+
2. **Correctness** — duplication with divergence, boundary-handling drift, shared mutable state.
|
|
67
|
+
3. **Hotspots** — churn × complexity. `git log --format=%H <path>` / blame frequency identifies churn; complexity from the table above. A moderately messy file nobody touches is not worth your risk budget.
|
|
68
|
+
4. **Structure** blocking the change the user actually wants (preparatory refactoring).
|
|
69
|
+
5. **Duplication, naming** — cheapest, do opportunistically in touched files.
|
|
70
|
+
|
|
71
|
+
Defer with a note when: no failing demand, near deletion, or the safety net cannot reach it this session.
|
|
@@ -8,4 +8,3 @@ export type SidecarSession = RecentSession & {
|
|
|
8
8
|
* `homeDir` lets tests point Claude Code / Codex lookup at a fixture home.
|
|
9
9
|
*/
|
|
10
10
|
export declare function listSidecarSessions(cwd: string, requestedAgent: string | null, coderSessionsDir: string, homeDir?: string): Promise<SidecarSession[]>;
|
|
11
|
-
//# sourceMappingURL=app-sidecar-sessions.d.ts.map
|
package/dist/app-sidecar.d.ts
CHANGED
package/dist/app-sidecar.js
CHANGED
|
@@ -56,6 +56,7 @@ import { getModel, getDefaultThinkingLevel, getContextWindow, getAllModels, clea
|
|
|
56
56
|
import { resolveStartOrFallback } from "./core/resolve-start.js";
|
|
57
57
|
import { getGitBranch, getGitDirtyFileCount, isGitRepo } from "./utils/git.js";
|
|
58
58
|
import { getGitHubOpenCounts, getGitHubRepoSlug } from "./utils/github.js";
|
|
59
|
+
import { startGitHubCIPoll } from "./utils/github-ci.js";
|
|
59
60
|
import { extractPlanSteps } from "./utils/plan-steps.js";
|
|
60
61
|
import { getNextThinkingLevel, getSupportedThinkingLevels, isThinkingLevelSupported, } from "./core/thinking-level.js";
|
|
61
62
|
import { PROMPT_COMMANDS } from "./core/prompt-commands.js";
|
|
@@ -1018,6 +1019,8 @@ function buildNolanContext(buildSession, cwd, gitBranch, question, workflowComma
|
|
|
1018
1019
|
cwd,
|
|
1019
1020
|
gitBranch,
|
|
1020
1021
|
messages: buildSession.getMessages(),
|
|
1022
|
+
verificationEvidence: buildSession.getVerificationEvidence(),
|
|
1023
|
+
verificationProblem: buildSession.getVerificationProblem(),
|
|
1021
1024
|
workflowCommands,
|
|
1022
1025
|
injectedPrompts,
|
|
1023
1026
|
});
|
|
@@ -1683,6 +1686,7 @@ async function createSession(deps, opts) {
|
|
|
1683
1686
|
const gitHubSlug = initialGitHubSlug;
|
|
1684
1687
|
let gitHubIssues = null;
|
|
1685
1688
|
let gitHubPRs = null;
|
|
1689
|
+
let gitHubCI = null;
|
|
1686
1690
|
function currentContextWindow() {
|
|
1687
1691
|
const st = session.getState();
|
|
1688
1692
|
return getContextWindow(st.model, { provider: st.provider, accountId: st.accountId });
|
|
@@ -1697,6 +1701,7 @@ async function createSession(deps, opts) {
|
|
|
1697
1701
|
gitDirtyFileCount,
|
|
1698
1702
|
gitHubIssues,
|
|
1699
1703
|
gitHubPRs,
|
|
1704
|
+
gitHubCI,
|
|
1700
1705
|
gitHubRepoUrl: gitHubSlug ? `https://github.com/${gitHubSlug}` : null,
|
|
1701
1706
|
tasks: session.listBackgroundProcesses(),
|
|
1702
1707
|
// Roots added with /add-dir — the header shows a badge when non-empty.
|
|
@@ -1885,6 +1890,7 @@ async function createSession(deps, opts) {
|
|
|
1885
1890
|
});
|
|
1886
1891
|
session.eventBus.on("model_change", (d) => broadcast("model_change", d));
|
|
1887
1892
|
session.eventBus.on("hook", (d) => broadcast("hook", d));
|
|
1893
|
+
session.eventBus.on("diagnostics", (d) => broadcast("diagnostics", d));
|
|
1888
1894
|
// Fires BEFORE the candidate final answer streams. The webview holds assistant
|
|
1889
1895
|
// text back while armed, so an Ideal review supersedes a draft that was never
|
|
1890
1896
|
// painted instead of deleting one the user already started reading.
|
|
@@ -2201,7 +2207,14 @@ async function createSession(deps, opts) {
|
|
|
2201
2207
|
}
|
|
2202
2208
|
finally {
|
|
2203
2209
|
const cancelled = runLifecycle.isCancellationRequested(generation);
|
|
2210
|
+
const verificationProblem = cancelled ? null : session.getVerificationProblem();
|
|
2211
|
+
if (runSucceeded && verificationProblem && ownsGeneration) {
|
|
2212
|
+
// Expected control outcome: run_end and the journal already carry Unverified.
|
|
2213
|
+
// Do not format it as a crash or persist a misleading error marker.
|
|
2214
|
+
log("WARN", "app-sidecar", "verification incomplete", { message: verificationProblem });
|
|
2215
|
+
}
|
|
2204
2216
|
if (runSucceeded &&
|
|
2217
|
+
!verificationProblem &&
|
|
2205
2218
|
!cancelled &&
|
|
2206
2219
|
cancelGeneration === cancelGenAtStart &&
|
|
2207
2220
|
countAssistantMessages(session.getMessages()) > assistantsBeforeRun) {
|
|
@@ -2218,12 +2231,14 @@ async function createSession(deps, opts) {
|
|
|
2218
2231
|
// A run may have opened/closed issues or PRs — refresh fire-and-forget so
|
|
2219
2232
|
// teardown isn't delayed by the network. Broadcasts itself on change.
|
|
2220
2233
|
void refreshGitHubCounts();
|
|
2234
|
+
void ciPoll.refresh();
|
|
2221
2235
|
// Serialize behind any marker/tool-triggered refresh so the terminal
|
|
2222
2236
|
// progress snapshot uses the live plan file. Once every canonical step
|
|
2223
2237
|
// is complete, remove the approved plan from future system prompts and
|
|
2224
2238
|
// clear the widget before run_end paints the idle activity bar.
|
|
2225
2239
|
if (runSucceeded &&
|
|
2226
2240
|
!cancelled &&
|
|
2241
|
+
!verificationProblem &&
|
|
2227
2242
|
approvedPlanPath !== null &&
|
|
2228
2243
|
(await queueApprovedPlanProgressSync())) {
|
|
2229
2244
|
try {
|
|
@@ -2240,7 +2255,7 @@ async function createSession(deps, opts) {
|
|
|
2240
2255
|
}
|
|
2241
2256
|
}
|
|
2242
2257
|
if (ownsGeneration) {
|
|
2243
|
-
finishOwnedGeneration(generation, false, runSucceeded ? "completed" : "failed");
|
|
2258
|
+
finishOwnedGeneration(generation, false, verificationProblem ? "unverified" : runSucceeded ? "completed" : "failed");
|
|
2244
2259
|
}
|
|
2245
2260
|
// A cancelled injected run is still owned by the surrounding autopilot
|
|
2246
2261
|
// cycle; its outer finalizer emits the one terminal cancelled run_end.
|
|
@@ -2249,6 +2264,7 @@ async function createSession(deps, opts) {
|
|
|
2249
2264
|
cancelledRunEndGenerations.add(generation);
|
|
2250
2265
|
broadcast("run_end", {
|
|
2251
2266
|
...(cancelled ? { cancelled: true } : {}),
|
|
2267
|
+
...(verificationProblem ? { unverified: true } : {}),
|
|
2252
2268
|
runState: runLifecycle.state,
|
|
2253
2269
|
});
|
|
2254
2270
|
}
|
|
@@ -2282,6 +2298,8 @@ async function createSession(deps, opts) {
|
|
|
2282
2298
|
cwd,
|
|
2283
2299
|
gitBranch,
|
|
2284
2300
|
messages: session.getMessages(),
|
|
2301
|
+
verificationEvidence: session.getVerificationEvidence(),
|
|
2302
|
+
verificationProblem: session.getVerificationProblem(),
|
|
2285
2303
|
originalRequest,
|
|
2286
2304
|
injectedPrompts: [...injectedAutopilotPrompts],
|
|
2287
2305
|
workflowCommands: await loadWorkflowCommandSpecs(),
|
|
@@ -2325,6 +2343,8 @@ async function createSession(deps, opts) {
|
|
|
2325
2343
|
cwd,
|
|
2326
2344
|
gitBranch,
|
|
2327
2345
|
messages: session.getMessages(),
|
|
2346
|
+
verificationEvidence: session.getVerificationEvidence(),
|
|
2347
|
+
verificationProblem: session.getVerificationProblem(),
|
|
2328
2348
|
originalRequest,
|
|
2329
2349
|
injectedPrompts: [...injectedAutopilotPrompts],
|
|
2330
2350
|
workflowCommands: await loadWorkflowCommandSpecs(),
|
|
@@ -2364,7 +2384,7 @@ async function createSession(deps, opts) {
|
|
|
2364
2384
|
// control flow lives in driveAutopilotCycle (core/autopilot-cycle.ts) so
|
|
2365
2385
|
// every exit path is unit-tested; this only wires the real dependencies.
|
|
2366
2386
|
async function runAutopilotCycle(originalRequest) {
|
|
2367
|
-
if (!autopilot || autopilotCancelled)
|
|
2387
|
+
if (!autopilot || autopilotCancelled || session.getVerificationProblem())
|
|
2368
2388
|
return;
|
|
2369
2389
|
const generation = runLifecycle.begin(abortOwnedWork).generation;
|
|
2370
2390
|
pendingCancelDrain = null;
|
|
@@ -2380,6 +2400,7 @@ async function createSession(deps, opts) {
|
|
|
2380
2400
|
// round available.
|
|
2381
2401
|
maxRounds: pendingPlanPath !== null ? MAX_AUTOPILOT_ROUNDS + 2 : MAX_AUTOPILOT_ROUNDS,
|
|
2382
2402
|
isCancelled: () => autopilotCancelled,
|
|
2403
|
+
verificationProblem: () => session.getVerificationProblem(),
|
|
2383
2404
|
// An injected run entering plan mode WITHOUT submitting (enter_plan,
|
|
2384
2405
|
// no exit_plan) halts the cycle — Nolan never prompts into a read-only
|
|
2385
2406
|
// plan-mode session. A submitted plan takes the planPending branch.
|
|
@@ -2392,7 +2413,7 @@ async function createSession(deps, opts) {
|
|
|
2392
2413
|
// Auto-accept: the inlined POST /plan/accept body. Returns false when
|
|
2393
2414
|
// the plan generation moved since the review (user acted) — the cycle
|
|
2394
2415
|
// exits silently and the user's action stands.
|
|
2395
|
-
acceptPlan: async () => {
|
|
2416
|
+
acceptPlan: async (reason) => {
|
|
2396
2417
|
if (pendingPlanPath === null || planGeneration !== planGenAtReview)
|
|
2397
2418
|
return false;
|
|
2398
2419
|
const planPath = pendingPlanPath;
|
|
@@ -2409,11 +2430,11 @@ async function createSession(deps, opts) {
|
|
|
2409
2430
|
clearPendingPlan();
|
|
2410
2431
|
// Keep the approval marker ahead of the reset, then seed the reset
|
|
2411
2432
|
// with the sidecar's canonical count from the actual plan file.
|
|
2412
|
-
broadcast("autopilot_plan_accepted", {});
|
|
2433
|
+
broadcast("autopilot_plan_accepted", reason ? { reason } : {});
|
|
2413
2434
|
broadcast("session_reset", { planTotal });
|
|
2414
2435
|
broadcast("plan_progress", planProgressPayload());
|
|
2415
2436
|
// Persisted into the NEW session so a resume shows the marker.
|
|
2416
|
-
void session.persistAutopilotMarker("plan_approved");
|
|
2437
|
+
void session.persistAutopilotMarker("plan_approved", { reason });
|
|
2417
2438
|
return true;
|
|
2418
2439
|
},
|
|
2419
2440
|
runImplement: () => {
|
|
@@ -2467,9 +2488,10 @@ async function createSession(deps, opts) {
|
|
|
2467
2488
|
version: 1,
|
|
2468
2489
|
phase: "done",
|
|
2469
2490
|
afterMessageCount: session.getPersistedTranscriptCount(),
|
|
2491
|
+
...event.data,
|
|
2470
2492
|
});
|
|
2471
2493
|
broadcast(event.type, { ...event.data, copySeed: seed });
|
|
2472
|
-
void session.persistAutopilotMarker("done");
|
|
2494
|
+
void session.persistAutopilotMarker("done", event.data);
|
|
2473
2495
|
return;
|
|
2474
2496
|
}
|
|
2475
2497
|
broadcast(event.type, event.data);
|
|
@@ -2486,7 +2508,7 @@ async function createSession(deps, opts) {
|
|
|
2486
2508
|
finally {
|
|
2487
2509
|
autopilotActive = false;
|
|
2488
2510
|
session.setIdealReviewSuppressed(autopilot);
|
|
2489
|
-
finishOwnedGeneration(generation, true);
|
|
2511
|
+
finishOwnedGeneration(generation, true, session.getVerificationProblem() ? "unverified" : "completed");
|
|
2490
2512
|
queueMicrotask(() => void runStrandedQueue());
|
|
2491
2513
|
}
|
|
2492
2514
|
}
|
|
@@ -2754,6 +2776,10 @@ async function createSession(deps, opts) {
|
|
|
2754
2776
|
gitHubPoll.unref?.();
|
|
2755
2777
|
};
|
|
2756
2778
|
scheduleGitHubPoll(2000);
|
|
2779
|
+
const ciPoll = startGitHubCIPoll(cwd, (next) => {
|
|
2780
|
+
gitHubCI = next;
|
|
2781
|
+
broadcast("extras", footerExtras());
|
|
2782
|
+
});
|
|
2757
2783
|
function readBody(req, res) {
|
|
2758
2784
|
return readCappedBody(req, res);
|
|
2759
2785
|
}
|
|
@@ -4162,10 +4188,14 @@ async function createSession(deps, opts) {
|
|
|
4162
4188
|
}
|
|
4163
4189
|
// `false` means it already drained into the run between render and
|
|
4164
4190
|
// click. That is a race, not an error, so report it as a normal result
|
|
4165
|
-
// and let the client reconcile
|
|
4191
|
+
// and let the client reconcile through the ordered event stream.
|
|
4166
4192
|
const cancelled = session.cancelQueuedMessage(id);
|
|
4167
4193
|
const queued = session.listQueuedMessages();
|
|
4168
|
-
broadcast("queued", {
|
|
4194
|
+
broadcast("queued", {
|
|
4195
|
+
count: queued.length,
|
|
4196
|
+
messages: queued,
|
|
4197
|
+
...(cancelled ? { cancelledId: id } : {}),
|
|
4198
|
+
});
|
|
4169
4199
|
json(res, 200, { cancelled, queued });
|
|
4170
4200
|
});
|
|
4171
4201
|
return;
|
|
@@ -5115,6 +5145,7 @@ async function createSession(deps, opts) {
|
|
|
5115
5145
|
gitHubPollStopped = true;
|
|
5116
5146
|
if (gitHubPoll)
|
|
5117
5147
|
clearTimeout(gitHubPoll);
|
|
5148
|
+
ciPoll.stop();
|
|
5118
5149
|
// Stop the Telegram serve loop + dispose its per-chat sessions.
|
|
5119
5150
|
if (serveController)
|
|
5120
5151
|
await serveController.stop().catch(() => { });
|