codebuff 1.0.294 → 1.0.295

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 (97) hide show
  1. package/dist/background-process-manager.d.ts +50 -0
  2. package/dist/background-process-manager.js +3 -3
  3. package/dist/browser-runner.d.ts +35 -0
  4. package/dist/browser-runner.js +4 -4
  5. package/dist/chat-storage.d.ts +2 -0
  6. package/dist/chat-storage.js +1 -1
  7. package/dist/checkpoints/checkpoint-manager.d.ts +94 -0
  8. package/dist/checkpoints/checkpoint-manager.js +1 -1
  9. package/dist/checkpoints/file-manager.d.ts +72 -0
  10. package/dist/checkpoints/file-manager.js +294 -0
  11. package/dist/checkpoints/file-manager.js.map +1 -0
  12. package/dist/cli-definitions.d.ts +9 -0
  13. package/dist/cli-definitions.js +54 -0
  14. package/dist/cli-definitions.js.map +1 -0
  15. package/dist/cli-handlers/api-key.d.ts +25 -0
  16. package/dist/cli-handlers/api-key.js +1 -1
  17. package/dist/cli-handlers/checkpoint.d.ts +18 -0
  18. package/dist/cli-handlers/diff.d.ts +2 -0
  19. package/dist/cli-handlers/diff.js +31 -0
  20. package/dist/cli-handlers/diff.js.map +1 -0
  21. package/dist/cli-handlers/easter-egg.d.ts +1 -0
  22. package/dist/cli-handlers/easter-egg.js +126 -0
  23. package/dist/cli-handlers/easter-egg.js.map +1 -0
  24. package/dist/cli-handlers/inititalization-flow.d.ts +1 -0
  25. package/dist/cli-handlers/inititalization-flow.js +1 -1
  26. package/dist/cli.d.ts +65 -0
  27. package/dist/cli.js +2 -2
  28. package/dist/client.d.ts +7 -7
  29. package/dist/client.js +9 -9
  30. package/dist/config.d.ts +4 -0
  31. package/dist/config.js +12 -0
  32. package/dist/config.js.map +1 -0
  33. package/dist/create-template-project.d.ts +1 -0
  34. package/dist/create-template-project.js +107 -0
  35. package/dist/create-template-project.js.map +1 -0
  36. package/dist/credentials.d.ts +4 -0
  37. package/dist/credentials.js +2 -2
  38. package/dist/dev-process-manager.d.ts +10 -0
  39. package/dist/dev-process-manager.js +1 -1
  40. package/dist/display.d.ts +11 -0
  41. package/dist/display.js +85 -0
  42. package/dist/display.js.map +1 -0
  43. package/dist/fingerprint.d.ts +1 -0
  44. package/dist/fingerprint.js +48 -0
  45. package/dist/fingerprint.js.map +1 -0
  46. package/dist/index.d.ts +2 -0
  47. package/dist/index.js +7 -1
  48. package/dist/menu.d.ts +14 -0
  49. package/dist/menu.js +295 -0
  50. package/dist/menu.js.map +1 -0
  51. package/dist/project-files.d.ts +2 -2
  52. package/dist/project-files.js +5 -5
  53. package/dist/startup-process-handler.d.ts +2 -0
  54. package/dist/tool-handlers.d.ts +2 -2
  55. package/dist/tool-handlers.js +5 -5
  56. package/dist/tool-handlers.js.map +1 -1
  57. package/dist/types.d.ts +15 -0
  58. package/dist/types.js +3 -0
  59. package/dist/types.js.map +1 -0
  60. package/dist/update-codebuff.d.ts +1 -0
  61. package/dist/update-codebuff.js +1 -1
  62. package/dist/utils/__tests__/background-process-manager.test.d.ts +1 -0
  63. package/dist/utils/__tests__/background-process-manager.test.js +327 -0
  64. package/dist/utils/__tests__/background-process-manager.test.js.map +1 -0
  65. package/dist/utils/__tests__/tool-renderers.test.d.ts +1 -0
  66. package/dist/utils/__tests__/tool-renderers.test.js +2 -2
  67. package/dist/utils/__tests__/xml-stream-parser.test.d.ts +1 -0
  68. package/dist/utils/__tests__/xml-stream-parser.test.js +1 -1
  69. package/dist/utils/analytics.d.ts +6 -0
  70. package/dist/utils/detect-shell.d.ts +1 -0
  71. package/dist/utils/detect-shell.js +60 -0
  72. package/dist/utils/detect-shell.js.map +1 -0
  73. package/dist/utils/git.d.ts +2 -0
  74. package/dist/utils/git.js +40 -0
  75. package/dist/utils/git.js.map +1 -0
  76. package/dist/utils/logger.d.ts +21 -0
  77. package/dist/utils/logger.js +1 -1
  78. package/dist/utils/spinner.d.ts +12 -0
  79. package/dist/utils/spinner.js +94 -0
  80. package/dist/utils/spinner.js.map +1 -0
  81. package/dist/utils/system-info.d.ts +8 -0
  82. package/dist/utils/system-info.js +22 -0
  83. package/dist/utils/system-info.js.map +1 -0
  84. package/dist/utils/terminal.d.ts +43 -0
  85. package/dist/utils/terminal.js +3 -3
  86. package/dist/utils/tool-renderers.d.ts +16 -0
  87. package/dist/utils/tool-renderers.js +2 -2
  88. package/dist/utils/xml-stream-parser.d.ts +1 -1
  89. package/dist/utils/xml-stream-parser.js +2 -2
  90. package/dist/web-scraper.d.ts +3 -0
  91. package/dist/web-scraper.js +1 -1
  92. package/dist/workers/checkpoint-worker.d.ts +1 -0
  93. package/dist/workers/checkpoint-worker.js +48 -0
  94. package/dist/workers/checkpoint-worker.js.map +1 -0
  95. package/dist/workers/project-context.d.ts +1 -0
  96. package/dist/workers/project-context.js +1 -1
  97. package/package.json +2 -2
