codeep 3.3.3 → 3.4.1

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 (79) hide show
  1. package/dist/acp/commands.d.ts +50 -1
  2. package/dist/acp/commands.js +545 -109
  3. package/dist/acp/protocol.d.ts +14 -5
  4. package/dist/acp/server.d.ts +36 -1
  5. package/dist/acp/server.js +581 -155
  6. package/dist/acp/serverHandlers.d.ts +2 -1
  7. package/dist/acp/serverHandlers.js +3 -0
  8. package/dist/acp/session.d.ts +28 -2
  9. package/dist/acp/session.js +25 -6
  10. package/dist/acp/transport.d.ts +40 -4
  11. package/dist/acp/transport.js +218 -25
  12. package/dist/acp/turns.d.ts +20 -0
  13. package/dist/acp/turns.js +30 -0
  14. package/dist/api/index.js +2 -0
  15. package/dist/api/ollamaNative.d.ts +3 -0
  16. package/dist/api/ollamaNative.js +35 -3
  17. package/dist/config/index.d.ts +21 -4
  18. package/dist/config/index.js +178 -123
  19. package/dist/renderer/agentExecution.d.ts +30 -2
  20. package/dist/renderer/agentExecution.js +248 -92
  21. package/dist/renderer/commands/helpers.d.ts +18 -2
  22. package/dist/renderer/commands/helpers.js +28 -5
  23. package/dist/renderer/commands.d.ts +2 -0
  24. package/dist/renderer/commands.js +180 -64
  25. package/dist/renderer/main.d.ts +41 -0
  26. package/dist/renderer/main.js +181 -80
  27. package/dist/utils/agent.d.ts +69 -4
  28. package/dist/utils/agent.js +416 -248
  29. package/dist/utils/agentChat.js +82 -10
  30. package/dist/utils/agents.d.ts +2 -1
  31. package/dist/utils/agents.js +100 -29
  32. package/dist/utils/auditLog.d.ts +4 -3
  33. package/dist/utils/auditLog.js +92 -9
  34. package/dist/utils/checkpoints.js +11 -6
  35. package/dist/utils/codeReview.js +28 -23
  36. package/dist/utils/codeepCloud.d.ts +14 -2
  37. package/dist/utils/codeepCloud.js +56 -20
  38. package/dist/utils/customCommands.js +7 -2
  39. package/dist/utils/git.d.ts +262 -4
  40. package/dist/utils/git.js +1928 -61
  41. package/dist/utils/gitHookInstaller.d.ts +32 -1
  42. package/dist/utils/gitHookInstaller.js +76 -8
  43. package/dist/utils/gitignore.d.ts +8 -0
  44. package/dist/utils/gitignore.js +41 -10
  45. package/dist/utils/headlessReview.d.ts +11 -0
  46. package/dist/utils/headlessReview.js +33 -5
  47. package/dist/utils/history.d.ts +22 -6
  48. package/dist/utils/history.js +140 -26
  49. package/dist/utils/logger.js +6 -7
  50. package/dist/utils/mcpConfig.d.ts +24 -0
  51. package/dist/utils/mcpConfig.js +36 -5
  52. package/dist/utils/mentions.d.ts +28 -5
  53. package/dist/utils/mentions.js +253 -45
  54. package/dist/utils/personalities.js +16 -6
  55. package/dist/utils/planMode.d.ts +13 -7
  56. package/dist/utils/planMode.js +32 -12
  57. package/dist/utils/projectIntelligence.d.ts +2 -0
  58. package/dist/utils/projectIntelligence.js +27 -8
  59. package/dist/utils/projectPaths.d.ts +53 -0
  60. package/dist/utils/projectPaths.js +146 -0
  61. package/dist/utils/shell.d.ts +119 -0
  62. package/dist/utils/shell.js +417 -45
  63. package/dist/utils/skillBundles.js +17 -7
  64. package/dist/utils/skillBundlesCloud.js +20 -3
  65. package/dist/utils/skills.d.ts +24 -2
  66. package/dist/utils/skills.js +235 -43
  67. package/dist/utils/smartContext.js +97 -23
  68. package/dist/utils/telegramApproval.d.ts +10 -2
  69. package/dist/utils/telegramApproval.js +22 -4
  70. package/dist/utils/toolExecution.d.ts +50 -2
  71. package/dist/utils/toolExecution.js +418 -16
  72. package/dist/utils/toolParsing.d.ts +7 -1
  73. package/dist/utils/toolParsing.js +12 -3
  74. package/dist/utils/userProfile.js +58 -16
  75. package/dist/utils/verify.d.ts +25 -4
  76. package/dist/utils/verify.js +259 -74
  77. package/dist/version.d.ts +1 -1
  78. package/dist/version.js +1 -1
  79. package/package.json +1 -1
