codecane 1.0.265 → 1.0.268

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 (218) hide show
  1. package/dist/background-process-manager.d.ts +1 -1
  2. package/dist/background-process-manager.js +3 -3
  3. package/dist/browser-runner.d.ts +1 -1
  4. package/dist/browser-runner.js +4 -4
  5. package/dist/chat-storage.d.ts +1 -1
  6. package/dist/chat-storage.js +1 -1
  7. package/dist/checkpoints/checkpoint-manager.d.ts +1 -1
  8. package/dist/checkpoints/checkpoint-manager.js +1 -1
  9. package/dist/cli-handlers/api-key.d.ts +1 -1
  10. package/dist/cli-handlers/api-key.js +1 -1
  11. package/dist/cli-handlers/diff.d.ts +1 -1
  12. package/dist/cli-handlers/inititalization-flow.js +1 -1
  13. package/dist/cli.d.ts +1 -1
  14. package/dist/cli.js +2 -2
  15. package/dist/client.d.ts +7 -7
  16. package/dist/client.js +9 -9
  17. package/dist/credentials.d.ts +1 -1
  18. package/dist/credentials.js +2 -2
  19. package/dist/dev-process-manager.d.ts +1 -1
  20. package/dist/dev-process-manager.js +1 -1
  21. package/dist/index.js +1 -1
  22. package/dist/menu.d.ts +1 -1
  23. package/dist/menu.js +1 -1
  24. package/dist/project-files.d.ts +2 -2
  25. package/dist/project-files.js +5 -5
  26. package/dist/startup-process-handler.d.ts +1 -1
  27. package/dist/tool-handlers.d.ts +2 -2
  28. package/dist/tool-handlers.js +4 -4
  29. package/dist/types.d.ts +1 -1
  30. package/dist/utils/__tests__/tool-renderers.test.js +1 -1
  31. package/dist/utils/__tests__/xml-stream-parser.test.js +1 -1
  32. package/dist/utils/analytics.d.ts +1 -1
  33. package/dist/utils/logger.js +1 -1
  34. package/dist/utils/terminal.js +9 -14
  35. package/dist/utils/terminal.js.map +1 -1
  36. package/dist/utils/tool-renderers.d.ts +1 -1
  37. package/dist/utils/tool-renderers.js +1 -1
  38. package/dist/utils/xml-stream-parser.d.ts +1 -1
  39. package/dist/utils/xml-stream-parser.js +2 -2
  40. package/dist/web-scraper.js +1 -1
  41. package/dist/workers/project-context.js +1 -1
  42. package/package.json +38 -19
  43. package/dist/code-map/languages.d.ts +0 -13
  44. package/dist/code-map/languages.d.ts.map +0 -1
  45. package/dist/code-map/languages.js +0 -129
  46. package/dist/code-map/languages.js.map +0 -1
  47. package/dist/code-map/parse.d.ts +0 -12
  48. package/dist/code-map/parse.d.ts.map +0 -1
  49. package/dist/code-map/parse.js +0 -127
  50. package/dist/code-map/parse.js.map +0 -1
  51. package/dist/code-map/test-langs/test.d.ts +0 -12
  52. package/dist/code-map/test-langs/test.d.ts.map +0 -1
  53. package/dist/code-map/test-langs/test.js +0 -23
  54. package/dist/code-map/test-langs/test.js.map +0 -1
  55. package/dist/code-map/tree-sitter-queries/readme.md +0 -23
  56. package/dist/code-map/tree-sitter-queries/tree-sitter-c-tags.scm +0 -11
  57. package/dist/code-map/tree-sitter-queries/tree-sitter-c_sharp-tags.scm +0 -13
  58. package/dist/code-map/tree-sitter-queries/tree-sitter-cpp-tags.scm +0 -17
  59. package/dist/code-map/tree-sitter-queries/tree-sitter-go-tags.scm +0 -26
  60. package/dist/code-map/tree-sitter-queries/tree-sitter-java-tags.scm +0 -19
  61. package/dist/code-map/tree-sitter-queries/tree-sitter-javascript-tags.scm +0 -15
  62. package/dist/code-map/tree-sitter-queries/tree-sitter-php-tags.scm +0 -26
  63. package/dist/code-map/tree-sitter-queries/tree-sitter-python-tags.scm +0 -9
  64. package/dist/code-map/tree-sitter-queries/tree-sitter-ruby-tags.scm +0 -58
  65. package/dist/code-map/tree-sitter-queries/tree-sitter-rust-tags.scm +0 -26
  66. package/dist/code-map/tree-sitter-queries/tree-sitter-typescript-tags.scm +0 -15
  67. package/dist/code-map/tsconfig.tsbuildinfo +0 -1
  68. package/dist/common/actions.d.ts +0 -2589
  69. package/dist/common/actions.js +0 -143
  70. package/dist/common/actions.js.map +0 -1
  71. package/dist/common/analytics.d.ts +0 -4
  72. package/dist/common/analytics.js +0 -40
  73. package/dist/common/analytics.js.map +0 -1
  74. package/dist/common/api-keys/constants.d.ts +0 -8
  75. package/dist/common/api-keys/constants.js +0 -26
  76. package/dist/common/api-keys/constants.js.map +0 -1
  77. package/dist/common/api-keys/crypto.d.ts +0 -24
  78. package/dist/common/api-keys/crypto.js +0 -186
  79. package/dist/common/api-keys/crypto.js.map +0 -1
  80. package/dist/common/browser-actions.d.ts +0 -4415
  81. package/dist/common/browser-actions.js +0 -343
  82. package/dist/common/browser-actions.js.map +0 -1
  83. package/dist/common/constants/analytics-events.d.ts +0 -19
  84. package/dist/common/constants/analytics-events.js +0 -27
  85. package/dist/common/constants/analytics-events.js.map +0 -1
  86. package/dist/common/constants/grant-priorities.d.ts +0 -2
  87. package/dist/common/constants/grant-priorities.js +0 -10
  88. package/dist/common/constants/grant-priorities.js.map +0 -1
  89. package/dist/common/constants/tools.d.ts +0 -16
  90. package/dist/common/constants/tools.js +0 -44
  91. package/dist/common/constants/tools.js.map +0 -1
  92. package/dist/common/constants.d.ts +0 -134
  93. package/dist/common/constants.js +0 -180
  94. package/dist/common/constants.js.map +0 -1
  95. package/dist/common/db/drizzle.config.d.ts +0 -2
  96. package/dist/common/db/drizzle.config.js +0 -17
  97. package/dist/common/db/drizzle.config.js.map +0 -1
  98. package/dist/common/db/env.d.mts +0 -1
  99. package/dist/common/db/env.mjs +0 -26
  100. package/dist/common/db/env.mjs.map +0 -1
  101. package/dist/common/db/index.d.ts +0 -6
  102. package/dist/common/db/index.js +0 -35
  103. package/dist/common/db/index.js.map +0 -1
  104. package/dist/common/db/schema.d.ts +0 -1419
  105. package/dist/common/db/schema.js +0 -175
  106. package/dist/common/db/schema.js.map +0 -1
  107. package/dist/common/db/transaction.d.ts +0 -12
  108. package/dist/common/db/transaction.js +0 -36
  109. package/dist/common/db/transaction.js.map +0 -1
  110. package/dist/common/env.d.mts +0 -1
  111. package/dist/common/env.mjs +0 -40
  112. package/dist/common/env.mjs.map +0 -1
  113. package/dist/common/json-config/__tests__/stringify-schema.test.d.ts +0 -1
  114. package/dist/common/json-config/__tests__/stringify-schema.test.js +0 -66
  115. package/dist/common/json-config/__tests__/stringify-schema.test.js.map +0 -1
  116. package/dist/common/json-config/constants.d.ts +0 -82
  117. package/dist/common/json-config/constants.js +0 -48
  118. package/dist/common/json-config/constants.js.map +0 -1
  119. package/dist/common/json-config/parser.d.ts +0 -7
  120. package/dist/common/json-config/parser.js +0 -51
  121. package/dist/common/json-config/parser.js.map +0 -1
  122. package/dist/common/json-config/stringify-schema.d.ts +0 -9
  123. package/dist/common/json-config/stringify-schema.js +0 -131
  124. package/dist/common/json-config/stringify-schema.js.map +0 -1
  125. package/dist/common/project-file-tree.d.ts +0 -11
  126. package/dist/common/project-file-tree.js +0 -200
  127. package/dist/common/project-file-tree.js.map +0 -1
  128. package/dist/common/types/agent-state.d.ts +0 -464
  129. package/dist/common/types/agent-state.js +0 -32
  130. package/dist/common/types/agent-state.js.map +0 -1
  131. package/dist/common/types/grant.d.ts +0 -2
  132. package/dist/common/types/grant.js +0 -10
  133. package/dist/common/types/grant.js.map +0 -1
  134. package/dist/common/types/message.d.ts +0 -311
  135. package/dist/common/types/message.js +0 -54
  136. package/dist/common/types/message.js.map +0 -1
  137. package/dist/common/types/referral.d.ts +0 -2
  138. package/dist/common/types/referral.js +0 -5
  139. package/dist/common/types/referral.js.map +0 -1
  140. package/dist/common/types/tools.d.ts +0 -5
  141. package/dist/common/types/tools.js +0 -3
  142. package/dist/common/types/tools.js.map +0 -1
  143. package/dist/common/types/usage.d.ts +0 -40
  144. package/dist/common/types/usage.js +0 -15
  145. package/dist/common/types/usage.js.map +0 -1
  146. package/dist/common/util/__tests__/messages.test.d.ts +0 -1
  147. package/dist/common/util/__tests__/messages.test.js +0 -70
  148. package/dist/common/util/__tests__/messages.test.js.map +0 -1
  149. package/dist/common/util/__tests__/saxy.test.d.ts +0 -1
  150. package/dist/common/util/__tests__/saxy.test.js +0 -262
  151. package/dist/common/util/__tests__/saxy.test.js.map +0 -1
  152. package/dist/common/util/__tests__/string.test.d.ts +0 -1
  153. package/dist/common/util/__tests__/string.test.js +0 -82
  154. package/dist/common/util/__tests__/string.test.js.map +0 -1
  155. package/dist/common/util/array.d.ts +0 -6
  156. package/dist/common/util/array.js +0 -32
  157. package/dist/common/util/array.js.map +0 -1
  158. package/dist/common/util/changes.d.ts +0 -7
  159. package/dist/common/util/changes.js +0 -78
  160. package/dist/common/util/changes.js.map +0 -1
  161. package/dist/common/util/credentials.d.ts +0 -25
  162. package/dist/common/util/credentials.js +0 -24
  163. package/dist/common/util/credentials.js.map +0 -1
  164. package/dist/common/util/currency.d.ts +0 -14
  165. package/dist/common/util/currency.js +0 -23
  166. package/dist/common/util/currency.js.map +0 -1
  167. package/dist/common/util/dates.d.ts +0 -10
  168. package/dist/common/util/dates.js +0 -22
  169. package/dist/common/util/dates.js.map +0 -1
  170. package/dist/common/util/file.d.ts +0 -159
  171. package/dist/common/util/file.js +0 -192
  172. package/dist/common/util/file.js.map +0 -1
  173. package/dist/common/util/git.d.ts +0 -6
  174. package/dist/common/util/git.js +0 -81
  175. package/dist/common/util/git.js.map +0 -1
  176. package/dist/common/util/logger.d.ts +0 -8
  177. package/dist/common/util/logger.js +0 -52
  178. package/dist/common/util/logger.js.map +0 -1
  179. package/dist/common/util/lru-cache.d.ts +0 -30
  180. package/dist/common/util/lru-cache.js +0 -68
  181. package/dist/common/util/lru-cache.js.map +0 -1
  182. package/dist/common/util/messages.d.ts +0 -9
  183. package/dist/common/util/messages.js +0 -69
  184. package/dist/common/util/messages.js.map +0 -1
  185. package/dist/common/util/min-heap.d.ts +0 -15
  186. package/dist/common/util/min-heap.js +0 -73
  187. package/dist/common/util/min-heap.js.map +0 -1
  188. package/dist/common/util/object.d.ts +0 -18
  189. package/dist/common/util/object.js +0 -91
  190. package/dist/common/util/object.js.map +0 -1
  191. package/dist/common/util/patch.d.ts +0 -1
  192. package/dist/common/util/patch.js +0 -215
  193. package/dist/common/util/patch.js.map +0 -1
  194. package/dist/common/util/promise.d.ts +0 -17
  195. package/dist/common/util/promise.js +0 -80
  196. package/dist/common/util/promise.js.map +0 -1
  197. package/dist/common/util/referral.d.ts +0 -1
  198. package/dist/common/util/referral.js +0 -6
  199. package/dist/common/util/referral.js.map +0 -1
  200. package/dist/common/util/saxy.d.ts +0 -166
  201. package/dist/common/util/saxy.js +0 -473
  202. package/dist/common/util/saxy.js.map +0 -1
  203. package/dist/common/util/string.d.ts +0 -61
  204. package/dist/common/util/string.js +0 -220
  205. package/dist/common/util/string.js.map +0 -1
  206. package/dist/common/util/stripe.d.ts +0 -3
  207. package/dist/common/util/stripe.js +0 -22
  208. package/dist/common/util/stripe.js.map +0 -1
  209. package/dist/common/util/sync-failure.d.ts +0 -1
  210. package/dist/common/util/sync-failure.js +0 -57
  211. package/dist/common/util/sync-failure.js.map +0 -1
  212. package/dist/common/websockets/websocket-client.d.ts +0 -42
  213. package/dist/common/websockets/websocket-client.js +0 -216
  214. package/dist/common/websockets/websocket-client.js.map +0 -1
  215. package/dist/common/websockets/websocket-schema.d.ts +0 -4866
  216. package/dist/common/websockets/websocket-schema.js +0 -55
  217. package/dist/common/websockets/websocket-schema.js.map +0 -1
  218. package/dist/utils/__tests__/response-example-4-files.txt +0 -621