@@ -0,0 +1,94 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Spinner = void 0;
27
+ const readline = __importStar(require("readline"));
28
+ const picocolors_1 = require("picocolors");
29
+ const display_1 = require("../display");
30
+ const chars = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
31
+ class Spinner {
32
+ static instance = null;
33
+ loadingInterval = null;
34
+ previous = null;
35
+ constructor() { }
36
+ static get() {
37
+ if (!Spinner.instance) {
38
+ Spinner.instance = new Spinner();
39
+ }
40
+ return Spinner.instance;
41
+ }
42
+ start() {
43
+ if (this.loadingInterval) {
44
+ return;
45
+ }
46
+ this.previous = (0, display_1.getPrevious)();
47
+ let i = 0;
48
+ // Hide cursor while spinner is active
49
+ process.stdout.write('\u001B[?25l');
50
+ this.loadingInterval = setInterval(() => {
51
+ this.rewriteLine((0, picocolors_1.green)(`${chars[i]} Thinking...`));
52
+ i = (i + 1) % chars.length;
53
+ }, 100);
54
+ }
55
+ stop() {
56
+ if (!this.loadingInterval) {
57
+ return;
58
+ }
59
+ clearInterval(this.loadingInterval);
60
+ this.loadingInterval = null;
61
+ this.rewriteLine(''); // Clear the spinner line
62
+ this.restoreCursor(); // Show cursor after spinner stops
63
+ if (this.previous) {
64
+ (0, display_1.setPrevious)(this.previous);
65
+ }
66
+ this.previous = null;
67
+ }
68
+ restoreCursor() {
69
+ process.stdout.write('\u001B[?25h');
70
+ }
71
+ log(message) {
72
+ // Temporarily clear the spinner line
73
+ this.rewriteLine('');
74
+ // Write the log message
75
+ console.log(message);
76
+ // If spinner is active, redraw it on the next line
77
+ if (this.loadingInterval) {
78
+ const i = Math.floor(Math.random() * chars.length);
79
+ this.rewriteLine((0, picocolors_1.green)(`${chars[i]} Thinking...`));
80
+ }
81
+ }
82
+ rewriteLine(line) {
83
+ if (process.stdout.isTTY) {
84
+ readline.clearLine(process.stdout, 0);
85
+ readline.cursorTo(process.stdout, 0);
86
+ process.stdout.write(line);
87
+ }
88
+ else {
89
+ process.stdout.write(line + '\n');
90
+ }
91
+ }
92
+ }
93
+ exports.Spinner = Spinner;
94
+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AA;QAC5B,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAA;QACnC,CAAC;IACH,CAAC;;AApEH,0BAqEC"}
@@ -0,0 +1,8 @@
1
+ export declare const getSystemInfo: () => {
2
+ platform: NodeJS.Platform;
3
+ shell: string;
4
+ nodeVersion: string;
5
+ arch: NodeJS.Architecture;
6
+ homedir: string;
7
+ cpus: number;
8
+ };
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getSystemInfo = void 0;
7
+ const os_1 = __importDefault(require("os"));
8
+ const path_1 = __importDefault(require("path"));
9
+ const process_1 = require("process");
10
+ const getSystemInfo = () => {
11
+ const shell = process.env.SHELL || process.env.COMSPEC || 'unknown';
12
+ return {
13
+ platform: process_1.platform,
14
+ shell: path_1.default.basename(shell),
15
+ nodeVersion: process.version,
16
+ arch: process.arch,
17
+ homedir: os_1.default.homedir(),
18
+ cpus: os_1.default.cpus().length,
19
+ };
20
+ };
21
+ exports.getSystemInfo = getSystemInfo;
22
+ //# sourceMappingURL=system-info.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-info.js","sourceRoot":"","sources":["../../src/utils/system-info.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAmB;AACnB,gDAAuB;AACvB,qCAAkC;AAE3B,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,SAAS,CAAA;IAEnE,OAAO;QACL,QAAQ,EAAR,kBAAQ;QACR,KAAK,EAAE,cAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;QAC3B,WAAW,EAAE,OAAO,CAAC,OAAO;QAC5B,IAAI,EAAE,OAAO,CAAC,IAAI;QAClB,OAAO,EAAE,YAAE,CAAC,OAAO,EAAE;QACrB,IAAI,EAAE,YAAE,CAAC,IAAI,EAAE,CAAC,MAAM;KACvB,CAAA;AACH,CAAC,CAAA;AAXY,QAAA,aAAa,iBAWzB"}
@@ -0,0 +1,43 @@
1
+ import { ChildProcessWithoutNullStreams } from 'child_process';
2
+ import type { IPty } from '@homebridge/node-pty-prebuilt-multiarch';
3
+ type PersistentProcess = {
4
+ type: 'pty';
5
+ shell: 'pty';
6
+ pty: IPty;
7
+ timerId: NodeJS.Timeout | null;
8
+ } | {
9
+ type: 'process';
10
+ shell: 'bash' | 'cmd.exe' | 'powershell.exe';
11
+ childProcess: ChildProcessWithoutNullStreams | null;
12
+ timerId: NodeJS.Timeout | null;
13
+ };
14
+ declare const createPersistantProcess: (dir: string) => PersistentProcess;
15
+ export declare let persistentProcess: ReturnType<typeof createPersistantProcess> | null;
16
+ export declare const isCommandRunning: () => boolean;
17
+ export declare const recreateShell: (cwd: string) => void;
18
+ export declare const resetShell: (cwd: string) => void;
19
+ export declare function runBackgroundCommand(options: {
20
+ toolCallId: string;
21
+ command: string;
22
+ mode: 'user' | 'assistant';
23
+ cwd: string;
24
+ stdoutFile?: string;
25
+ stderrFile?: string;
26
+ }, resolveCommand: (value: {
27
+ result: string;
28
+ stdout: string;
29
+ exitCode: number | null;
30
+ }) => void): void;
31
+ export declare const runTerminalCommand: (toolCallId: string, command: string, mode: "user" | "assistant", processType: "SYNC" | "BACKGROUND", timeoutSeconds: number, cwd?: string, stdoutFile?: string, stderrFile?: string) => Promise<{
32
+ result: string;
33
+ stdout: string;
34
+ }>;
35
+ export declare const runCommandPty: (persistentProcess: PersistentProcess & {
36
+ type: "pty";
37
+ }, command: string, mode: "user" | "assistant", cwd: string, maybeTimeoutSeconds: number | null, resolve: (value: {
38
+ result: string;
39
+ stdout: string;
40
+ exitCode: number | null;
41
+ }) => void) => void;
42
+ export declare function killAndResetPersistentProcess(): void;
43
+ export {};
@@ -34,9 +34,9 @@ const child_process_1 = require("child_process");
34
34
  const fs_1 = require("fs");
