codeep 1.2.16 → 1.2.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/README.md +20 -7
  2. package/dist/api/index.d.ts +7 -0
  3. package/dist/api/index.js +21 -17
  4. package/dist/renderer/App.d.ts +1 -5
  5. package/dist/renderer/App.js +106 -486
  6. package/dist/renderer/Input.js +8 -1
  7. package/dist/renderer/agentExecution.d.ts +36 -0
  8. package/dist/renderer/agentExecution.js +394 -0
  9. package/dist/renderer/commands.d.ts +16 -0
  10. package/dist/renderer/commands.js +838 -0
  11. package/dist/renderer/handlers.d.ts +87 -0
  12. package/dist/renderer/handlers.js +260 -0
  13. package/dist/renderer/highlight.d.ts +18 -0
  14. package/dist/renderer/highlight.js +130 -0
  15. package/dist/renderer/main.d.ts +4 -2
  16. package/dist/renderer/main.js +103 -1550
  17. package/dist/utils/agent.d.ts +5 -15
  18. package/dist/utils/agent.js +9 -693
  19. package/dist/utils/agentChat.d.ts +46 -0
  20. package/dist/utils/agentChat.js +343 -0
  21. package/dist/utils/agentStream.d.ts +23 -0
  22. package/dist/utils/agentStream.js +216 -0
  23. package/dist/utils/keychain.js +3 -2
  24. package/dist/utils/learning.js +9 -3
  25. package/dist/utils/mcpIntegration.d.ts +61 -0
  26. package/dist/utils/mcpIntegration.js +154 -0
  27. package/dist/utils/project.js +8 -3
  28. package/dist/utils/skills.js +21 -11
  29. package/dist/utils/smartContext.d.ts +4 -0
  30. package/dist/utils/smartContext.js +51 -14
  31. package/dist/utils/toolExecution.d.ts +27 -0
  32. package/dist/utils/toolExecution.js +525 -0
  33. package/dist/utils/toolParsing.d.ts +18 -0
  34. package/dist/utils/toolParsing.js +302 -0
  35. package/dist/utils/tools.d.ts +27 -24
  36. package/dist/utils/tools.js +30 -1169
  37. package/package.json +3 -1
  38. package/dist/config/config.test.d.ts +0 -1
  39. package/dist/config/config.test.js +0 -157
  40. package/dist/config/providers.test.d.ts +0 -1
  41. package/dist/config/providers.test.js +0 -187
  42. package/dist/hooks/index.d.ts +0 -4
  43. package/dist/hooks/index.js +0 -4
  44. package/dist/hooks/useAgent.d.ts +0 -29
  45. package/dist/hooks/useAgent.js +0 -148
  46. package/dist/utils/agent.test.d.ts +0 -1
  47. package/dist/utils/agent.test.js +0 -315
  48. package/dist/utils/git.test.d.ts +0 -1
  49. package/dist/utils/git.test.js +0 -193
  50. package/dist/utils/gitignore.test.d.ts +0 -1
  51. package/dist/utils/gitignore.test.js +0 -167
  52. package/dist/utils/project.test.d.ts +0 -1
  53. package/dist/utils/project.test.js +0 -212
  54. package/dist/utils/ratelimit.test.d.ts +0 -1
  55. package/dist/utils/ratelimit.test.js +0 -131
  56. package/dist/utils/retry.test.d.ts +0 -1
  57. package/dist/utils/retry.test.js +0 -163
  58. package/dist/utils/smartContext.test.d.ts +0 -1
  59. package/dist/utils/smartContext.test.js +0 -382
  60. package/dist/utils/tools.test.d.ts +0 -1
  61. package/dist/utils/tools.test.js +0 -676
  62. package/dist/utils/validation.test.d.ts +0 -1
  63. package/dist/utils/validation.test.js +0 -164
@@ -1,7 +1,11 @@
1
1
  /**
2
- * Agent loop - autonomous task execution
2
+ * Agent loop - autonomous task execution.
3
+ *
4
+ * Private chat/stream logic lives in agentChat.ts and agentStream.ts.
3
5
  */
4
6
  import { ProjectContext } from './project';
7
+ import { loadProjectRules, formatChatHistoryForAgent, AgentChatResponse } from './agentChat';
8
+ export { loadProjectRules, formatChatHistoryForAgent, AgentChatResponse };
5
9
  import { ToolCall, ToolResult, ActionLog } from './tools';
6
10
  import { undoLastAction, undoAllActions, getCurrentSession, getRecentSessions, formatSession, ActionSession } from './history';
7
11
  import { VerifyResult } from './verify';
@@ -34,20 +38,6 @@ export interface AgentResult {
34
38
  error?: string;
35
39
  aborted?: boolean;
36
40
  }
37
- /**
38
- * Load project rules from .codeep/rules.md or CODEEP.md
39
- * Returns the rules content formatted for system prompt, or empty string if no rules found
40
- */
41
- export declare function loadProjectRules(projectRoot: string): string;
42
- /**
43
- * Format chat session history for inclusion in agent system prompt.
44
- * Keeps the most recent messages within a character budget so the agent
45
- * has conversational context without overwhelming the context window.
46
- */
47
- export declare function formatChatHistoryForAgent(history?: Array<{
48
- role: 'user' | 'assistant';
49
- content: string;
50
- }>, maxChars?: number): string;
51
41
  /**
52
42
  * Run the agent loop
53
43
  */