@@ -338,16 +338,20 @@ export interface TerminalWaitForExitParams {
338
338
  terminalId: string;
339
339
  timeoutMs?: number;
340
340
  }
341
- export type TerminalExitStatus = {
341
+ export interface TerminalExitStatus {
342
+ exitCode?: number | null;
343
+ signal?: string | null;
344
+ }
345
+ export type LegacyTerminalExitStatus = {
342
346
  type: 'exited';
343
347
  code: number;
344
348
  } | {
345
349
  type: 'killed';
346
350
  signal?: string;
347
351
  };
348
- export interface TerminalWaitForExitResult {
349
- exitStatus: TerminalExitStatus;
350
- }
352
+ export type TerminalWaitForExitResult = TerminalExitStatus | {
353
+ exitStatus: TerminalExitStatus | LegacyTerminalExitStatus;
354
+ };
351
355
  export interface TerminalOutputParams {
352
356
  sessionId: string;
353
357
  terminalId: string;
@@ -355,8 +359,13 @@ export interface TerminalOutputParams {
355
359
  }
356
360
  export interface TerminalOutputResult {
357
361
  output: string;
362
+ truncated?: boolean;
358
363
  /** Absent while the process is still running; present once the process has exited. */
359
- exitStatus?: TerminalExitStatus;
364
+ exitStatus?: TerminalExitStatus | null;
365
+ }
366
+ export interface TerminalKillParams {
367
+ sessionId: string;
368
+ terminalId: string;
360
369
  }
361
370
  export interface TerminalReleaseParams {
362
371
  sessionId: string;
@@ -1,3 +1,4 @@
1
+ import { StdioTransport } from './transport.js';
1
2
  import { SessionModeState, SessionConfigOption, ListPersonalitiesResult } from './protocol.js';
2
3
  import { type Personality } from '../utils/personalities.js';
3
4
  export declare const AGENT_MODES: SessionModeState;
@@ -44,4 +45,38 @@ export declare function buildConfigOptions(): SessionConfigOption[];
44
45
  export declare function buildPersonalityListResult(workspaceRoot: string): ListPersonalitiesResult;
45
46
  /** Resolve an ACP selection using the same scope/model availability gate as list. */
46
47
  export declare function resolvePersonalitySelection(personalityId: unknown, workspaceRoot: string): Personality | null;
47
- export declare function startAcpServer(): Promise<void>;
48
+ export interface AcpCommandOutcome {
49
+ stdout: string;
50
+ stderr: string;
51
+ exitCode: number;
52
+ }
53
+ /** Per-command budget, the same one a local run gets. */
54
+ export declare const ACP_COMMAND_TIMEOUT_MS = 120000;
55
+ export interface AcpCommandContext {
56
+ transport: Pick<StdioTransport, 'request'>;
57
+ sessionId: string;
58
+ clientSupportsTerminal: boolean;
59
+ /** The prompt's signal: firing it kills a command in the client terminal. */
60
+ signal: AbortSignal;
61
+ timeoutMs?: number;
62
+ }
63
+ /**
64
+ * Read the exit code from a terminal/wait_for_exit answer. ACP sends
65
+ * `{ exitCode, signal }`; older clients nest `{ type, code }` under
66
+ * `exitStatus`. Returns null when the answer carries no exit status.
67
+ *
68
+ * Exported for unit testing (see server.command.test.ts).
69
+ */
70
+ export declare function exitCodeFromWaitResult(result: unknown): number | null;
71
+ /**
72
+ * Run an execute_command tool call for an ACP session, in the client's
73
+ * terminal when it offers one, otherwise locally.
74
+ *
75
+ * Never throws: the agent loop reports a throw to the model as a failed
76
+ * command, which hides whether the client terminal already ran it. A
77
+ * failure comes back as exitCode -1 with the reason instead.
78
+ *
79
+ * Exported for unit testing (see server.command.test.ts).
80
+ */
81
+ export declare function executeAcpCommand(command: string, args: string[], cwd: string, ctx: AcpCommandContext): Promise<AcpCommandOutcome>;
82
+ export declare function startAcpServer(transport?: StdioTransport): Promise<void>;