35
35
  const os = __importStar(require("os"));
36
36
  const path_1 = __importStar(require("path"));
37
- const analytics_events_1 = require("common/constants/analytics-events");
38
- const array_1 = require("common/util/array");
39
- const string_1 = require("common/util/string");
37
+ const analytics_events_1 = require("../common/constants/analytics-events");
38
+ const array_1 = require("../common/util/array");
39
+ const string_1 = require("../common/util/string");
40
40
  const picocolors_1 = require("picocolors");
41
41
  const background_process_manager_1 = require("../background-process-manager");
42
42
  const project_files_1 = require("../project-files");
@@ -0,0 +1,16 @@
1
+ import { ToolName } from '../common/constants/tools';
2
+ /**
3
+ * Interface for handling tool call rendering
4
+ */
5
+ export interface ToolCallRenderer {
6
+ onToolStart?: (toolName: string, attributes: Record<string, string>) => string | null;
7
+ onParamStart?: (paramName: string, toolName: string) => string | null;
8
+ onParamChunk?: (content: string, paramName: string, toolName: string) => string | null;
9
+ onParamEnd?: (paramName: string, toolName: string, content: string) => string | null;
10
+ onToolEnd?: (toolName: string, params: Record<string, string>) => string | null;
11
+ }
12
+ /**
13
+ * Default renderer for tool calls that formats them nicely for the console
14
+ */
15
+ export declare const defaultToolCallRenderer: ToolCallRenderer;
16
+ export declare const toolRenderers: Record<ToolName, ToolCallRenderer>;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.toolRenderers = exports.defaultToolCallRenderer = void 0;
4
- const project_file_tree_1 = require("common/project-file-tree");
5
- const string_1 = require("common/util/string");
4
+ const project_file_tree_1 = require("../common/project-file-tree");
5
+ const string_1 = require("../common/util/string");
6
6
  const picocolors_1 = require("picocolors");
