@prestyj/cli 4.3.161 → 4.3.200
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 +1 -1
- package/dist/cli.js +112 -27
- package/dist/cli.js.map +1 -1
- package/dist/core/agent-session.d.ts +50 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +175 -20
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/agents.d.ts +6 -1
- package/dist/core/agents.d.ts.map +1 -1
- package/dist/core/agents.js +112 -3
- package/dist/core/agents.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +20 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/claude-code-version.d.ts +10 -0
- package/dist/core/claude-code-version.d.ts.map +1 -0
- package/dist/core/claude-code-version.js +106 -0
- package/dist/core/claude-code-version.js.map +1 -0
- package/dist/core/compaction/compactor.d.ts +13 -0
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +20 -1
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/compactor.test.js +12 -1
- package/dist/core/compaction/compactor.test.js.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/language-detector.d.ts +32 -0
- package/dist/core/language-detector.d.ts.map +1 -0
- package/dist/core/language-detector.js +191 -0
- package/dist/core/language-detector.js.map +1 -0
- package/dist/core/language-detector.test.d.ts +2 -0
- package/dist/core/language-detector.test.d.ts.map +1 -0
- package/dist/core/language-detector.test.js +109 -0
- package/dist/core/language-detector.test.js.map +1 -0
- package/dist/core/model-registry.d.ts +30 -2
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +41 -26
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-registry.test.d.ts +2 -0
- package/dist/core/model-registry.test.d.ts.map +1 -0
- package/dist/core/model-registry.test.js +19 -0
- package/dist/core/model-registry.test.js.map +1 -0
- package/dist/core/oauth/anthropic.d.ts.map +1 -1
- package/dist/core/oauth/anthropic.js +64 -42
- package/dist/core/oauth/anthropic.js.map +1 -1
- package/dist/core/oauth/openai.js +1 -1
- package/dist/core/oauth/openai.js.map +1 -1
- package/dist/core/prompt-commands.d.ts.map +1 -1
- package/dist/core/prompt-commands.js +569 -96
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/prompt-commands.test.d.ts +2 -0
- package/dist/core/prompt-commands.test.d.ts.map +1 -0
- package/dist/core/prompt-commands.test.js +33 -0
- package/dist/core/prompt-commands.test.js.map +1 -0
- package/dist/core/repomap-context.d.ts +11 -0
- package/dist/core/repomap-context.d.ts.map +1 -0
- package/dist/core/repomap-context.js +68 -0
- package/dist/core/repomap-context.js.map +1 -0
- package/dist/core/repomap-context.test.d.ts +2 -0
- package/dist/core/repomap-context.test.d.ts.map +1 -0
- package/dist/core/repomap-context.test.js +47 -0
- package/dist/core/repomap-context.test.js.map +1 -0
- package/dist/core/repomap.d.ts +74 -0
- package/dist/core/repomap.d.ts.map +1 -0
- package/dist/core/repomap.js +897 -0
- package/dist/core/repomap.js.map +1 -0
- package/dist/core/repomap.test.d.ts +2 -0
- package/dist/core/repomap.test.d.ts.map +1 -0
- package/dist/core/repomap.test.js +444 -0
- package/dist/core/repomap.test.js.map +1 -0
- package/dist/core/session-compaction.d.ts +15 -0
- package/dist/core/session-compaction.d.ts.map +1 -0
- package/dist/core/session-compaction.js +31 -0
- package/dist/core/session-compaction.js.map +1 -0
- package/dist/core/session-compaction.test.d.ts +2 -0
- package/dist/core/session-compaction.test.d.ts.map +1 -0
- package/dist/core/session-compaction.test.js +70 -0
- package/dist/core/session-compaction.test.js.map +1 -0
- package/dist/core/settings-manager.d.ts +3 -5
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +6 -5
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/setup-history.d.ts +13 -0
- package/dist/core/setup-history.d.ts.map +1 -0
- package/dist/core/setup-history.js +71 -0
- package/dist/core/setup-history.js.map +1 -0
- package/dist/core/setup-history.test.d.ts +2 -0
- package/dist/core/setup-history.test.d.ts.map +1 -0
- package/dist/core/setup-history.test.js +74 -0
- package/dist/core/setup-history.test.js.map +1 -0
- package/dist/core/slash-commands.d.ts +2 -0
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +15 -14
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/style-packs/index.d.ts +19 -0
- package/dist/core/style-packs/index.d.ts.map +1 -0
- package/dist/core/style-packs/index.js +69 -0
- package/dist/core/style-packs/index.js.map +1 -0
- package/dist/core/style-packs/packs.d.ts +18 -0
- package/dist/core/style-packs/packs.d.ts.map +1 -0
- package/dist/core/style-packs/packs.js +229 -0
- package/dist/core/style-packs/packs.js.map +1 -0
- package/dist/core/verify-commands.d.ts +35 -0
- package/dist/core/verify-commands.d.ts.map +1 -0
- package/dist/core/verify-commands.js +209 -0
- package/dist/core/verify-commands.js.map +1 -0
- package/dist/core/verify-commands.test.d.ts +2 -0
- package/dist/core/verify-commands.test.d.ts.map +1 -0
- package/dist/core/verify-commands.test.js +85 -0
- package/dist/core/verify-commands.test.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +12 -6
- package/dist/interactive.js.map +1 -1
- package/dist/modes/json-mode.d.ts +7 -0
- package/dist/modes/json-mode.d.ts.map +1 -1
- package/dist/modes/json-mode.js +9 -1
- package/dist/modes/json-mode.js.map +1 -1
- package/dist/system-prompt.d.ts +2 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +116 -92
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.d.ts +2 -0
- package/dist/system-prompt.test.d.ts.map +1 -0
- package/dist/system-prompt.test.js +107 -0
- package/dist/system-prompt.test.js.map +1 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +1 -0
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit-diff.d.ts +66 -1
- package/dist/tools/edit-diff.d.ts.map +1 -1
- package/dist/tools/edit-diff.js +208 -10
- package/dist/tools/edit-diff.js.map +1 -1
- package/dist/tools/edit-diff.test.js +175 -15
- package/dist/tools/edit-diff.test.js.map +1 -1
- package/dist/tools/edit.d.ts +3 -1
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +190 -44
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/edit.test.js +392 -3
- package/dist/tools/edit.test.js.map +1 -1
- package/dist/tools/enter-plan.d.ts.map +1 -1
- package/dist/tools/enter-plan.js +1 -0
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/exit-plan.d.ts.map +1 -1
- package/dist/tools/exit-plan.js +1 -0
- package/dist/tools/exit-plan.js.map +1 -1
- package/dist/tools/index.d.ts +13 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -4
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +6 -4
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read.d.ts +1 -1
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +2 -1
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/subagent.d.ts +1 -1
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/subagent.js +55 -2
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +1 -0
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/web-fetch.d.ts +1 -0
- package/dist/tools/web-fetch.d.ts.map +1 -1
- package/dist/tools/web-fetch.js +96 -6
- package/dist/tools/web-fetch.js.map +1 -1
- package/dist/tools/web-fetch.test.d.ts +2 -0
- package/dist/tools/web-fetch.test.d.ts.map +1 -0
- package/dist/tools/web-fetch.test.js +90 -0
- package/dist/tools/web-fetch.test.js.map +1 -0
- package/dist/tools/web-search.d.ts +1 -0
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +167 -27
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools/web-search.test.d.ts +2 -0
- package/dist/tools/web-search.test.d.ts.map +1 -0
- package/dist/tools/web-search.test.js +119 -0
- package/dist/tools/web-search.test.js.map +1 -0
- package/dist/tools/write.d.ts +1 -1
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +3 -1
- package/dist/tools/write.js.map +1 -1
- package/dist/tools/write.test.js +23 -0
- package/dist/tools/write.test.js.map +1 -1
- package/dist/ui/App.d.ts +74 -3
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +727 -223
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/activity-phrases.d.ts +2 -1
- package/dist/ui/activity-phrases.d.ts.map +1 -1
- package/dist/ui/activity-phrases.js +11 -1
- package/dist/ui/activity-phrases.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.d.ts +15 -1
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +143 -44
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/ActivityIndicator.test.d.ts +2 -0
- package/dist/ui/components/ActivityIndicator.test.d.ts.map +1 -0
- package/dist/ui/components/ActivityIndicator.test.js +40 -0
- package/dist/ui/components/ActivityIndicator.test.js.map +1 -0
- package/dist/ui/components/AnimationContext.d.ts +8 -2
- package/dist/ui/components/AnimationContext.d.ts.map +1 -1
- package/dist/ui/components/AnimationContext.js +94 -16
- package/dist/ui/components/AnimationContext.js.map +1 -1
- package/dist/ui/components/AssistantMessage.js +1 -1
- package/dist/ui/components/AssistantMessage.js.map +1 -1
- package/dist/ui/components/CompactionNotice.d.ts +5 -1
- package/dist/ui/components/CompactionNotice.d.ts.map +1 -1
- package/dist/ui/components/CompactionNotice.js +4 -6
- package/dist/ui/components/CompactionNotice.js.map +1 -1
- package/dist/ui/components/Footer.d.ts +10 -2
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +45 -8
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +76 -28
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/ServerToolExecution.d.ts +1 -0
- package/dist/ui/components/ServerToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ServerToolExecution.js +21 -2
- package/dist/ui/components/ServerToolExecution.js.map +1 -1
- package/dist/ui/components/Spinner.d.ts +3 -1
- package/dist/ui/components/Spinner.d.ts.map +1 -1
- package/dist/ui/components/Spinner.js +10 -4
- package/dist/ui/components/Spinner.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.map +1 -1
- package/dist/ui/components/SubAgentPanel.js +3 -4
- package/dist/ui/components/SubAgentPanel.js.map +1 -1
- 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 +24 -5
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/components/ToolGroupExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolGroupExecution.js +23 -2
- package/dist/ui/components/ToolGroupExecution.js.map +1 -1
- package/dist/ui/components/ToolUseLoader.d.ts +4 -2
- package/dist/ui/components/ToolUseLoader.d.ts.map +1 -1
- package/dist/ui/components/ToolUseLoader.js +3 -3
- package/dist/ui/components/ToolUseLoader.js.map +1 -1
- package/dist/ui/components/index.d.ts +1 -2
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/index.js +1 -2
- package/dist/ui/components/index.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.d.ts +4 -1
- package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentLoop.js +110 -13
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/hooks/useBlink.d.ts.map +1 -1
- package/dist/ui/hooks/useBlink.js +3 -4
- package/dist/ui/hooks/useBlink.js.map +1 -1
- package/dist/ui/hooks/useTerminalSize.d.ts +12 -3
- package/dist/ui/hooks/useTerminalSize.d.ts.map +1 -1
- package/dist/ui/hooks/useTerminalSize.js +16 -1
- package/dist/ui/hooks/useTerminalSize.js.map +1 -1
- package/dist/ui/pixel.js +1 -1
- package/dist/ui/pixel.test.js +1 -1
- package/dist/ui/pixel.test.js.map +1 -1
- package/dist/ui/render.d.ts +48 -1
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +56 -6
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/theme/dark-ansi.json +2 -1
- package/dist/ui/theme/dark-daltonized.json +2 -1
- package/dist/ui/theme/dark.json +2 -1
- package/dist/ui/theme/light-ansi.json +2 -1
- package/dist/ui/theme/light-daltonized.json +2 -1
- package/dist/ui/theme/light.json +2 -1
- package/dist/ui/theme/theme.d.ts +1 -0
- package/dist/ui/theme/theme.d.ts.map +1 -1
- package/dist/utils/error-handler.d.ts.map +1 -1
- package/dist/utils/error-handler.js +2 -0
- package/dist/utils/error-handler.js.map +1 -1
- package/package.json +9 -6
- package/dist/ui/buddy/Buddy.d.ts +0 -15
- package/dist/ui/buddy/Buddy.d.ts.map +0 -1
- package/dist/ui/buddy/Buddy.js +0 -118
- package/dist/ui/buddy/Buddy.js.map +0 -1
- package/dist/ui/buddy/gacha.d.ts +0 -8
- package/dist/ui/buddy/gacha.d.ts.map +0 -1
- package/dist/ui/buddy/gacha.js +0 -94
- package/dist/ui/buddy/gacha.js.map +0 -1
- package/dist/ui/buddy/species.d.ts +0 -52
- package/dist/ui/buddy/species.d.ts.map +0 -1
- package/dist/ui/buddy/species.js +0 -257
- package/dist/ui/buddy/species.js.map +0 -1
- package/dist/ui/components/ThinkingIndicator.d.ts +0 -6
- package/dist/ui/components/ThinkingIndicator.d.ts.map +0 -1
- package/dist/ui/components/ThinkingIndicator.js +0 -145
- package/dist/ui/components/ThinkingIndicator.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { createTools, createReadTool, createWriteTool, createEditTool, createBashTool, createFindTool, createGrepTool, createLsTool, } from "./tools/index.js";
|
|
2
2
|
export { buildSystemPrompt } from "./system-prompt.js";
|
|
3
3
|
export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
|
|
4
|
-
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
4
|
+
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, usesOpenAICodexTransport, getMaxThinkingLevel, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
5
5
|
export { runPrintMode } from "./modes/index.js";
|
|
6
6
|
export { renderApp } from "./ui/render.js";
|
|
7
7
|
export { APP_NAME, VERSION, getAppPaths, ensureAppDirs } from "./config.js";
|
|
8
8
|
export type { CliConfig, SessionHeader as LegacySessionHeader, SessionMessageEntry, SessionEntry as LegacySessionEntry, SessionInfo as LegacySessionInfo, } from "./types.js";
|
|
9
|
-
export type { AgentSessionOptions, AgentSessionState, BusEventMap, ModelInfo, Settings, SlashCommand, SlashCommandContext, Skill, Extension, ExtensionContext, CompactionResult, SessionEntry, SessionInfo, SessionHeader, } from "./core/index.js";
|
|
9
|
+
export type { AgentSessionOptions, AgentSessionState, BusEventMap, ContextWindowOptions, ModelInfo, Settings, SlashCommand, SlashCommandContext, Skill, Extension, ExtensionContext, CompactionResult, SessionEntry, SessionInfo, SessionHeader, } from "./core/index.js";
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,EACnB,YAAY,IAAI,kBAAkB,EAClC,WAAW,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAGvD,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAGtB,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACpB,eAAe,EACf,MAAM,EACN,QAAQ,EACR,oBAAoB,EACpB,eAAe,EACf,gBAAgB,EAChB,wBAAwB,EACxB,mBAAmB,EACnB,aAAa,EACb,OAAO,EACP,cAAc,EACd,cAAc,EACd,0BAA0B,GAC3B,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAG3C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAG5E,YAAY,EACV,SAAS,EACT,aAAa,IAAI,mBAAmB,EACpC,mBAAmB,EACnB,YAAY,IAAI,kBAAkB,EAClC,WAAW,IAAI,iBAAiB,GACjC,MAAM,YAAY,CAAC;AAEpB,YAAY,EACV,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,aAAa,GACd,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@ export { buildSystemPrompt } from "./system-prompt.js";
|
|
|
5
5
|
// Session (legacy — still usable)
|
|
6
6
|
export { createSession, loadSession, listSessions, getMostRecentSession, persistMessage, } from "./session.js";
|
|
7
7
|
// Core
|
|
8
|
-
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
8
|
+
export { EventBus, AgentSession, SessionManager, SettingsManager, AuthStorage, SlashCommandRegistry, ExtensionLoader, MODELS, getModel, getModelsForProvider, getDefaultModel, getContextWindow, usesOpenAICodexTransport, getMaxThinkingLevel, shouldCompact, compact, discoverSkills, estimateTokens, estimateConversationTokens, } from "./core/index.js";
|
|
9
9
|
// Modes
|
|
10
10
|
export { runPrintMode } from "./modes/index.js";
|
|
11
11
|
// UI entry
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,OAAO,EACL,WAAW,EACX,cAAc,EACd,eAAe,EACf,cAAc,EACd,cAAc,EACd,cAAc,EACd,cAAc,EACd,YAAY,GACb,MAAM,kBAAkB,CAAC;AAE1B,gBAAgB;AAChB,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,kCAAkC;AAClC,OAAO,EACL,aAAa,EACb,WAAW,EACX,YAAY,EACZ,oBAAoB,EACpB,cAAc,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO;AACP,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,cAAc,EACd,eAAe,EACf,WAAW,EACX,oBAAoB,EACp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,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAyB5C,wBAAsB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"interactive.d.ts","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAyB5C,wBAAsB,cAAc,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAqKrE"}
|
package/dist/interactive.js
CHANGED
|
@@ -21,14 +21,18 @@ export async function runInteractive(config) {
|
|
|
21
21
|
await fs.mkdir(path.join(localEzDir, "skills"), { recursive: true });
|
|
22
22
|
await fs.mkdir(path.join(localEzDir, "commands"), { recursive: true });
|
|
23
23
|
await fs.mkdir(path.join(localEzDir, "agents"), { recursive: true });
|
|
24
|
-
// Discover skills
|
|
24
|
+
// Discover skills and create tools before building the prompt so tool names are accurate.
|
|
25
25
|
const skills = await discoverSkills({
|
|
26
26
|
globalSkillsDir: paths.skillsDir,
|
|
27
27
|
projectDir: cwd,
|
|
28
28
|
});
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
const { tools, processManager } = createTools(cwd, {
|
|
30
|
+
skills,
|
|
31
|
+
provider,
|
|
32
|
+
model,
|
|
33
|
+
});
|
|
34
|
+
const systemPrompt = config.systemPrompt ??
|
|
35
|
+
(await buildSystemPrompt(cwd, skills, false, undefined, tools.map((tool) => tool.name)));
|
|
32
36
|
process.on("exit", () => processManager.shutdownAll());
|
|
33
37
|
const authStorage = new AuthStorage(paths.authFile);
|
|
34
38
|
await authStorage.load();
|
|
@@ -69,14 +73,16 @@ export async function runInteractive(config) {
|
|
|
69
73
|
// Auto-compact on load if the restored session exceeds the context window.
|
|
70
74
|
// Without this, huge sessions (1M+ tokens) get loaded into memory and OOM.
|
|
71
75
|
if (messages.length > 1) {
|
|
72
|
-
const
|
|
76
|
+
const creds = await authStorage.resolveCredentials(provider);
|
|
77
|
+
const contextWindow = getContextWindow(model, { provider, accountId: creds.accountId });
|
|
73
78
|
if (shouldCompact(messages, contextWindow, 0.8)) {
|
|
74
79
|
stdout.write("Compacting restored session...\n");
|
|
75
|
-
const creds = await authStorage.resolveCredentials(provider);
|
|
76
80
|
const compacted = await compact(messages, {
|
|
77
81
|
provider,
|
|
78
82
|
model,
|
|
79
83
|
apiKey: creds.accessToken,
|
|
84
|
+
accountId: creds.accountId,
|
|
85
|
+
baseUrl: config.baseUrl ?? creds.baseUrl,
|
|
80
86
|
contextWindow,
|
|
81
87
|
});
|
|
82
88
|
messages.length = 0;
|
package/dist/interactive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive.js","sourceRoot":"","sources":["../src/interactive.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAmB,MAAM,gBAAgB,CAAC;AAG5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EACL,aAAa,EACb,WAAW,EACX,oBAAoB,EACpB,cAAc,GAEf,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,WAAW,EACX,WAAW,EACX,aAAa,GACd,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,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I,EAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC;YACxE,MAAM;QAER,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,SAAS,CAAC;YAC9D,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;YACvC,MAAM,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC,CAAC;YAC9F,MAAM;QACR,CAAC;QAED,KAAK,UAAU;YACb,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,KAAK,CAAC,KAAK,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC,CAAC;YACpF,MAAM;QAER,KAAK,YAAY;YACf,iDAAiD;YACjD,MAAM;QAER,KAAK,OAAO;YACV,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC;YAC9C,MAAM;IACV,CAAC;AACH,CAAC"}
|
|
@@ -8,6 +8,13 @@ export interface JsonModeOptions {
|
|
|
8
8
|
cwd: string;
|
|
9
9
|
thinkingLevel?: ThinkingLevel;
|
|
10
10
|
maxTurns?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Stable prompt-cache routing key inherited from the parent ezcoder
|
|
13
|
+
* process. Without this, each sub-agent session generates a unique
|
|
14
|
+
* sessionId-derived cache key and starts with a cold cache on providers
|
|
15
|
+
* that route caching by key (OpenAI Codex, OpenAI Chat, Moonshot).
|
|
16
|
+
*/
|
|
17
|
+
promptCacheKey?: string;
|
|
11
18
|
}
|
|
12
19
|
export declare function runJsonMode(options: JsonModeOptions): Promise<void>;
|
|
13
20
|
//# sourceMappingURL=json-mode.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-mode.d.ts","sourceRoot":"","sources":["../../src/modes/json-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"json-mode.d.ts","sourceRoot":"","sources":["../../src/modes/json-mode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAM3D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,QAAQ,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAMD,wBAAsB,WAAW,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CA6EzE"}
|
package/dist/modes/json-mode.js
CHANGED
|
@@ -20,7 +20,15 @@ export async function runJsonMode(options) {
|
|
|
20
20
|
thinkingLevel: options.thinkingLevel,
|
|
21
21
|
maxTurns: options.maxTurns,
|
|
22
22
|
signal: ac.signal,
|
|
23
|
-
|
|
23
|
+
// Subagent runs are one-shot, NDJSON-streamed to the parent over stdout,
|
|
24
|
+
// and have no resumable identity. Skip writing a `.jsonl` so the spawn
|
|
25
|
+
// doesn't show up in `ezcoder continue` for the parent project.
|
|
26
|
+
transient: true,
|
|
27
|
+
// Parent-supplied cache routing key. When set, AgentSession uses it
|
|
28
|
+
// verbatim instead of generating `${prefix}:${sessionId}` — so every
|
|
29
|
+
// sub-agent spawned by one parent shares the same prompt_cache_key and
|
|
30
|
+
// benefits from warm cache lookups on the shared system+tool prefix.
|
|
31
|
+
promptCacheKey: options.promptCacheKey,
|
|
24
32
|
};
|
|
25
33
|
const session = new AgentSession(sessionOpts);
|
|
26
34
|
// Forward all agent events as NDJSON to stdout
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-mode.js","sourceRoot":"","sources":["../../src/modes/json-mode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"json-mode.js","sourceRoot":"","sources":["../../src/modes/json-mode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAoBhD,SAAS,QAAQ,CAAC,OAAgC;IAChD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC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H,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE;QACzC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,MAAM,OAAO,CAAC,UAAU,EAAE,CAAC;QAC3B,MAAM,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAI,YAAY,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,CAAC,CAAC;YACpD,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;QAClD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;YAAS,CAAC;QACT,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QAC3C,MAAM,OAAO,CAAC,OAAO,EAAE,CAAC;QACxB,WAAW,EAAE,CAAC;IAChB,CAAC;AACH,CAAC"}
|
package/dist/system-prompt.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Skill } from "./core/skills.js";
|
|
2
|
+
import type { LanguageId } from "./core/language-detector.js";
|
|
2
3
|
/**
|
|
3
4
|
* Build the system prompt dynamically based on cwd and context.
|
|
4
5
|
*
|
|
@@ -6,5 +7,5 @@ import { type Skill } from "./core/skills.js";
|
|
|
6
7
|
* Pass `tools.map(t => t.name)` from the session so the prompt reflects
|
|
7
8
|
* exactly what the model can call. Defaults to the full built-in set.
|
|
8
9
|
*/
|
|
9
|
-
export declare function buildSystemPrompt(cwd: string, skills?: Skill[], planMode?: boolean, approvedPlanPath?: string, toolNames?: readonly string[]): Promise<string>;
|
|
10
|
+
export declare function buildSystemPrompt(cwd: string, skills?: Skill[], planMode?: boolean, approvedPlanPath?: string, toolNames?: readonly string[], activeLanguages?: Set<LanguageId>): Promise<string>;
|
|
10
11
|
//# sourceMappingURL=system-prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAGA,OAAO,EAAyB,KAAK,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAErE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAyK9D;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,KAAK,EAAE,EAChB,QAAQ,CAAC,EAAE,OAAO,EAClB,gBAAgB,CAAC,EAAE,MAAM,EACzB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,EAC7B,eAAe,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC,GAChC,OAAO,CAAC,MAAM,CAAC,CAkDjB"}
|
package/dist/system-prompt.js
CHANGED
|
@@ -3,22 +3,17 @@ import path from "node:path";
|
|
|
3
3
|
import { isEyesActive, readJournal } from "@prestyj/eyes";
|
|
4
4
|
import { formatSkillsForPrompt } from "./core/skills.js";
|
|
5
5
|
import { TOOL_PROMPT_HINTS, DEFAULT_TOOL_NAMES } from "./tools/prompt-hints.js";
|
|
6
|
+
import { renderStylePacksSection } from "./core/style-packs/index.js";
|
|
7
|
+
import { detectVerifyCommands, renderVerifySection } from "./core/verify-commands.js";
|
|
6
8
|
const CONTEXT_FILES = ["AGENTS.md", "CLAUDE.md", ".cursorrules", "CONVENTIONS.md"];
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
* @param toolNames — if provided, the Tools section only lists these tools.
|
|
11
|
-
* Pass `tools.map(t => t.name)` from the session so the prompt reflects
|
|
12
|
-
* exactly what the model can call. Defaults to the full built-in set.
|
|
13
|
-
*/
|
|
14
|
-
export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath, toolNames) {
|
|
15
|
-
const sections = [];
|
|
16
|
-
// 1. Identity
|
|
17
|
-
sections.push(`You are EZ Coder by Nolan Grout — a coding agent that works directly in the user's codebase. ` +
|
|
9
|
+
const UNCACHED_MARKER = "<!-- uncached -->";
|
|
10
|
+
function renderIdentitySection() {
|
|
11
|
+
return (`You are EZ Coder by Nolan Grout — a coding agent that works directly in the user's codebase. ` +
|
|
18
12
|
`You explore, understand, change, and verify code — completing tasks end-to-end ` +
|
|
19
13
|
`rather than just suggesting edits.`);
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
}
|
|
15
|
+
function renderTalkSection() {
|
|
16
|
+
return (`## How to Talk\n\n` +
|
|
22
17
|
`**Between tool calls**: one short sentence max — what you're doing next. ` +
|
|
23
18
|
`No quoting tool output, no restating the problem, no thinking out loud. Think silently, then act.\n\n` +
|
|
24
19
|
`**Final replies**: 1–3 sentences, hard cap 5. No preamble, no recap, no "let me know if…". ` +
|
|
@@ -29,75 +24,72 @@ export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath,
|
|
|
29
24
|
`Good: "Found it — forms.css global rule out-specifies mine. Fixing." [edit]\n\n` +
|
|
30
25
|
`**Exceptions**: ask before destructive actions, surface real tradeoffs, admit unverified claims. ` +
|
|
31
26
|
`Plan mode is exempt.`);
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
}
|
|
28
|
+
function renderWorkSection() {
|
|
29
|
+
return (`## How to Work\n\n` +
|
|
34
30
|
`- **Read before \`edit\`/\`write\`.** No edit/write without a prior read this session — missed reads waste the payload.\n` +
|
|
31
|
+
`- **Re-read after mutating tools.** Anything that rewrites files on disk (formatter, \`lint --fix\`, codemods, codegen, \`git checkout --\`) invalidates your cached view. Read the file again before the next \`edit\`/\`write\` — stale \`old_string\` matches fail, or worse, silently overwrite the mutation.\n` +
|
|
32
|
+
`- **Compute in bash, write with \`edit\`.** When a task needs computation (word counts, regex, padding, structural validation), use bash for the computation and the \`edit\` tool to apply the result. Shelling out to \`python -c '... f.write(...)'\` or \`sed -i\` loses read-tracking, partial-apply, indent forgiveness, and actionable error messages — and a mid-script crash leaves the file in unknown state.\n` +
|
|
35
33
|
`- **Match the neighbors.** Before any user-visible change: find the closest existing equivalent, reuse components/tokens, mirror tone. No sibling? Stop and ask. Generic-looking output is a regression.\n` +
|
|
36
34
|
`- **Edits stay small.** Plan multi-file work first. After: run tests/typecheck/lint, read errors, rebuild.\n` +
|
|
37
35
|
`- **Just do it.** Routine follow-up (build, migrate, seed, re-run) is yours — don't ask.\n` +
|
|
38
36
|
`- **Ask first for destructive actions**: deleting files, force-push, dropping data, killing processes, \`rm -rf\`, \`--hard\`, \`--force\`.\n` +
|
|
39
37
|
`- **Investigate unexpected state** (unfamiliar files, branches, locks) — may be the user's in-progress work.\n` +
|
|
40
|
-
`- **
|
|
38
|
+
`- **Precedence when rules conflict** (highest first): AGENTS.md / CLAUDE.md / .cursorrules / CONVENTIONS.md → existing patterns in the edited file/module → Language Style Packs → defaults in this prompt.\n` +
|
|
39
|
+
`- **Verify after meaningful edits.** When a Verification section is present, run the relevant commands for the language(s) you touched. Fix failures before reporting completion.\n` +
|
|
41
40
|
`- **Untracked files → \`.gitignore\`**: artifacts, configs, secrets, logs, scratch, \`.env\`, caches.\n` +
|
|
42
41
|
`- **Never fake verification.** If you didn't run the check or it failed, say so. Don't invent results.`);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
if (approvedPlanPath
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
`- **
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
` - Workflow: \`peek: true\` first → paths + match counts only (cheap triage). Then call again narrowed by \`repo\` + \`path\` for full snippets. Paginate with \`offset\`.\n` +
|
|
86
|
-
` - Defaults exclude tests, \`node_modules\`, vendored, build, and generated files — pass \`includeTests: true\` or \`includeVendored: true\` to widen.\n` +
|
|
87
|
-
` - Token budget: \`maxResults\` defaults to 10 (cap 200), \`contextLines\` defaults to 5 (range 0–20). Keep both small unless you need more.\n` +
|
|
88
|
-
` - RE2 regex only: no lookahead/lookbehind/backrefs; multi-line patterns need \`(?s)\` prefix.\n` +
|
|
89
|
-
`- Applies to everything — APIs, CLI flags, configs (vite.config.ts, package.json, Dockerfile, GH Actions), shell idioms, schema shapes, error wording, conventions. Not just "unfamiliar" code.`);
|
|
90
|
-
// 4. Code Quality
|
|
91
|
-
sections.push(`## Code Quality\n\n` +
|
|
42
|
+
}
|
|
43
|
+
function renderPlanModeSection() {
|
|
44
|
+
return (`## Plan Mode (ACTIVE)\n\n` +
|
|
45
|
+
`You are in PLAN MODE. Research and design an implementation plan before writing any code.\n\n` +
|
|
46
|
+
`### Workflow\n` +
|
|
47
|
+
`1. Explore: read, grep, find, ls to understand the codebase\n` +
|
|
48
|
+
`2. Research: \`web_search\` + \`web_fetch\` for docs; for real code, use Explore to discover candidate repos/files/anchors, then SearchCode to verify exact snippets (full usage below)\n` +
|
|
49
|
+
`3. Draft: write the plan to .ezcoder/plans/<name>.md\n` +
|
|
50
|
+
`4. Submit: call exit_plan with the plan path\n\n` +
|
|
51
|
+
`### Rules\n` +
|
|
52
|
+
`- bash, edit, write (except to .ezcoder/plans/), and subagent are restricted\n` +
|
|
53
|
+
`- Be specific: exact file paths, function names, line numbers\n` +
|
|
54
|
+
`- Note risks and verification criteria\n\n` +
|
|
55
|
+
`### Plan Format\n` +
|
|
56
|
+
`Plan can have any structure, but it MUST end with a section titled exactly \`## Steps\` ` +
|
|
57
|
+
`containing a single flat numbered list. This section is parsed by the progress widget — ` +
|
|
58
|
+
`the ONLY source of truth for step tracking. Do NOT put numbered lists elsewhere.`);
|
|
59
|
+
}
|
|
60
|
+
async function renderApprovedPlanSection(approvedPlanPath, planMode) {
|
|
61
|
+
if (!approvedPlanPath || planMode)
|
|
62
|
+
return null;
|
|
63
|
+
const planContent = await fs.readFile(approvedPlanPath, "utf-8").catch(() => null);
|
|
64
|
+
if (planContent === null)
|
|
65
|
+
return null;
|
|
66
|
+
if (!planContent.trim())
|
|
67
|
+
return null;
|
|
68
|
+
return (`## Approved Plan\n\n` +
|
|
69
|
+
`Follow this plan strictly. File: ${approvedPlanPath}\n\n` +
|
|
70
|
+
`<approved_plan>\n${planContent.trim()}\n</approved_plan>\n\n` +
|
|
71
|
+
`- Follow step order. Don't deviate without user confirmation.\n` +
|
|
72
|
+
`- After each step from \`## Steps\`, output \`[DONE:n]\` (e.g. \`[DONE:1]\`) to update the progress widget, then continue with step n+1 in the same turn.`);
|
|
73
|
+
}
|
|
74
|
+
function renderResearchSection() {
|
|
75
|
+
return (`## Research & Verification\n\n` +
|
|
76
|
+
`Do not assume current APIs, CLI flags, config schema, or error wording — verify.\n\n` +
|
|
77
|
+
`- **Docs first**: use \`web_search\` to find authoritative pages, then \`web_fetch\` to read them.\n` +
|
|
78
|
+
`- **Public code samples**: use \`mcp__kencode-search__exploreCodeSamples\` once early for examples/patterns/ideas/best practices or vague concepts. Treat it as anchor discovery: read its recommended options and copy 3–5 of its follow-up \`searchCode\` calls before inventing new queries.\n` +
|
|
79
|
+
`- **Exact code search**: use \`mcp__kencode-search__searchCode\` to verify snippets by literal text or RE2 regex only — NOT semantic search. Put code tokens in \`query\`; use \`path\` only for literal file-path substrings and \`repo\` only after a broad/peek search proves the anchor exists. Report Explore-only results as candidates, SearchCode results as verified code.\n` +
|
|
80
|
+
`- **Verify after edits**: run relevant checks, read failures, fix them, and never report unrun or failing checks as passing.`);
|
|
81
|
+
}
|
|
82
|
+
function renderCodeQualitySection() {
|
|
83
|
+
return (`## Code Quality\n\n` +
|
|
92
84
|
`- Descriptive names that reveal intent. Define types before implementation.\n` +
|
|
93
85
|
`- No dead code, no commented-out code. No stubs or placeholders unless asked.\n` +
|
|
94
86
|
`- Handle errors at I/O, user input, and external API boundaries.\n` +
|
|
95
87
|
`- Prefer existing dependencies. Don't refactor or reorganize unprompted.`);
|
|
96
|
-
|
|
88
|
+
}
|
|
89
|
+
function renderToolsSection(toolNames, planMode) {
|
|
97
90
|
const activeTools = toolNames ?? DEFAULT_TOOL_NAMES;
|
|
98
91
|
const toolLines = [];
|
|
99
92
|
for (const name of activeTools) {
|
|
100
|
-
// In plan mode, hide enter_plan (already entered); outside plan mode, hide exit_plan.
|
|
101
93
|
if (planMode && name === "enter_plan")
|
|
102
94
|
continue;
|
|
103
95
|
if (!planMode && name === "exit_plan")
|
|
@@ -106,10 +98,9 @@ export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath,
|
|
|
106
98
|
if (hint)
|
|
107
99
|
toolLines.push(`- **${name}**: ${hint}`);
|
|
108
100
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
// 6. Project context — walk from cwd to root looking for context files
|
|
101
|
+
return toolLines.length > 0 ? `## Tools\n\n${toolLines.join("\n")}` : null;
|
|
102
|
+
}
|
|
103
|
+
async function collectProjectContext(cwd) {
|
|
113
104
|
const contextParts = [];
|
|
114
105
|
let dir = cwd;
|
|
115
106
|
const visited = new Set();
|
|
@@ -123,7 +114,7 @@ export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath,
|
|
|
123
114
|
contextParts.push(`### ${relPath}\n\n${content.trim()}`);
|
|
124
115
|
}
|
|
125
116
|
catch {
|
|
126
|
-
// File doesn't exist, skip
|
|
117
|
+
// File doesn't exist, skip.
|
|
127
118
|
}
|
|
128
119
|
}
|
|
129
120
|
const parent = path.dirname(dir);
|
|
@@ -131,10 +122,56 @@ export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath,
|
|
|
131
122
|
break;
|
|
132
123
|
dir = parent;
|
|
133
124
|
}
|
|
134
|
-
|
|
135
|
-
|
|
125
|
+
return contextParts;
|
|
126
|
+
}
|
|
127
|
+
function renderProjectContextSection(contextParts) {
|
|
128
|
+
if (contextParts.length === 0)
|
|
129
|
+
return null;
|
|
130
|
+
return (`## Project Context\n\n` +
|
|
131
|
+
`**Highest precedence** — AGENTS.md / CLAUDE.md override Language Style Packs and all default guidance. ` +
|
|
132
|
+
`When these files conflict with anything else in this prompt, follow the project file.\n\n` +
|
|
133
|
+
contextParts.join("\n\n"));
|
|
134
|
+
}
|
|
135
|
+
function renderEnvironmentSection(cwd) {
|
|
136
|
+
return `## Environment\n\n- Working directory: ${cwd}\n- Platform: ${process.platform}`;
|
|
137
|
+
}
|
|
138
|
+
function renderUncachedDateSuffix() {
|
|
139
|
+
const today = new Date();
|
|
140
|
+
const day = today.getDate();
|
|
141
|
+
const month = today.toLocaleString("en-US", { month: "long" });
|
|
142
|
+
const year = today.getFullYear();
|
|
143
|
+
return `${UNCACHED_MARKER}\nToday's date: ${day} ${month} ${year}`;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Build the system prompt dynamically based on cwd and context.
|
|
147
|
+
*
|
|
148
|
+
* @param toolNames — if provided, the Tools section only lists these tools.
|
|
149
|
+
* Pass `tools.map(t => t.name)` from the session so the prompt reflects
|
|
150
|
+
* exactly what the model can call. Defaults to the full built-in set.
|
|
151
|
+
*/
|
|
152
|
+
export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath, toolNames, activeLanguages) {
|
|
153
|
+
const sections = [renderIdentitySection(), renderTalkSection(), renderWorkSection()];
|
|
154
|
+
if (planMode)
|
|
155
|
+
sections.push(renderPlanModeSection());
|
|
156
|
+
const approvedPlanSection = await renderApprovedPlanSection(approvedPlanPath, planMode);
|
|
157
|
+
if (approvedPlanSection)
|
|
158
|
+
sections.push(approvedPlanSection);
|
|
159
|
+
sections.push(renderResearchSection(), renderCodeQualitySection());
|
|
160
|
+
const toolsSection = renderToolsSection(toolNames, planMode);
|
|
161
|
+
if (toolsSection)
|
|
162
|
+
sections.push(toolsSection);
|
|
163
|
+
const projectContextSection = renderProjectContextSection(await collectProjectContext(cwd));
|
|
164
|
+
if (projectContextSection)
|
|
165
|
+
sections.push(projectContextSection);
|
|
166
|
+
if (activeLanguages && activeLanguages.size > 0) {
|
|
167
|
+
const stylePacks = renderStylePacksSection(activeLanguages, cwd);
|
|
168
|
+
if (stylePacks)
|
|
169
|
+
sections.push(stylePacks);
|
|
170
|
+
const verifyCmds = detectVerifyCommands(cwd, activeLanguages);
|
|
171
|
+
const verifySection = renderVerifySection(verifyCmds);
|
|
172
|
+
if (verifySection)
|
|
173
|
+
sections.push(verifySection);
|
|
136
174
|
}
|
|
137
|
-
// 7. Eyes — open improvement signals from past probe use (gated on .ezcoder/eyes/manifest.json)
|
|
138
175
|
if (isEyesActive(cwd)) {
|
|
139
176
|
const open = readJournal({ status: "open", order: "desc", limit: 10 }, cwd);
|
|
140
177
|
if (open.length > 0) {
|
|
@@ -144,30 +181,17 @@ export async function buildSystemPrompt(cwd, skills, planMode, approvedPlanPath,
|
|
|
144
181
|
return `- ${date} · *${e.kind}*${probeTag}: ${e.reason}`;
|
|
145
182
|
});
|
|
146
183
|
sections.push(`## Eyes — Open Improvement Signals\n\n` +
|
|
147
|
-
`These
|
|
148
|
-
`
|
|
149
|
-
`inadequate capability would force you to **guess, skip verification, or hand-wave**, ` +
|
|
150
|
-
`surface the tradeoff in conversation rather than working around it silently — give the ` +
|
|
151
|
-
`user the choice to fix the probe first.\n\n` +
|
|
184
|
+
`These unresolved signals from this project's perception probes (\`.ezcoder/eyes/\`) may bear on the work. ` +
|
|
185
|
+
`If a missing capability would force guessing or skipped verification, surface the tradeoff instead.\n\n` +
|
|
152
186
|
lines.join("\n"));
|
|
153
187
|
}
|
|
154
188
|
}
|
|
155
|
-
// 9. Skills
|
|
156
189
|
if (skills && skills.length > 0) {
|
|
157
190
|
const skillsSection = formatSkillsForPrompt(skills);
|
|
158
|
-
if (skillsSection)
|
|
191
|
+
if (skillsSection)
|
|
159
192
|
sections.push(skillsSection);
|
|
160
|
-
}
|
|
161
193
|
}
|
|
162
|
-
|
|
163
|
-
sections.push(`## Environment\n\n` + `- Working directory: ${cwd}\n` + `- Platform: ${process.platform}`);
|
|
164
|
-
// Dynamic section (uncached) — separated by marker so the transform layer
|
|
165
|
-
// can split the system prompt into cached + uncached blocks.
|
|
166
|
-
const today = new Date();
|
|
167
|
-
const day = today.getDate();
|
|
168
|
-
const month = today.toLocaleString("en-US", { month: "long" });
|
|
169
|
-
const year = today.getFullYear();
|
|
170
|
-
sections.push(`<!-- uncached -->\nToday's date: ${day} ${month} ${year}`);
|
|
194
|
+
sections.push(renderEnvironmentSection(cwd), renderUncachedDateSuffix());
|
|
171
195
|
return sections.join("\n\n");
|
|
172
196
|
}
|
|
173
197
|
//# sourceMappingURL=system-prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system-prompt.js","sourceRoot":"","sources":["../src/system-prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1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