codebuff 1.0.285 → 1.0.287
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 +17 -1
- package/dist/cli.js +113 -39
- package/dist/cli.js.map +1 -1
- package/dist/client.js +15 -2
- package/dist/client.js.map +1 -1
- package/dist/common/__tests__/project-file-tree.test.d.ts +1 -0
- package/dist/common/__tests__/project-file-tree.test.js +251 -0
- package/dist/common/__tests__/project-file-tree.test.js.map +1 -0
- package/dist/common/actions.d.ts +34 -34
- package/dist/common/constants/analytics-events.d.ts +5 -0
- package/dist/common/constants/analytics-events.js +5 -0
- package/dist/common/constants/analytics-events.js.map +1 -1
- package/dist/common/json-config/__tests__/__snapshots__/stringify-schema.test.js.snap +119 -0
- package/dist/common/types/agent-state.d.ts +8 -8
- package/dist/common/types/message.d.ts +6 -6
- package/dist/common/types/usage.d.ts +2 -2
- package/dist/common/util/credentials.d.ts +2 -2
- package/dist/common/util/process-stream.d.ts +7 -0
- package/dist/common/util/process-stream.js +162 -0
- package/dist/common/util/process-stream.js.map +1 -0
- 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/websockets/websocket-schema.d.ts +72 -72
- package/dist/display.js +4 -4
- package/dist/display.js.map +1 -1
- package/dist/index.js +1 -7
- package/dist/menu.d.ts +11 -0
- package/dist/menu.js +152 -28
- package/dist/menu.js.map +1 -1
- package/dist/update-codebuff.js +5 -0
- package/dist/update-codebuff.js.map +1 -1
- package/dist/utils/__tests__/__snapshots__/background-process-manager.test.js.snap +137 -0
- package/dist/utils/__tests__/file-paths.test.d.ts +1 -0
- package/dist/utils/__tests__/file-paths.test.js +37 -0
- package/dist/utils/__tests__/file-paths.test.js.map +1 -0
- package/dist/utils/__tests__/path.test.d.ts +1 -0
- package/dist/utils/__tests__/path.test.js +37 -0
- package/dist/utils/__tests__/path.test.js.map +1 -0
- package/dist/utils/file-paths.d.ts +9 -0
- package/dist/utils/file-paths.js +24 -0
- package/dist/utils/file-paths.js.map +1 -0
- package/dist/utils/path.d.ts +9 -0
- package/dist/utils/path.js +27 -0
- package/dist/utils/path.js.map +1 -0
- package/dist/utils/terminal.js +6 -5
- package/dist/utils/terminal.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,251 @@
|
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
// @ts-ignore
|
|
30
|
+
const bun_test_1 = require("bun:test");
|
|
31
|
+
const path_1 = __importDefault(require("path"));
|
|
32
|
+
const memfs_1 = require("memfs");
|
|
33
|
+
// Mock fs to use memfs's vol directly
|
|
34
|
+
bun_test_1.mock.module('fs', () => ({
|
|
35
|
+
existsSync: (path) => memfs_1.vol.existsSync(path),
|
|
36
|
+
readFileSync: (path, options) => memfs_1.vol.readFileSync(path, options),
|
|
37
|
+
}));
|
|
38
|
+
// Import fs after mocking to get the mocked version
|
|
39
|
+
const fs_1 = __importDefault(require("fs"));
|
|
40
|
+
const projectFileTreeModule = __importStar(require("../project-file-tree"));
|
|
41
|
+
const project_file_tree_1 = require("../project-file-tree");
|
|
42
|
+
// Basic memfs check
|
|
43
|
+
(0, bun_test_1.it)('memfs basic check', () => {
|
|
44
|
+
memfs_1.vol.reset();
|
|
45
|
+
memfs_1.vol.fromJSON({ '/testfile.txt': 'content' });
|
|
46
|
+
(0, bun_test_1.expect)(fs_1.default.existsSync('/testfile.txt')).toBe(true);
|
|
47
|
+
(0, bun_test_1.expect)(fs_1.default.readFileSync('/testfile.txt', 'utf8')).toBe('content');
|
|
48
|
+
});
|
|
49
|
+
(0, bun_test_1.describe)('parseGitignore', () => {
|
|
50
|
+
const projectRoot = '/project';
|
|
51
|
+
(0, bun_test_1.it)('handles empty .gitignore', () => {
|
|
52
|
+
memfs_1.vol.reset();
|
|
53
|
+
memfs_1.vol.fromJSON({
|
|
54
|
+
'/project/.gitignore': '',
|
|
55
|
+
});
|
|
56
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
57
|
+
(0, bun_test_1.expect)(ig.ignores('file.txt')).toBe(false);
|
|
58
|
+
});
|
|
59
|
+
(0, bun_test_1.it)('ignores comments and blank lines', () => {
|
|
60
|
+
memfs_1.vol.reset();
|
|
61
|
+
memfs_1.vol.fromJSON({
|
|
62
|
+
'/project/.gitignore': `
|
|
63
|
+
# This is a comment
|
|
64
|
+
|
|
65
|
+
# Another comment
|
|
66
|
+
`,
|
|
67
|
+
});
|
|
68
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
69
|
+
(0, bun_test_1.expect)(ig.ignores('file.txt')).toBe(false);
|
|
70
|
+
});
|
|
71
|
+
(0, bun_test_1.it)('handles simple file patterns', () => {
|
|
72
|
+
memfs_1.vol.reset();
|
|
73
|
+
memfs_1.vol.fromJSON({
|
|
74
|
+
'/project/.gitignore': `
|
|
75
|
+
file.txt
|
|
76
|
+
*.log
|
|
77
|
+
`,
|
|
78
|
+
});
|
|
79
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
80
|
+
(0, bun_test_1.expect)(ig.ignores('file.txt')).toBe(true);
|
|
81
|
+
(0, bun_test_1.expect)(ig.ignores('debug.log')).toBe(true);
|
|
82
|
+
(0, bun_test_1.expect)(ig.ignores('src/error.log')).toBe(true);
|
|
83
|
+
(0, bun_test_1.expect)(ig.ignores('other.txt')).toBe(false);
|
|
84
|
+
});
|
|
85
|
+
(0, bun_test_1.it)('handles directory patterns', () => {
|
|
86
|
+
memfs_1.vol.reset();
|
|
87
|
+
memfs_1.vol.fromJSON({
|
|
88
|
+
'/project/.gitignore': 'build/',
|
|
89
|
+
});
|
|
90
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
91
|
+
(0, bun_test_1.expect)(ig.ignores('build/output.js')).toBe(true);
|
|
92
|
+
(0, bun_test_1.expect)(ig.ignores('src/build/output.js')).toBe(true);
|
|
93
|
+
(0, bun_test_1.expect)(ig.ignores('building.js')).toBe(false);
|
|
94
|
+
});
|
|
95
|
+
(0, bun_test_1.it)('handles root-anchored patterns in root .gitignore', () => {
|
|
96
|
+
memfs_1.vol.reset();
|
|
97
|
+
memfs_1.vol.fromJSON({
|
|
98
|
+
'/project/.gitignore': '/config.js',
|
|
99
|
+
});
|
|
100
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
101
|
+
(0, bun_test_1.expect)(ig.ignores('config.js')).toBe(true);
|
|
102
|
+
(0, bun_test_1.expect)(ig.ignores('src/config.js')).toBe(false);
|
|
103
|
+
});
|
|
104
|
+
(0, bun_test_1.it)('handles root-anchored patterns in subdirectory .gitignore', () => {
|
|
105
|
+
memfs_1.vol.reset();
|
|
106
|
+
memfs_1.vol.fromJSON({
|
|
107
|
+
'/project/src/.gitignore': '/config.js',
|
|
108
|
+
});
|
|
109
|
+
const ig = (0, project_file_tree_1.parseGitignore)(path_1.default.join(projectRoot, 'src'), projectRoot);
|
|
110
|
+
(0, bun_test_1.expect)(ig.ignores('config.js')).toBe(true);
|
|
111
|
+
(0, bun_test_1.expect)(ig.ignores('src/config.js')).toBe(false);
|
|
112
|
+
});
|
|
113
|
+
(0, bun_test_1.it)('handles negation patterns', () => {
|
|
114
|
+
memfs_1.vol.reset();
|
|
115
|
+
memfs_1.vol.fromJSON({
|
|
116
|
+
'/project/.gitignore': `
|
|
117
|
+
*.log
|
|
118
|
+
!important.log
|
|
119
|
+
`,
|
|
120
|
+
});
|
|
121
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
122
|
+
(0, bun_test_1.expect)(ig.ignores('debug.log')).toBe(true);
|
|
123
|
+
(0, bun_test_1.expect)(ig.ignores('important.log')).toBe(false);
|
|
124
|
+
});
|
|
125
|
+
(0, bun_test_1.it)('handles patterns with leading/trailing whitespace', () => {
|
|
126
|
+
memfs_1.vol.reset();
|
|
127
|
+
memfs_1.vol.fromJSON({
|
|
128
|
+
'/project/.gitignore': `
|
|
129
|
+
\t file.txt \t
|
|
130
|
+
\t *.log \t
|
|
131
|
+
`,
|
|
132
|
+
});
|
|
133
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
134
|
+
(0, bun_test_1.expect)(ig.ignores('file.txt')).toBe(true);
|
|
135
|
+
(0, bun_test_1.expect)(ig.ignores('debug.log')).toBe(true);
|
|
136
|
+
});
|
|
137
|
+
(0, bun_test_1.it)('handles .codebuffignore and .manicodeignore', () => {
|
|
138
|
+
memfs_1.vol.reset();
|
|
139
|
+
memfs_1.vol.fromJSON({
|
|
140
|
+
'/project/.codebuffignore': 'codebuff.log',
|
|
141
|
+
'/project/.manicodeignore': 'manicode.log',
|
|
142
|
+
});
|
|
143
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
144
|
+
(0, bun_test_1.expect)(ig.ignores('codebuff.log')).toBe(true);
|
|
145
|
+
(0, bun_test_1.expect)(ig.ignores('manicode.log')).toBe(true);
|
|
146
|
+
(0, bun_test_1.expect)(ig.ignores('other.log')).toBe(false);
|
|
147
|
+
});
|
|
148
|
+
(0, bun_test_1.it)('handles multiple ignore files in the same directory', () => {
|
|
149
|
+
memfs_1.vol.reset();
|
|
150
|
+
memfs_1.vol.fromJSON({
|
|
151
|
+
'/project/.gitignore': 'git.log',
|
|
152
|
+
'/project/.codebuffignore': 'codebuff.log',
|
|
153
|
+
'/project/.manicodeignore': '!git.log', // Should not un-ignore git.log
|
|
154
|
+
});
|
|
155
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
156
|
+
(0, bun_test_1.expect)(ig.ignores('git.log')).toBe(true);
|
|
157
|
+
(0, bun_test_1.expect)(ig.ignores('codebuff.log')).toBe(true);
|
|
158
|
+
});
|
|
159
|
+
(0, bun_test_1.it)('handles Windows-style backslashes', () => {
|
|
160
|
+
memfs_1.vol.reset();
|
|
161
|
+
memfs_1.vol.fromJSON({
|
|
162
|
+
'/project/.gitignore': 'src\\build\\output.js',
|
|
163
|
+
});
|
|
164
|
+
const ig = (0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
165
|
+
(0, bun_test_1.expect)(ig.ignores('src/build/output.js')).toBe(true);
|
|
166
|
+
});
|
|
167
|
+
(0, bun_test_1.it)('handles patterns relative to subdirectory .gitignore', () => {
|
|
168
|
+
memfs_1.vol.reset();
|
|
169
|
+
memfs_1.vol.fromJSON({
|
|
170
|
+
'/project/src/.gitignore': 'build/',
|
|
171
|
+
});
|
|
172
|
+
const ig = (0, project_file_tree_1.parseGitignore)(path_1.default.join(projectRoot, 'src'), projectRoot);
|
|
173
|
+
(0, bun_test_1.expect)(ig.ignores('src/build/output.js')).toBe(true);
|
|
174
|
+
(0, bun_test_1.expect)(ig.ignores('build/output.js')).toBe(false);
|
|
175
|
+
});
|
|
176
|
+
(0, bun_test_1.it)('calls fs.existsSync and fs.readFileSync for each ignore file', () => {
|
|
177
|
+
memfs_1.vol.reset();
|
|
178
|
+
memfs_1.vol.fromJSON({
|
|
179
|
+
'/project/.gitignore': 'git.log',
|
|
180
|
+
'/project/.codebuffignore': 'codebuff.log',
|
|
181
|
+
});
|
|
182
|
+
const existsSpy = bun_test_1.mock.spyOn(fs_1.default, 'existsSync');
|
|
183
|
+
const readSpy = bun_test_1.mock.spyOn(fs_1.default, 'readFileSync');
|
|
184
|
+
(0, project_file_tree_1.parseGitignore)(projectRoot, projectRoot);
|
|
185
|
+
// Should check for all three possible ignore files
|
|
186
|
+
(0, bun_test_1.expect)(existsSpy).toHaveBeenCalledTimes(3);
|
|
187
|
+
(0, bun_test_1.expect)(existsSpy).toHaveBeenCalledWith(path_1.default.join(projectRoot, '.gitignore'));
|
|
188
|
+
(0, bun_test_1.expect)(existsSpy).toHaveBeenCalledWith(path_1.default.join(projectRoot, '.codebuffignore'));
|
|
189
|
+
(0, bun_test_1.expect)(existsSpy).toHaveBeenCalledWith(path_1.default.join(projectRoot, '.manicodeignore'));
|
|
190
|
+
// Should read the two files that exist
|
|
191
|
+
(0, bun_test_1.expect)(readSpy).toHaveBeenCalledTimes(2);
|
|
192
|
+
(0, bun_test_1.expect)(readSpy).toHaveBeenCalledWith(path_1.default.join(projectRoot, '.gitignore'), 'utf8');
|
|
193
|
+
(0, bun_test_1.expect)(readSpy).toHaveBeenCalledWith(path_1.default.join(projectRoot, '.codebuffignore'), 'utf8');
|
|
194
|
+
existsSpy.mockRestore();
|
|
195
|
+
readSpy.mockRestore();
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
(0, bun_test_1.describe)('isFileIgnored', () => {
|
|
199
|
+
const projectRoot = '/project';
|
|
200
|
+
(0, bun_test_1.it)('aggregates ignore rules from parent directories', () => {
|
|
201
|
+
memfs_1.vol.reset();
|
|
202
|
+
memfs_1.vol.fromJSON({
|
|
203
|
+
'/project/.gitignore': '*.log',
|
|
204
|
+
'/project/src/.gitignore': 'build/',
|
|
205
|
+
'/project/src/frontend/.gitignore': '*.min.js',
|
|
206
|
+
});
|
|
207
|
+
const parseGitignoreSpy = bun_test_1.mock.spyOn(projectFileTreeModule, 'parseGitignore');
|
|
208
|
+
// Root .gitignore pattern
|
|
209
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('debug.log', projectRoot)).toBe(true);
|
|
210
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/error.log', projectRoot)).toBe(true);
|
|
211
|
+
// src/.gitignore pattern
|
|
212
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/build/output.js', projectRoot)).toBe(true);
|
|
213
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('other/build/output.js', projectRoot)).toBe(false);
|
|
214
|
+
// src/frontend/.gitignore pattern
|
|
215
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/frontend/app.min.js', projectRoot)).toBe(true);
|
|
216
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/frontend/app.js', projectRoot)).toBe(false);
|
|
217
|
+
// Should call parseGitignore for each directory up to root
|
|
218
|
+
(0, bun_test_1.expect)(parseGitignoreSpy).toHaveBeenCalledTimes(3);
|
|
219
|
+
parseGitignoreSpy.mockRestore();
|
|
220
|
+
});
|
|
221
|
+
(0, bun_test_1.it)('handles root-anchored patterns in subdirectories', () => {
|
|
222
|
+
memfs_1.vol.reset();
|
|
223
|
+
memfs_1.vol.fromJSON({
|
|
224
|
+
'/project/src/.gitignore': '/config.js',
|
|
225
|
+
});
|
|
226
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('config.js', projectRoot)).toBe(true);
|
|
227
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/config.js', projectRoot)).toBe(false);
|
|
228
|
+
});
|
|
229
|
+
(0, bun_test_1.it)('handles negation patterns across directories', () => {
|
|
230
|
+
memfs_1.vol.reset();
|
|
231
|
+
memfs_1.vol.fromJSON({
|
|
232
|
+
'/project/.gitignore': '*.log',
|
|
233
|
+
'/project/src/.gitignore': '!important.log',
|
|
234
|
+
});
|
|
235
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('debug.log', projectRoot)).toBe(true);
|
|
236
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/important.log', projectRoot)).toBe(false);
|
|
237
|
+
});
|
|
238
|
+
(0, bun_test_1.it)('handles multiple ignore files in the same directory', () => {
|
|
239
|
+
memfs_1.vol.reset();
|
|
240
|
+
memfs_1.vol.fromJSON({
|
|
241
|
+
'/project/src/.gitignore': 'git.log',
|
|
242
|
+
'/project/src/.codebuffignore': 'codebuff.log',
|
|
243
|
+
'/project/src/.manicodeignore': 'manicode.log',
|
|
244
|
+
});
|
|
245
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/git.log', projectRoot)).toBe(true);
|
|
246
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/codebuff.log', projectRoot)).toBe(true);
|
|
247
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/manicode.log', projectRoot)).toBe(true);
|
|
248
|
+
(0, bun_test_1.expect)((0, project_file_tree_1.isFileIgnored)('src/other.log', projectRoot)).toBe(false);
|
|
249
|
+
});
|
|
250
|
+
});
|
|
251
|
+
//# sourceMappingURL=project-file-tree.test.js.map
|
|
@@ -0,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E,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
|
package/dist/common/actions.d.ts
CHANGED
|
@@ -4,12 +4,12 @@ export declare const FileChangeSchema: z.ZodObject<{
|
|
|
4
4
|
path: z.ZodString;
|
|
5
5
|
content: z.ZodString;
|
|
6
6
|
}, "strip", z.ZodTypeAny, {
|
|
7
|
-
type: "patch" | "file";
|
|
8
7
|
path: string;
|
|
8
|
+
type: "patch" | "file";
|
|
9
9
|
content: string;
|
|
10
10
|
}, {
|
|
11
|
-
type: "patch" | "file";
|
|
12
11
|
path: string;
|
|
12
|
+
type: "patch" | "file";
|
|
13
13
|
content: string;
|
|
14
14
|
}>;
|
|
15
15
|
export type FileChange = z.infer<typeof FileChangeSchema>;
|
|
@@ -18,12 +18,12 @@ export declare const CHANGES: z.ZodArray<z.ZodObject<{
|
|
|
18
18
|
path: z.ZodString;
|
|
19
19
|
content: z.ZodString;
|
|
20
20
|
}, "strip", z.ZodTypeAny, {
|
|
21
|
-
type: "patch" | "file";
|
|
22
21
|
path: string;
|
|
22
|
+
type: "patch" | "file";
|
|
23
23
|
content: string;
|
|
24
24
|
}, {
|
|
25
|
-
type: "patch" | "file";
|
|
26
25
|
path: string;
|
|
26
|
+
type: "patch" | "file";
|
|
27
27
|
content: string;
|
|
28
28
|
}>, "many">;
|
|
29
29
|
export type FileChanges = z.infer<typeof CHANGES>;
|
|
@@ -504,7 +504,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
504
504
|
type: "prompt";
|
|
505
505
|
promptId: string;
|
|
506
506
|
fingerprintId: string;
|
|
507
|
-
costMode: "
|
|
507
|
+
costMode: "max" | "lite" | "normal" | "experimental";
|
|
508
508
|
agentState: {
|
|
509
509
|
agentContext: string;
|
|
510
510
|
fileContext: {
|
|
@@ -659,7 +659,7 @@ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
659
659
|
}[];
|
|
660
660
|
prompt?: string | undefined;
|
|
661
661
|
authToken?: string | undefined;
|
|
662
|
-
costMode?: "
|
|
662
|
+
costMode?: "max" | "lite" | "normal" | "experimental" | undefined;
|
|
663
663
|
model?: string | undefined;
|
|
664
664
|
cwd?: string | undefined;
|
|
665
665
|
}>, z.ZodObject<{
|
|
@@ -928,12 +928,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
928
928
|
path: z.ZodString;
|
|
929
929
|
content: z.ZodString;
|
|
930
930
|
}, "strip", z.ZodTypeAny, {
|
|
931
|
-
type: "patch" | "file";
|
|
932
931
|
path: string;
|
|
932
|
+
type: "patch" | "file";
|
|
933
933
|
content: string;
|
|
934
934
|
}, {
|
|
935
|
-
type: "patch" | "file";
|
|
936
935
|
path: string;
|
|
936
|
+
type: "patch" | "file";
|
|
937
937
|
content: string;
|
|
938
938
|
}>, "many">;
|
|
939
939
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -941,12 +941,12 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
941
941
|
path: z.ZodString;
|
|
942
942
|
content: z.ZodString;
|
|
943
943
|
}, "strip", z.ZodTypeAny, {
|
|
944
|
-
type: "patch" | "file";
|
|
945
944
|
path: string;
|
|
945
|
+
type: "patch" | "file";
|
|
946
946
|
content: string;
|
|
947
947
|
}, {
|
|
948
|
-
type: "patch" | "file";
|
|
949
948
|
path: string;
|
|
949
|
+
type: "patch" | "file";
|
|
950
950
|
content: string;
|
|
951
951
|
}>, "many">;
|
|
952
952
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -971,13 +971,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
971
971
|
userInputId: string;
|
|
972
972
|
response: string;
|
|
973
973
|
changes: {
|
|
974
|
-
type: "patch" | "file";
|
|
975
974
|
path: string;
|
|
975
|
+
type: "patch" | "file";
|
|
976
976
|
content: string;
|
|
977
977
|
}[];
|
|
978
978
|
changesAlreadyApplied: {
|
|
979
|
-
type: "patch" | "file";
|
|
980
979
|
path: string;
|
|
980
|
+
type: "patch" | "file";
|
|
981
981
|
content: string;
|
|
982
982
|
}[];
|
|
983
983
|
addedFileVersions: {
|
|
@@ -995,13 +995,13 @@ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShap
|
|
|
995
995
|
userInputId: string;
|
|
996
996
|
response: string;
|
|
997
997
|
changes: {
|
|
998
|
-
type: "patch" | "file";
|
|
999
998
|
path: string;
|
|
999
|
+
type: "patch" | "file";
|
|
1000
1000
|
content: string;
|
|
1001
1001
|
}[];
|
|
1002
1002
|
changesAlreadyApplied: {
|
|
1003
|
-
type: "patch" | "file";
|
|
1004
1003
|
path: string;
|
|
1004
|
+
type: "patch" | "file";
|
|
1005
1005
|
content: string;
|
|
1006
1006
|
}[];
|
|
1007
1007
|
addedFileVersions: {
|
|
@@ -1678,12 +1678,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1678
1678
|
path: z.ZodString;
|
|
1679
1679
|
content: z.ZodString;
|
|
1680
1680
|
}, "strip", z.ZodTypeAny, {
|
|
1681
|
-
type: "patch" | "file";
|
|
1682
1681
|
path: string;
|
|
1682
|
+
type: "patch" | "file";
|
|
1683
1683
|
content: string;
|
|
1684
1684
|
}, {
|
|
1685
|
-
type: "patch" | "file";
|
|
1686
1685
|
path: string;
|
|
1686
|
+
type: "patch" | "file";
|
|
1687
1687
|
content: string;
|
|
1688
1688
|
}>, "many">;
|
|
1689
1689
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -1691,12 +1691,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1691
1691
|
path: z.ZodString;
|
|
1692
1692
|
content: z.ZodString;
|
|
1693
1693
|
}, "strip", z.ZodTypeAny, {
|
|
1694
|
-
type: "patch" | "file";
|
|
1695
1694
|
path: string;
|
|
1695
|
+
type: "patch" | "file";
|
|
1696
1696
|
content: string;
|
|
1697
1697
|
}, {
|
|
1698
|
-
type: "patch" | "file";
|
|
1699
1698
|
path: string;
|
|
1699
|
+
type: "patch" | "file";
|
|
1700
1700
|
content: string;
|
|
1701
1701
|
}>, "many">;
|
|
1702
1702
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -1721,13 +1721,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1721
1721
|
userInputId: string;
|
|
1722
1722
|
response: string;
|
|
1723
1723
|
changes: {
|
|
1724
|
-
type: "patch" | "file";
|
|
1725
1724
|
path: string;
|
|
1725
|
+
type: "patch" | "file";
|
|
1726
1726
|
content: string;
|
|
1727
1727
|
}[];
|
|
1728
1728
|
changesAlreadyApplied: {
|
|
1729
|
-
type: "patch" | "file";
|
|
1730
1729
|
path: string;
|
|
1730
|
+
type: "patch" | "file";
|
|
1731
1731
|
content: string;
|
|
1732
1732
|
}[];
|
|
1733
1733
|
addedFileVersions: {
|
|
@@ -1745,13 +1745,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
1745
1745
|
userInputId: string;
|
|
1746
1746
|
response: string;
|
|
1747
1747
|
changes: {
|
|
1748
|
-
type: "patch" | "file";
|
|
1749
1748
|
path: string;
|
|
1749
|
+
type: "patch" | "file";
|
|
1750
1750
|
content: string;
|
|
1751
1751
|
}[];
|
|
1752
1752
|
changesAlreadyApplied: {
|
|
1753
|
-
type: "patch" | "file";
|
|
1754
1753
|
path: string;
|
|
1754
|
+
type: "patch" | "file";
|
|
1755
1755
|
content: string;
|
|
1756
1756
|
}[];
|
|
1757
1757
|
addedFileVersions: {
|
|
@@ -2424,12 +2424,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2424
2424
|
path: z.ZodString;
|
|
2425
2425
|
content: z.ZodString;
|
|
2426
2426
|
}, "strip", z.ZodTypeAny, {
|
|
2427
|
-
type: "patch" | "file";
|
|
2428
2427
|
path: string;
|
|
2428
|
+
type: "patch" | "file";
|
|
2429
2429
|
content: string;
|
|
2430
2430
|
}, {
|
|
2431
|
-
type: "patch" | "file";
|
|
2432
2431
|
path: string;
|
|
2432
|
+
type: "patch" | "file";
|
|
2433
2433
|
content: string;
|
|
2434
2434
|
}>, "many">;
|
|
2435
2435
|
changesAlreadyApplied: z.ZodArray<z.ZodObject<{
|
|
@@ -2437,12 +2437,12 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2437
2437
|
path: z.ZodString;
|
|
2438
2438
|
content: z.ZodString;
|
|
2439
2439
|
}, "strip", z.ZodTypeAny, {
|
|
2440
|
-
type: "patch" | "file";
|
|
2441
2440
|
path: string;
|
|
2441
|
+
type: "patch" | "file";
|
|
2442
2442
|
content: string;
|
|
2443
2443
|
}, {
|
|
2444
|
-
type: "patch" | "file";
|
|
2445
2444
|
path: string;
|
|
2445
|
+
type: "patch" | "file";
|
|
2446
2446
|
content: string;
|
|
2447
2447
|
}>, "many">;
|
|
2448
2448
|
addedFileVersions: z.ZodArray<z.ZodObject<{
|
|
@@ -2466,13 +2466,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2466
2466
|
userInputId: string;
|
|
2467
2467
|
response: string;
|
|
2468
2468
|
changes: {
|
|
2469
|
-
type: "patch" | "file";
|
|
2470
2469
|
path: string;
|
|
2470
|
+
type: "patch" | "file";
|
|
2471
2471
|
content: string;
|
|
2472
2472
|
}[];
|
|
2473
2473
|
changesAlreadyApplied: {
|
|
2474
|
-
type: "patch" | "file";
|
|
2475
2474
|
path: string;
|
|
2475
|
+
type: "patch" | "file";
|
|
2476
2476
|
content: string;
|
|
2477
2477
|
}[];
|
|
2478
2478
|
addedFileVersions: {
|
|
@@ -2490,13 +2490,13 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2490
2490
|
userInputId: string;
|
|
2491
2491
|
response: string;
|
|
2492
2492
|
changes: {
|
|
2493
|
-
type: "patch" | "file";
|
|
2494
2493
|
path: string;
|
|
2494
|
+
type: "patch" | "file";
|
|
2495
2495
|
content: string;
|
|
2496
2496
|
}[];
|
|
2497
2497
|
changesAlreadyApplied: {
|
|
2498
|
-
type: "patch" | "file";
|
|
2499
2498
|
path: string;
|
|
2499
|
+
type: "patch" | "file";
|
|
2500
2500
|
content: string;
|
|
2501
2501
|
}[];
|
|
2502
2502
|
addedFileVersions: {
|
|
@@ -2590,15 +2590,15 @@ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.Zo
|
|
|
2590
2590
|
error: z.ZodOptional<z.ZodString>;
|
|
2591
2591
|
remainingBalance: z.ZodOptional<z.ZodNumber>;
|
|
2592
2592
|
}, "strip", z.ZodTypeAny, {
|
|
2593
|
-
type: "action-error";
|
|
2594
2593
|
message: string;
|
|
2595
|
-
|
|
2594
|
+
type: "action-error";
|
|
2596
2595
|
error?: string | undefined;
|
|
2596
|
+
remainingBalance?: number | undefined;
|
|
2597
2597
|
}, {
|
|
2598
|
-
type: "action-error";
|
|
2599
2598
|
message: string;
|
|
2600
|
-
|
|
2599
|
+
type: "action-error";
|
|
2601
2600
|
error?: string | undefined;
|
|
2601
|
+
remainingBalance?: number | undefined;
|
|
2602
2602
|
}>, z.ZodObject<{
|
|
2603
2603
|
type: z.ZodLiteral<"commit-message-response">;
|
|
2604
2604
|
commitMessage: z.ZodString;
|
|
@@ -12,6 +12,11 @@ export declare enum AnalyticsEvent {
|
|
|
12
12
|
LOGIN = "cli.login",
|
|
13
13
|
TERMINAL_COMMAND_COMPLETED = "cli.terminal_command_completed",
|
|
14
14
|
MALFORMED_PROMPT_RESPONSE = "cli.malformed_prompt_response",
|
|
15
|
+
USER_INPUT_COMPLETE = "cli.user_input_complete",
|
|
16
|
+
UPDATE_CODEBUFF_FAILED = "cli.update_codebuff_failed",
|
|
17
|
+
SLASH_MENU_ACTIVATED = "cli.slash_menu_activated",
|
|
18
|
+
SLASH_COMMAND_USED = "cli.slash_command_used",
|
|
19
|
+
INVALID_COMMAND = "cli.invalid_command",
|
|
15
20
|
USER_INPUT = "backend.user_input",
|
|
16
21
|
AGENT_STEP = "backend.agent_step",
|
|
17
22
|
CREDIT_GRANT = "backend.credit_grant",
|
|
@@ -17,6 +17,11 @@ var AnalyticsEvent;
|
|
|
17
17
|
AnalyticsEvent["LOGIN"] = "cli.login";
|
|
18
18
|
AnalyticsEvent["TERMINAL_COMMAND_COMPLETED"] = "cli.terminal_command_completed";
|
|
19
19
|
AnalyticsEvent["MALFORMED_PROMPT_RESPONSE"] = "cli.malformed_prompt_response";
|
|
20
|
+
AnalyticsEvent["USER_INPUT_COMPLETE"] = "cli.user_input_complete";
|
|
21
|
+
AnalyticsEvent["UPDATE_CODEBUFF_FAILED"] = "cli.update_codebuff_failed";
|
|
22
|
+
AnalyticsEvent["SLASH_MENU_ACTIVATED"] = "cli.slash_menu_activated";
|
|
23
|
+
AnalyticsEvent["SLASH_COMMAND_USED"] = "cli.slash_command_used";
|
|
24
|
+
AnalyticsEvent["INVALID_COMMAND"] = "cli.invalid_command";
|
|
20
25
|
// Backend
|
|
21
26
|
AnalyticsEvent["USER_INPUT"] = "backend.user_input";
|
|
22
27
|
AnalyticsEvent["AGENT_STEP"] = "backend.agent_step";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics-events.js","sourceRoot":"","sources":["../../src/constants/analytics-events.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,
|
|
1
|
+
{"version":3,"file":"analytics-events.js","sourceRoot":"","sources":["../../src/constants/analytics-events.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,cA8BX;AA9BD,WAAY,cAAc;IACxB,MAAM;IACN,mDAAiC,CAAA;IACjC,iFAA+D,CAAA;IAC/D,uEAAqD,CAAA;IACrD,mGAAiF,CAAA;IACjF,2EAAyD,CAAA;IACzD,2DAAyC,CAAA;IACzC,yEAAuD,CAAA;IACvD,qCAAmB,CAAA;IACnB,+EAA6D,CAAA;IAC7D,6EAA2D,CAAA;IAC3D,iEAA+C,CAAA;IAC/C,uEAAqD,CAAA;IACrD,mEAAiD,CAAA;IACjD,+DAA6C,CAAA;IAC7C,yDAAuC,CAAA;IAEvC,UAAU;IACV,mDAAiC,CAAA;IACjC,mDAAiC,CAAA;IACjC,uDAAqC,CAAA;IACrC,6DAA2C,CAAA;IAC3C,+CAA6B,CAAA;IAE7B,MAAM;IACN,uCAAqB,CAAA;IAErB,SAAS;IACT,sDAAoC,CAAA;AACtC,CAAC,EA9BW,cAAc,8BAAd,cAAc,QA8BzB"}
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
// Bun Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`stringifySchema should correctly stringify StartupProcessSchema 1`] = `
|
|
4
|
+
"// Defines a single startup process.
|
|
5
|
+
{
|
|
6
|
+
// A user-friendly name for the process. Should be one word and unique.
|
|
7
|
+
"name": string,
|
|
8
|
+
|
|
9
|
+
// The actual shell command to execute.
|
|
10
|
+
"command": string,
|
|
11
|
+
|
|
12
|
+
// (optional): The working directory from which to run the command.
|
|
13
|
+
"cwd": string | undefined,
|
|
14
|
+
|
|
15
|
+
// (optional): Whether this process should be run, default: true
|
|
16
|
+
"enabled": boolean | undefined,
|
|
17
|
+
|
|
18
|
+
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
19
|
+
"stdoutFile": string | undefined,
|
|
20
|
+
|
|
21
|
+
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
22
|
+
"stderrFile": string | undefined
|
|
23
|
+
}"
|
|
24
|
+
`;
|
|
25
|
+
|
|
26
|
+
exports[`stringifySchema should correctly stringify CodebuffConfigSchema 1`] = `
|
|
27
|
+
"// Defines the overall Codebuff configuration file (e.g., codebuff.json). This schema defines the top-level structure of the configuration.
|
|
28
|
+
{
|
|
29
|
+
// (optional): Does nothing. Put any thing you want here!
|
|
30
|
+
"description": any | undefined,
|
|
31
|
+
|
|
32
|
+
// (optional): An array of startup processes.
|
|
33
|
+
"startupProcesses": [
|
|
34
|
+
|
|
35
|
+
// Defines a single startup process.
|
|
36
|
+
{
|
|
37
|
+
// A user-friendly name for the process. Should be one word and unique.
|
|
38
|
+
"name": string,
|
|
39
|
+
|
|
40
|
+
// The actual shell command to execute.
|
|
41
|
+
"command": string,
|
|
42
|
+
|
|
43
|
+
// (optional): The working directory from which to run the command.
|
|
44
|
+
"cwd": string | undefined,
|
|
45
|
+
|
|
46
|
+
// (optional): Whether this process should be run, default: true
|
|
47
|
+
"enabled": boolean | undefined,
|
|
48
|
+
|
|
49
|
+
// (optional): Path to write the process's stdout. If not specified, stderr is not stored.
|
|
50
|
+
"stdoutFile": string | undefined,
|
|
51
|
+
|
|
52
|
+
// (optional): Path to write the process's stderr. If not specified, stderr will be put into the stdoutFile.
|
|
53
|
+
"stderrFile": string | undefined
|
|
54
|
+
}
|
|
55
|
+
] | undefined
|
|
56
|
+
}"
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
exports[`stringifySchema should handle a more complex schema 1`] = `
|
|
60
|
+
"// A complex test schema
|
|
61
|
+
{
|
|
62
|
+
// Unique identifier
|
|
63
|
+
"id": string,
|
|
64
|
+
|
|
65
|
+
// A positive integer count
|
|
66
|
+
"count": number,
|
|
67
|
+
|
|
68
|
+
// Activity status
|
|
69
|
+
"isActive": boolean,
|
|
70
|
+
|
|
71
|
+
// (optional): Optional list of tags
|
|
72
|
+
"tags": [
|
|
73
|
+
|
|
74
|
+
string
|
|
75
|
+
] | undefined,
|
|
76
|
+
|
|
77
|
+
// A nested object structure
|
|
78
|
+
"nested": {
|
|
79
|
+
"value": string,
|
|
80
|
+
|
|
81
|
+
// Nested configuration
|
|
82
|
+
"config": {
|
|
83
|
+
// (optional): Number of retries, default: 3
|
|
84
|
+
"retries": number
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}"
|
|
88
|
+
`;
|
|
89
|
+
|
|
90
|
+
exports[`stringifySchema should handle an empty object schema 1`] = `
|
|
91
|
+
"// An empty schema
|
|
92
|
+
{
|
|
93
|
+
}"
|
|
94
|
+
`;
|
|
95
|
+
|
|
96
|
+
exports[`stringifySchema should handle schema with only optional fields 1`] = `
|
|
97
|
+
"// Schema with only optional fields
|
|
98
|
+
{
|
|
99
|
+
// (optional): Optional field 1
|
|
100
|
+
"field1": string | undefined,
|
|
101
|
+
|
|
102
|
+
// (optional): Optional field 2
|
|
103
|
+
"field2": number | undefined
|
|
104
|
+
}"
|
|
105
|
+
`;
|
|
106
|
+
|
|
107
|
+
exports[`stringifySchema should handle schema with default values 1`] = `
|
|
108
|
+
"// Schema demonstrating default values
|
|
109
|
+
{
|
|
110
|
+
// (optional): Name with default, default: "anonymous"
|
|
111
|
+
"name": string,
|
|
112
|
+
|
|
113
|
+
// (optional): Level with default, default: 1
|
|
114
|
+
"level": number,
|
|
115
|
+
|
|
116
|
+
// (optional): Enabled with default, default: false
|
|
117
|
+
"enabled": boolean
|
|
118
|
+
}"
|
|
119
|
+
`;
|