codebuff 1.0.291 → 1.0.294
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/background-process-manager.js +3 -3
- package/dist/browser-runner.js +4 -4
- package/dist/chat-storage.js +1 -1
- package/dist/checkpoints/checkpoint-manager.js +1 -1
- package/dist/cli-handlers/api-key.js +1 -1
- package/dist/cli-handlers/inititalization-flow.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/client.d.ts +7 -7
- package/dist/client.js +9 -9
- package/dist/common/actions.d.ts +32 -32
- package/dist/common/constants/tools.d.ts +1 -1
- package/dist/common/constants/tools.js +1 -1
- package/dist/common/constants/tools.js.map +1 -1
- package/dist/common/constants.d.ts +8 -6
- package/dist/common/constants.js +2 -1
- package/dist/common/constants.js.map +1 -1
- package/dist/common/util/saxy.d.ts +1 -1
- package/dist/common/util/saxy.js +2 -2
- package/dist/common/util/saxy.js.map +1 -1
- package/dist/common/util/string.d.ts +1 -0
- package/dist/common/util/string.js +9 -0
- package/dist/common/util/string.js.map +1 -1
- package/dist/common/websockets/websocket-schema.d.ts +68 -68
- package/dist/credentials.js +2 -2
- package/dist/dev-process-manager.js +1 -1
- package/dist/index.js +2 -20
- package/dist/project-files.d.ts +3 -2
- package/dist/project-files.js +18 -5
- package/dist/project-files.js.map +1 -1
- package/dist/tool-handlers.d.ts +2 -2
- package/dist/tool-handlers.js +4 -4
- package/dist/update-codebuff.js +1 -1
- package/dist/utils/__tests__/tool-renderers.test.js +2 -2
- package/dist/utils/__tests__/xml-stream-parser.test.js +1 -1
- package/dist/utils/logger.js +1 -1
- package/dist/utils/terminal.js +4 -6
- package/dist/utils/terminal.js.map +1 -1
- package/dist/utils/tool-renderers.js +6 -2
- package/dist/utils/tool-renderers.js.map +1 -1
- package/dist/utils/xml-stream-parser.d.ts +1 -1
- package/dist/utils/xml-stream-parser.js +2 -2
- package/dist/web-scraper.js +1 -1
- package/dist/workers/project-context.js +1 -1
- package/package.json +1 -1
- package/dist/background-process-manager.d.ts +0 -50
- package/dist/browser-runner.d.ts +0 -35
- package/dist/chat-storage.d.ts +0 -2
- package/dist/checkpoints/checkpoint-manager.d.ts +0 -94
- package/dist/checkpoints/file-manager.d.ts +0 -72
- package/dist/checkpoints/file-manager.js +0 -294
- package/dist/checkpoints/file-manager.js.map +0 -1
- package/dist/cli-definitions.d.ts +0 -9
- package/dist/cli-definitions.js +0 -54
- package/dist/cli-definitions.js.map +0 -1
- package/dist/cli-handlers/api-key.d.ts +0 -25
- package/dist/cli-handlers/checkpoint.d.ts +0 -18
- package/dist/cli-handlers/diff.d.ts +0 -2
- package/dist/cli-handlers/diff.js +0 -31
- package/dist/cli-handlers/diff.js.map +0 -1
- package/dist/cli-handlers/easter-egg.d.ts +0 -1
- package/dist/cli-handlers/easter-egg.js +0 -126
- package/dist/cli-handlers/easter-egg.js.map +0 -1
- package/dist/cli-handlers/inititalization-flow.d.ts +0 -1
- package/dist/cli.d.ts +0 -65
- package/dist/common/types/organization.d.ts +0 -102
- package/dist/common/types/organization.js +0 -3
- package/dist/common/types/organization.js.map +0 -1
- package/dist/config.d.ts +0 -4
- package/dist/config.js +0 -12
- package/dist/config.js.map +0 -1
- package/dist/create-template-project.d.ts +0 -1
- package/dist/create-template-project.js +0 -107
- package/dist/create-template-project.js.map +0 -1
- package/dist/credentials.d.ts +0 -4
- package/dist/dev-process-manager.d.ts +0 -10
- package/dist/display.d.ts +0 -11
- package/dist/display.js +0 -85
- package/dist/display.js.map +0 -1
- package/dist/fingerprint.d.ts +0 -1
- package/dist/fingerprint.js +0 -48
- package/dist/fingerprint.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/menu.d.ts +0 -14
- package/dist/menu.js +0 -295
- package/dist/menu.js.map +0 -1
- package/dist/organization-context.d.ts +0 -33
- package/dist/organization-context.js +0 -112
- package/dist/organization-context.js.map +0 -1
- package/dist/slash-commands.d.ts +0 -7
- package/dist/slash-commands.js +0 -21
- package/dist/slash-commands.js.map +0 -1
- package/dist/startup-process-handler.d.ts +0 -2
- package/dist/types.d.ts +0 -15
- package/dist/types.js +0 -3
- package/dist/types.js.map +0 -1
- package/dist/update-codebuff.d.ts +0 -1
- package/dist/utils/__tests__/background-process-manager.test.d.ts +0 -1
- package/dist/utils/__tests__/background-process-manager.test.js +0 -327
- package/dist/utils/__tests__/background-process-manager.test.js.map +0 -1
- package/dist/utils/__tests__/tool-renderers.test.d.ts +0 -1
- package/dist/utils/__tests__/xml-stream-parser.test.d.ts +0 -1
- package/dist/utils/analytics.d.ts +0 -6
- package/dist/utils/detect-shell.d.ts +0 -1
- package/dist/utils/detect-shell.js +0 -60
- package/dist/utils/detect-shell.js.map +0 -1
- package/dist/utils/git.d.ts +0 -2
- package/dist/utils/git.js +0 -40
- package/dist/utils/git.js.map +0 -1
- package/dist/utils/logger.d.ts +0 -21
- package/dist/utils/spinner.d.ts +0 -12
- package/dist/utils/spinner.js +0 -94
- package/dist/utils/spinner.js.map +0 -1
- package/dist/utils/system-info.d.ts +0 -8
- package/dist/utils/system-info.js +0 -22
- package/dist/utils/system-info.js.map +0 -1
- package/dist/utils/terminal.d.ts +0 -43
- package/dist/utils/tool-renderers.d.ts +0 -16
- package/dist/web-scraper.d.ts +0 -3
- package/dist/workers/checkpoint-worker.d.ts +0 -1
- package/dist/workers/checkpoint-worker.js +0 -48
- package/dist/workers/checkpoint-worker.js.map +0 -1
- package/dist/workers/project-context.d.ts +0 -1
package/dist/utils/terminal.d.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
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 {};
|
|
@@ -1,16 +0,0 @@
|
|
|
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>;
|
package/dist/web-scraper.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,48 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|