@@ -1,464 +0,0 @@
1
- import { z } from 'zod';
2
- import { ProjectFileContext } from '../util/file';
3
- export declare const ToolCallSchema: z.ZodObject<{
4
- name: z.ZodString;
5
- parameters: z.ZodRecord<z.ZodString, z.ZodString>;
6
- id: z.ZodString;
7
- }, "strip", z.ZodTypeAny, {
8
- name: string;
9
- id: string;
10
- parameters: Record<string, string>;
11
- }, {
12
- name: string;
13
- id: string;
14
- parameters: Record<string, string>;
15
- }>;
16
- export type ToolCall = z.infer<typeof ToolCallSchema>;
17
- export declare const ToolResultSchema: z.ZodObject<{
18
- name: z.ZodString;
19
- result: z.ZodString;
20
- id: z.ZodString;
21
- }, "strip", z.ZodTypeAny, {
22
- name: string;
23
- id: string;
24
- result: string;
25
- }, {
26
- name: string;
27
- id: string;
28
- result: string;
29
- }>;
30
- export type ToolResult = z.infer<typeof ToolResultSchema>;
31
- export declare const AgentStateSchema: z.ZodObject<{
32
- agentContext: z.ZodString;
33
- fileContext: z.ZodObject<{
34
- currentWorkingDirectory: z.ZodString;
35
- fileTree: z.ZodArray<z.ZodType<import("../util/file").FileTreeNode, z.ZodTypeDef, import("../util/file").FileTreeNode>, "many">;
36
- fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
37
- knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
38
- userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
39
- gitChanges: z.ZodObject<{
40
- status: z.ZodString;
41
- diff: z.ZodString;
42
- diffCached: z.ZodString;
43
- lastCommitMessages: z.ZodString;
44
- }, "strip", z.ZodTypeAny, {
45
- status: string;
46
- diff: string;
47
- diffCached: string;
48
- lastCommitMessages: string;
49
- }, {
50
- status: string;
51
- diff: string;
52
- diffCached: string;
53
- lastCommitMessages: string;
54
- }>;
55
- changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
56
- shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
57
- systemInfo: z.ZodObject<{
58
- platform: z.ZodString;
59
- shell: z.ZodString;
60
- nodeVersion: z.ZodString;
61
- arch: z.ZodString;
62
- homedir: z.ZodString;
63
- cpus: z.ZodNumber;
64
- }, "strip", z.ZodTypeAny, {
65
- platform: string;
66
- shell: string;
67
- nodeVersion: string;
68
- arch: string;
69
- homedir: string;
70
- cpus: number;
71
- }, {
72
- platform: string;
73
- shell: string;
74
- nodeVersion: string;
75
- arch: string;
76
- homedir: string;
77
- cpus: number;
78
- }>;
79
- fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
80
- path: z.ZodString;
81
- content: z.ZodString;
82
- }, "strip", z.ZodTypeAny, {
83
- path: string;
84
- content: string;
85
- }, {
86
- path: string;
87
- content: string;
88
- }>, "many">, "many">>;
89
- }, "strip", z.ZodTypeAny, {
90
- currentWorkingDirectory: string;
91
- fileTree: import("../util/file").FileTreeNode[];
92
- fileTokenScores: Record<string, Record<string, number>>;
93
- knowledgeFiles: Record<string, string>;
94
- gitChanges: {
95
- status: string;
96
- diff: string;
97
- diffCached: string;
98
- lastCommitMessages: string;
99
- };
100
- changesSinceLastChat: Record<string, string>;
101
- shellConfigFiles: Record<string, string>;
102
- systemInfo: {
103
- platform: string;
104
- shell: string;
105
- nodeVersion: string;
106
- arch: string;
107
- homedir: string;
108
- cpus: number;
109
- };
110
- userKnowledgeFiles?: Record<string, string> | undefined;
111
- fileVersions?: {
112
- path: string;
113
- content: string;
114
- }[][] | undefined;
115
- }, {
116
- currentWorkingDirectory: string;
117
- fileTree: import("../util/file").FileTreeNode[];
118
- fileTokenScores: Record<string, Record<string, number>>;
119
- knowledgeFiles: Record<string, string>;
120
- gitChanges: {
121
- status: string;
122
- diff: string;
123
- diffCached: string;
124
- lastCommitMessages: string;
125
- };
126
- changesSinceLastChat: Record<string, string>;
127
- shellConfigFiles: Record<string, string>;
128
- systemInfo: {
129
- platform: string;
130
- shell: string;
131
- nodeVersion: string;
132
- arch: string;
133
- homedir: string;
134
- cpus: number;
135
- };
136
- userKnowledgeFiles?: Record<string, string> | undefined;
137
- fileVersions?: {
138
- path: string;
139
- content: string;
140
- }[][] | undefined;
141
- }>;
142
- messageHistory: z.ZodArray<z.ZodObject<{
143
- role: z.ZodUnion<[z.ZodLiteral<"user">, z.ZodLiteral<"assistant">]>;
144
- content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
145
- type: z.ZodLiteral<"text">;
146
- text: z.ZodString;
147
- cache_control: z.ZodOptional<z.ZodObject<{
148
- type: z.ZodLiteral<"ephemeral">;
149
- }, "strip", z.ZodTypeAny, {
150
- type: "ephemeral";
151
- }, {
152
- type: "ephemeral";
153
- }>>;
154
- }, "strip", z.ZodTypeAny, {
155
- type: "text";
156
- text: string;
157
- cache_control?: {
158
- type: "ephemeral";
159
- } | undefined;
160
- }, {
161
- type: "text";
162
- text: string;
163
- cache_control?: {
164
- type: "ephemeral";
165
- } | undefined;
166
- }>, z.ZodObject<{
167
- type: z.ZodLiteral<"tool_use">;
168
- id: z.ZodString;
169
- name: z.ZodString;
170
- input: z.ZodRecord<z.ZodString, z.ZodAny>;
171
- cache_control: z.ZodOptional<z.ZodObject<{
172
- type: z.ZodLiteral<"ephemeral">;
173
- }, "strip", z.ZodTypeAny, {
174
- type: "ephemeral";
175
- }, {
176
- type: "ephemeral";
177
- }>>;
178
- }, "strip", z.ZodTypeAny, {
179
- type: "tool_use";
180
- name: string;
181
- id: string;
182
- input: Record<string, any>;
183
- cache_control?: {
184
- type: "ephemeral";
185
- } | undefined;
186
- }, {
187
- type: "tool_use";
188
- name: string;
189
- id: string;
190
- input: Record<string, any>;
191
- cache_control?: {
192
- type: "ephemeral";
193
- } | undefined;
194
- }>, z.ZodObject<{
195
- type: z.ZodLiteral<"tool_result">;
196
- tool_use_id: z.ZodString;
197
- content: z.ZodString;
198
- cache_control: z.ZodOptional<z.ZodObject<{
199
- type: z.ZodLiteral<"ephemeral">;
200
- }, "strip", z.ZodTypeAny, {
201
- type: "ephemeral";
202
- }, {
203
- type: "ephemeral";
204
- }>>;
205
- }, "strip", z.ZodTypeAny, {
206
- type: "tool_result";
207
- content: string;
208
- tool_use_id: string;
209
- cache_control?: {
210
- type: "ephemeral";
211
- } | undefined;
212
- }, {
213
- type: "tool_result";
214
- content: string;
215
- tool_use_id: string;
216
- cache_control?: {
217
- type: "ephemeral";
218
- } | undefined;
219
- }>, z.ZodObject<{
220
- type: z.ZodLiteral<"image">;
221
- source: z.ZodObject<{
222
- type: z.ZodLiteral<"base64">;
223
- media_type: z.ZodLiteral<"image/jpeg">;
224
- data: z.ZodString;
225
- }, "strip", z.ZodTypeAny, {
226
- type: "base64";
227
- media_type: "image/jpeg";
228
- data: string;
229
- }, {
230
- type: "base64";
231
- media_type: "image/jpeg";
232
- data: string;
233
- }>;
234
- cache_control: z.ZodOptional<z.ZodObject<{
235
- type: z.ZodLiteral<"ephemeral">;
236
- }, "strip", z.ZodTypeAny, {
237
- type: "ephemeral";
238
- }, {
239
- type: "ephemeral";
240
- }>>;
241
- }, "strip", z.ZodTypeAny, {
242
- type: "image";
243
- source: {
244
- type: "base64";
245
- media_type: "image/jpeg";
246
- data: string;
247
- };
248
- cache_control?: {
249
- type: "ephemeral";
250
- } | undefined;
251
- }, {
252
- type: "image";
253
- source: {
254
- type: "base64";
255
- media_type: "image/jpeg";
256
- data: string;
257
- };
258
- cache_control?: {
259
- type: "ephemeral";
260
- } | undefined;
261
- }>]>, "many">]>;
262
- }, "strip", z.ZodTypeAny, {
263
- content: string | ({
264
- type: "text";
265
- text: string;
266
- cache_control?: {
267
- type: "ephemeral";
268
- } | undefined;
269
- } | {
270
- type: "tool_use";
271
- name: string;
272
- id: string;
273
- input: Record<string, any>;
274
- cache_control?: {
275
- type: "ephemeral";
276
- } | undefined;
277
- } | {
278
- type: "tool_result";
279
- content: string;
280
- tool_use_id: string;
281
- cache_control?: {
282
- type: "ephemeral";
283
- } | undefined;
284
- } | {
285
- type: "image";
286
- source: {
287
- type: "base64";
288
- media_type: "image/jpeg";
289
- data: string;
290
- };
291
- cache_control?: {
292
- type: "ephemeral";
293
- } | undefined;
294
- })[];
295
- role: "user" | "assistant";
296
- }, {
297
- content: string | ({
298
- type: "text";
299
- text: string;
300
- cache_control?: {
301
- type: "ephemeral";
302
- } | undefined;
303
- } | {
304
- type: "tool_use";
305
- name: string;
306
- id: string;
307
- input: Record<string, any>;
308
- cache_control?: {
309
- type: "ephemeral";
310
- } | undefined;
311
- } | {
312
- type: "tool_result";
313
- content: string;
314
- tool_use_id: string;
315
- cache_control?: {
316
- type: "ephemeral";
317
- } | undefined;
318
- } | {
319
- type: "image";
320
- source: {
321
- type: "base64";
322
- media_type: "image/jpeg";
323
- data: string;
324
- };
325
- cache_control?: {
326
- type: "ephemeral";
327
- } | undefined;
328
- })[];
329
- role: "user" | "assistant";
330
- }>, "many">;
331
- consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
332
- }, "strip", z.ZodTypeAny, {
333
- agentContext: string;
334
- fileContext: {
335
- currentWorkingDirectory: string;
336
- fileTree: import("../util/file").FileTreeNode[];
337
- fileTokenScores: Record<string, Record<string, number>>;
338
- knowledgeFiles: Record<string, string>;
339
- gitChanges: {
340
- status: string;
341
- diff: string;
342
- diffCached: string;
343
- lastCommitMessages: string;
344
- };
345
- changesSinceLastChat: Record<string, string>;
346
- shellConfigFiles: Record<string, string>;
347
- systemInfo: {
348
- platform: string;
349
- shell: string;
350
- nodeVersion: string;
351
- arch: string;
352
- homedir: string;
353
- cpus: number;
354
- };
355
- userKnowledgeFiles?: Record<string, string> | undefined;
356
- fileVersions?: {
357
- path: string;
358
- content: string;
359
- }[][] | undefined;
360
- };
361
- messageHistory: {
362
- content: string | ({
363
- type: "text";
364
- text: string;
365
- cache_control?: {
366
- type: "ephemeral";
367
- } | undefined;
368
- } | {
369
- type: "tool_use";
370
- name: string;
371
- id: string;
372
- input: Record<string, any>;
373
- cache_control?: {
374
- type: "ephemeral";
375
- } | undefined;
376
- } | {
377
- type: "tool_result";
378
- content: string;
379
- tool_use_id: string;
380
- cache_control?: {
381
- type: "ephemeral";
382
- } | undefined;
383
- } | {
384
- type: "image";
385
- source: {
386
- type: "base64";
387
- media_type: "image/jpeg";
388
- data: string;
389
- };
390
- cache_control?: {
391
- type: "ephemeral";
392
- } | undefined;
393
- })[];
394
- role: "user" | "assistant";
395
- }[];
396
- consecutiveAssistantMessages?: number | undefined;
397
- }, {
398
- agentContext: string;
399
- fileContext: {
400
- currentWorkingDirectory: string;
401
- fileTree: import("../util/file").FileTreeNode[];
402
- fileTokenScores: Record<string, Record<string, number>>;
403
- knowledgeFiles: Record<string, string>;
404
- gitChanges: {
405
- status: string;
406
- diff: string;
407
- diffCached: string;
408
- lastCommitMessages: string;
409
- };
410
- changesSinceLastChat: Record<string, string>;
411
- shellConfigFiles: Record<string, string>;
412
- systemInfo: {
413
- platform: string;
414
- shell: string;
415
- nodeVersion: string;
416
- arch: string;
417
- homedir: string;
418
- cpus: number;
419
- };
420
- userKnowledgeFiles?: Record<string, string> | undefined;
421
- fileVersions?: {
422
- path: string;
423
- content: string;
424
- }[][] | undefined;
425
- };
426
- messageHistory: {
427
- content: string | ({
428
- type: "text";
429
- text: string;
430
- cache_control?: {
431
- type: "ephemeral";
432
- } | undefined;
433
- } | {
434
- type: "tool_use";
435
- name: string;
436
- id: string;
437
- input: Record<string, any>;
438
- cache_control?: {
439
- type: "ephemeral";
440
- } | undefined;
441
- } | {
442
- type: "tool_result";
443
- content: string;
444
- tool_use_id: string;
445
- cache_control?: {
446
- type: "ephemeral";
447
- } | undefined;
448
- } | {
449
- type: "image";
450
- source: {
451
- type: "base64";
452
- media_type: "image/jpeg";
453
- data: string;
454
- };
455
- cache_control?: {
456
- type: "ephemeral";
457
- } | undefined;
458
- })[];
459
- role: "user" | "assistant";
460
- }[];
461
- consecutiveAssistantMessages?: number | undefined;
462
- }>;
463
- export type AgentState = z.infer<typeof AgentStateSchema>;
464
- export declare function getInitialAgentState(fileContext: ProjectFileContext): AgentState;
@@ -1,32 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AgentStateSchema = exports.ToolResultSchema = exports.ToolCallSchema = void 0;
4
- exports.getInitialAgentState = getInitialAgentState;
5
- const zod_1 = require("zod");
6
- const file_1 = require("../util/file");
7
- const message_1 = require("./message");
8
- exports.ToolCallSchema = zod_1.z.object({
9
- name: zod_1.z.string(),
10
- parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
11
- id: zod_1.z.string(),
12
- });
13
- exports.ToolResultSchema = zod_1.z.object({
14
- name: zod_1.z.string(),
15
- result: zod_1.z.string(),
16
- id: zod_1.z.string(),
17
- });
18
- exports.AgentStateSchema = zod_1.z.object({
19
- agentContext: zod_1.z.string(),
20
- fileContext: file_1.ProjectFileContextSchema,
21
- messageHistory: zod_1.z.array(message_1.MessageSchema),
22
- consecutiveAssistantMessages: zod_1.z.number().optional(),
23
- });
24
- function getInitialAgentState(fileContext) {
25
- return {
26
- agentContext: '',
27
- messageHistory: [],
28
- fileContext,
29
- consecutiveAssistantMessages: 0,
30
- };
31
- }
32
- //# sourceMappingURL=agent-state.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-state.js","sourceRoot":"","sources":["../../src/types/agent-state.ts"],"names":[],"mappings":";;;AA0BA,oDASC;AAnCD,6BAAuB;AAEvB,uCAA2E;AAC3E,uCAAyC;AAE5B,QAAA,cAAc,GAAG,OAAC,CAAC,MAAM,CAAC;IACrC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;IAC5C,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAA;AAEW,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;IAChB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;CACf,CAAC,CAAA;AAGW,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,WAAW,EAAE,+BAAwB;IACrC,cAAc,EAAE,OAAC,CAAC,KAAK,CAAC,uBAAa,CAAC;IACtC,4BAA4B,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;CACpD,CAAC,CAAA;AAGF,SAAgB,oBAAoB,CAClC,WAA+B;IAE/B,OAAO;QACL,YAAY,EAAE,EAAE;QAChB,cAAc,EAAE,EAAE;QAClB,WAAW;QACX,4BAA4B,EAAE,CAAC;KAChC,CAAA;AACH,CAAC"}
@@ -1,2 +0,0 @@
1
- export type GrantType = 'free' | 'referral' | 'purchase' | 'admin';
2
- export declare const GrantTypeValues: GrantType[];
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.GrantTypeValues = void 0;
4
- exports.GrantTypeValues = [
5
- 'free',
6
- 'referral',
7
- 'purchase',
8
- 'admin',
9
- ];
10
- //# sourceMappingURL=grant.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"grant.js","sourceRoot":"","sources":["../../src/types/grant.ts"],"names":[],"mappings":";;;AAEa,QAAA,eAAe,GAAgB;IAC1C,MAAM;IACN,UAAU;IACV,UAAU;IACV,OAAO;CACR,CAAA"}