7
7
  const project_files_1 = require("../project-files");
8
8
  let toolStart = true;
@@ -1,4 +1,4 @@
1
- import { Saxy } from 'common/util/saxy';
1
+ import { Saxy } from '../common/util/saxy';
2
2
  import { ToolCallRenderer } from './tool-renderers';
3
3
  /**
4
4
  * Creates a transform stream that processes XML tool calls
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createXMLStreamParser = createXMLStreamParser;
4
- const tools_1 = require("common/constants/tools");
5
- const saxy_1 = require("common/util/saxy");
4
+ const tools_1 = require("../common/constants/tools");
5
+ const saxy_1 = require("../common/util/saxy");
6
6
  const tool_renderers_1 = require("./tool-renderers");
7
7
  /**
8
8
  * Creates a transform stream that processes XML tool calls
@@ -0,0 +1,3 @@
1
+ export declare function scrapeWebPage(url: string): Promise<string>;
2
+ export declare function parseUrlsFromContent(content: string): string[];
3
+ export declare function getScrapedContentBlocks(urls: string[]): Promise<string[]>;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.scrapeWebPage = scrapeWebPage;
4
4
  exports.parseUrlsFromContent = parseUrlsFromContent;
5
5
  exports.getScrapedContentBlocks = getScrapedContentBlocks;
6
- const string_1 = require("common/util/string");
6
+ const string_1 = require("./common/util/string");
7
7
  // Global cache for scraped web pages
8
8
  const scrapedPagesCache = {};
9
9
  async function scrapeWebPage(url) {
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const worker_threads_1 = require("worker_threads");
4
+ const file_manager_1 = require("../checkpoints/file-manager");
5
+ if (worker_threads_1.parentPort) {
6
+ const parentPort = worker_threads_1.parentPort;
7
+ /**
8
+ * Handle incoming messages from the main thread.
9
+ * Executes git operations for storing or restoring checkpoints.
10
+ */
11
+ parentPort.on('message', async (message) => {
12
+ const { id, type, projectDir, bareRepoPath, commit, message: commitMessage, relativeFilepaths, } = message;
13
+ try {
14
+ let result;
15
+ if (type === 'store') {
16
+ // Store the current state as a git commit
17
+ result = await (0, file_manager_1.storeFileState)({
18
+ projectDir,
19
+ bareRepoPath,
20
+ message: commitMessage,
21
+ relativeFilepaths,
22
+ });
23
+ }
24
+ else if (type === 'restore') {
25
+ // Restore files to a previous git commit state
26
+ await (0, file_manager_1.restoreFileState)({
27
+ projectDir,
28
+ bareRepoPath,
29
+ commit: commit,
30
+ relativeFilepaths,
31
+ });
32
+ result = true;
33
+ }
34
+ else {
35
+ throw new Error(`Unknown operation type: ${type}`);
36
+ }
37
+ parentPort.postMessage({ id, success: true, result });
38
+ }
39
+ catch (error) {
40
+ parentPort.postMessage({
41
+ id,
42
+ success: false,
43
+ error: error instanceof Error ? error.message : String(error),
44
+ });
45
+ }
46
+ });
47
+ }
48
+ //# sourceMappingURL=checkpoint-worker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkpoint-worker.js","sourceRoot":"","sources":["../../src/workers/checkpoint-worker.ts"],"names":[],"mappings":";;AAAA,mDAA8D;AAE9D,8DAA8E;AAoB9E,IAAI,2BAAe,EAAE,CAAC;IACpB,MAAM,UAAU,GAAG,2BAAe,CAAA;IAElC;;;OAGG;IACH,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,OAAsB,EAAE,EAAE;QACxD,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,UAAU,EACV,YAAY,EACZ,MAAM,EACN,OAAO,EAAE,aAAa,EACtB,iBAAiB,GAClB,GAAG,OAAO,CAAA;QACX,IAAI,CAAC;YACH,IAAI,MAAwB,CAAA;YAC5B,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;gBACrB,0CAA0C;gBAC1C,MAAM,GAAG,MAAM,IAAA,6BAAc,EAAC;oBAC5B,UAAU;oBACV,YAAY;oBACZ,OAAO,EAAE,aAAc;oBACvB,iBAAiB;iBAClB,CAAC,CAAA;YACJ,CAAC;iBAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;gBAC9B,+CAA+C;gBAC/C,MAAM,IAAA,+BAAgB,EAAC;oBACrB,UAAU;oBACV,YAAY;oBACZ,MAAM,EAAE,MAAO;oBACf,iBAAiB;iBAClB,CAAC,CAAA;gBACF,MAAM,GAAG,IAAI,CAAA;YACf,CAAC;iBAAM,CAAC;gBACN,MAAM,IAAI,KAAK,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAA;YACpD,CAAC;YAED,UAAU,CAAC,WAAW,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAA;QACvD,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,UAAU,CAAC,WAAW,CAAC;gBACrB,EAAE;gBACF,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC;aAC9D,CAAC,CAAA;QACJ,CAAC;IACH,CAAC,CAAC,CAAA;AACJ,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const worker_threads_1 = require("worker_threads");
4
- const project_file_tree_1 = require("common/project-file-tree");
4
+ const project_file_tree_1 = require("../common/project-file-tree");
5
5
  const file_manager_1 = require("../checkpoints/file-manager");
6
6
  const project_files_1 = require("../project-files");
7
7
  if (worker_threads_1.parentPort) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebuff",
3
- "version": "1.0.294",
3
+ "version": "1.0.295",
4
4
  "description": "AI dev assistant",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "start-prod": "bun run with-env -- ts-node -r tsconfig-paths/register src/index.ts",
29
29
  "typecheck-this-package": "tsc --noEmit && tsc-alias",
30
30
  "typecheck-only": "tsc --noEmit && tsc-alias",
31
- "build": "nx build npm-app"
31
+ "build": "nx clean npm-app && nx reset && nx build npm-app"
32
32
  },
33
33
  "files": [
34
34
  "dist",