codebuff 1.0.324 → 1.0.325

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 (238) hide show
  1. package/dist/checkpoints/file-manager.js +20 -12
  2. package/dist/checkpoints/file-manager.js.map +1 -1
  3. package/dist/code-map/tsconfig.tsbuildinfo +1 -1
  4. package/dist/common/actions.d.ts +58 -58
  5. package/dist/common/analytics.d.ts +1 -1
  6. package/dist/common/browser-actions.d.ts +277 -277
  7. package/dist/common/constants.js +3 -3
  8. package/dist/common/constants.js.map +1 -1
  9. package/dist/common/db/env.d.mts +4 -0
  10. package/dist/common/db/env.mjs +26 -0
  11. package/dist/common/db/env.mjs.map +1 -0
  12. package/dist/common/db/schema.d.ts +155 -0
  13. package/dist/common/db/schema.d.ts.map +1 -1
  14. package/dist/common/db/schema.js +15 -1
  15. package/dist/common/db/schema.js.map +1 -1
  16. package/dist/common/env.d.mts +13 -0
  17. package/dist/common/env.mjs +43 -0
  18. package/dist/common/env.mjs.map +1 -0
  19. package/dist/common/src/actions.d.ts +2673 -0
  20. package/dist/common/src/actions.d.ts.map +1 -0
  21. package/dist/common/src/actions.js +167 -0
  22. package/dist/common/src/actions.js.map +1 -0
  23. package/dist/common/src/analytics.d.ts +6 -0
  24. package/dist/common/src/analytics.d.ts.map +1 -0
  25. package/dist/common/src/analytics.js +60 -0
  26. package/dist/common/src/analytics.js.map +1 -0
  27. package/dist/common/src/api-keys/constants.d.ts +9 -0
  28. package/dist/common/src/api-keys/constants.d.ts.map +1 -0
  29. package/dist/common/src/api-keys/constants.js +26 -0
  30. package/dist/common/src/api-keys/constants.js.map +1 -0
  31. package/dist/common/src/api-keys/crypto.d.ts +25 -0
  32. package/dist/common/src/api-keys/crypto.d.ts.map +1 -0
  33. package/dist/common/src/api-keys/crypto.js +186 -0
  34. package/dist/common/src/api-keys/crypto.js.map +1 -0
  35. package/dist/common/src/browser-actions.d.ts +4416 -0
  36. package/dist/common/src/browser-actions.d.ts.map +1 -0
  37. package/dist/common/src/browser-actions.js +343 -0
  38. package/dist/common/src/browser-actions.js.map +1 -0
  39. package/dist/common/src/constants/analytics-events.d.ts +28 -0
  40. package/dist/common/src/constants/analytics-events.d.ts.map +1 -0
  41. package/dist/common/src/constants/analytics-events.js +36 -0
  42. package/dist/common/src/constants/analytics-events.js.map +1 -0
  43. package/dist/common/src/constants/grant-priorities.d.ts +3 -0
  44. package/dist/common/src/constants/grant-priorities.d.ts.map +1 -0
  45. package/dist/common/src/constants/grant-priorities.js +11 -0
  46. package/dist/common/src/constants/grant-priorities.js.map +1 -0
  47. package/dist/common/src/constants/tools.d.ts +20 -0
  48. package/dist/common/src/constants/tools.d.ts.map +1 -0
  49. package/dist/common/src/constants/tools.js +47 -0
  50. package/dist/common/src/constants/tools.js.map +1 -0
  51. package/dist/common/src/constants.d.ts +152 -0
  52. package/dist/common/src/constants.d.ts.map +1 -0
  53. package/dist/common/src/constants.js +222 -0
  54. package/dist/common/src/constants.js.map +1 -0
  55. package/dist/common/src/db/drizzle.config.d.ts +3 -0
  56. package/dist/common/src/db/drizzle.config.d.ts.map +1 -0
  57. package/dist/common/src/db/drizzle.config.js +17 -0
  58. package/dist/common/src/db/drizzle.config.js.map +1 -0
  59. package/dist/common/src/db/index.d.ts +7 -0
  60. package/dist/common/src/db/index.d.ts.map +1 -0
  61. package/dist/common/src/db/index.js +35 -0
  62. package/dist/common/src/db/index.js.map +1 -0
  63. package/dist/common/src/db/schema.d.ts +2289 -0
  64. package/dist/common/src/db/schema.d.ts.map +1 -0
  65. package/dist/common/src/db/schema.js +296 -0
  66. package/dist/common/src/db/schema.js.map +1 -0
  67. package/dist/common/src/db/transaction.d.ts +13 -0
  68. package/dist/common/src/db/transaction.d.ts.map +1 -0
  69. package/dist/common/src/db/transaction.js +36 -0
  70. package/dist/common/src/db/transaction.js.map +1 -0
  71. package/dist/common/src/json-config/__tests__/constants.test.d.ts +2 -0
  72. package/dist/common/src/json-config/__tests__/constants.test.d.ts.map +1 -0
  73. package/dist/common/src/json-config/__tests__/constants.test.js +273 -0
  74. package/dist/common/src/json-config/__tests__/constants.test.js.map +1 -0
  75. package/dist/common/src/json-config/__tests__/stringify-schema.test.d.ts +2 -0
  76. package/dist/common/src/json-config/__tests__/stringify-schema.test.d.ts.map +1 -0
  77. package/dist/common/src/json-config/__tests__/stringify-schema.test.js +66 -0
  78. package/dist/common/src/json-config/__tests__/stringify-schema.test.js.map +1 -0
  79. package/dist/common/src/json-config/constants.d.ts +138 -0
  80. package/dist/common/src/json-config/constants.d.ts.map +1 -0
  81. package/dist/common/src/json-config/constants.js +78 -0
  82. package/dist/common/src/json-config/constants.js.map +1 -0
  83. package/dist/common/src/json-config/stringify-schema.d.ts +10 -0
  84. package/dist/common/src/json-config/stringify-schema.d.ts.map +1 -0
  85. package/dist/common/src/json-config/stringify-schema.js +131 -0
  86. package/dist/common/src/json-config/stringify-schema.js.map +1 -0
  87. package/dist/common/src/project-file-tree.d.ts +12 -0
  88. package/dist/common/src/project-file-tree.d.ts.map +1 -0
  89. package/dist/common/src/project-file-tree.js +212 -0
  90. package/dist/common/src/project-file-tree.js.map +1 -0
  91. package/dist/common/src/types/agent-state.d.ts +227 -0
  92. package/dist/common/src/types/agent-state.d.ts.map +1 -0
  93. package/dist/common/src/types/agent-state.js +34 -0
  94. package/dist/common/src/types/agent-state.js.map +1 -0
  95. package/dist/common/src/types/grant.d.ts +3 -0
  96. package/dist/common/src/types/grant.d.ts.map +1 -0
  97. package/dist/common/src/types/grant.js +11 -0
  98. package/dist/common/src/types/grant.js.map +1 -0
  99. package/dist/common/src/types/message.d.ts +320 -0
  100. package/dist/common/src/types/message.d.ts.map +1 -0
  101. package/dist/common/src/types/message.js +60 -0
  102. package/dist/common/src/types/message.js.map +1 -0
  103. package/dist/common/src/types/organization.d.ts +106 -0
  104. package/dist/common/src/types/organization.d.ts.map +1 -0
  105. package/dist/common/src/types/organization.js +3 -0
  106. package/dist/common/src/types/organization.js.map +1 -0
  107. package/dist/common/src/types/referral.d.ts +3 -0
  108. package/dist/common/src/types/referral.d.ts.map +1 -0
  109. package/dist/common/src/types/referral.js +5 -0
  110. package/dist/common/src/types/referral.js.map +1 -0
  111. package/dist/common/src/types/tools.d.ts +6 -0
  112. package/dist/common/src/types/tools.d.ts.map +1 -0
  113. package/dist/common/src/types/tools.js +3 -0
  114. package/dist/common/src/types/tools.js.map +1 -0
  115. package/dist/common/src/types/usage.d.ts +41 -0
  116. package/dist/common/src/types/usage.d.ts.map +1 -0
  117. package/dist/common/src/types/usage.js +16 -0
  118. package/dist/common/src/types/usage.js.map +1 -0
  119. package/dist/common/src/util/__tests__/messages.test.d.ts +2 -0
  120. package/dist/common/src/util/__tests__/messages.test.d.ts.map +1 -0
  121. package/dist/common/src/util/__tests__/messages.test.js +70 -0
  122. package/dist/common/src/util/__tests__/messages.test.js.map +1 -0
  123. package/dist/common/src/util/__tests__/saxy.test.d.ts +2 -0
  124. package/dist/common/src/util/__tests__/saxy.test.d.ts.map +1 -0
  125. package/dist/common/src/util/__tests__/saxy.test.js +906 -0
  126. package/dist/common/src/util/__tests__/saxy.test.js.map +1 -0
  127. package/dist/common/src/util/__tests__/string.test.d.ts +2 -0
  128. package/dist/common/src/util/__tests__/string.test.d.ts.map +1 -0
  129. package/dist/common/src/util/__tests__/string.test.js +82 -0
  130. package/dist/common/src/util/__tests__/string.test.js.map +1 -0
  131. package/dist/common/src/util/array.d.ts +7 -0
  132. package/dist/common/src/util/array.d.ts.map +1 -0
  133. package/dist/common/src/util/array.js +32 -0
  134. package/dist/common/src/util/array.js.map +1 -0
  135. package/dist/common/src/util/changes.d.ts +9 -0
  136. package/dist/common/src/util/changes.d.ts.map +1 -0
  137. package/dist/common/src/util/changes.js +87 -0
  138. package/dist/common/src/util/changes.js.map +1 -0
  139. package/dist/common/src/util/credentials.d.ts +26 -0
  140. package/dist/common/src/util/credentials.d.ts.map +1 -0
  141. package/dist/common/src/util/credentials.js +24 -0
  142. package/dist/common/src/util/credentials.js.map +1 -0
  143. package/dist/common/src/util/currency.d.ts +15 -0
  144. package/dist/common/src/util/currency.d.ts.map +1 -0
  145. package/dist/common/src/util/currency.js +23 -0
  146. package/dist/common/src/util/currency.js.map +1 -0
  147. package/dist/common/src/util/dates.d.ts +11 -0
  148. package/dist/common/src/util/dates.d.ts.map +1 -0
  149. package/dist/common/src/util/dates.js +22 -0
  150. package/dist/common/src/util/dates.js.map +1 -0
  151. package/dist/common/src/util/file.d.ts +163 -0
  152. package/dist/common/src/util/file.d.ts.map +1 -0
  153. package/dist/common/src/util/file.js +192 -0
  154. package/dist/common/src/util/file.js.map +1 -0
  155. package/dist/common/src/util/git.d.ts +7 -0
  156. package/dist/common/src/util/git.d.ts.map +1 -0
  157. package/dist/common/src/util/git.js +81 -0
  158. package/dist/common/src/util/git.js.map +1 -0
  159. package/dist/common/src/util/logger.d.ts +9 -0
  160. package/dist/common/src/util/logger.d.ts.map +1 -0
  161. package/dist/common/src/util/logger.js +52 -0
  162. package/dist/common/src/util/logger.js.map +1 -0
  163. package/dist/common/src/util/lru-cache.d.ts +31 -0
  164. package/dist/common/src/util/lru-cache.d.ts.map +1 -0
  165. package/dist/common/src/util/lru-cache.js +68 -0
  166. package/dist/common/src/util/lru-cache.js.map +1 -0
  167. package/dist/common/src/util/messages.d.ts +12 -0
  168. package/dist/common/src/util/messages.d.ts.map +1 -0
  169. package/dist/common/src/util/messages.js +81 -0
  170. package/dist/common/src/util/messages.js.map +1 -0
  171. package/dist/common/src/util/min-heap.d.ts +16 -0
  172. package/dist/common/src/util/min-heap.d.ts.map +1 -0
  173. package/dist/common/src/util/min-heap.js +73 -0
  174. package/dist/common/src/util/min-heap.js.map +1 -0
  175. package/dist/common/src/util/object.d.ts +19 -0
  176. package/dist/common/src/util/object.d.ts.map +1 -0
  177. package/dist/common/src/util/object.js +91 -0
  178. package/dist/common/src/util/object.js.map +1 -0
  179. package/dist/common/src/util/patch.d.ts +2 -0
  180. package/dist/common/src/util/patch.d.ts.map +1 -0
  181. package/dist/common/src/util/patch.js +215 -0
  182. package/dist/common/src/util/patch.js.map +1 -0
  183. package/dist/common/src/util/promise.d.ts +17 -0
  184. package/dist/common/src/util/promise.d.ts.map +1 -0
  185. package/dist/common/src/util/promise.js +51 -0
  186. package/dist/common/src/util/promise.js.map +1 -0
  187. package/dist/common/src/util/random.d.ts +2 -0
  188. package/dist/common/src/util/random.d.ts.map +1 -0
  189. package/dist/common/src/util/random.js +17 -0
  190. package/dist/common/src/util/random.js.map +1 -0
  191. package/dist/common/src/util/referral.d.ts +2 -0
  192. package/dist/common/src/util/referral.d.ts.map +1 -0
  193. package/dist/common/src/util/referral.js +6 -0
  194. package/dist/common/src/util/referral.js.map +1 -0
  195. package/dist/common/src/util/saxy.d.ts +179 -0
  196. package/dist/common/src/util/saxy.d.ts.map +1 -0
  197. package/dist/common/src/util/saxy.js +548 -0
  198. package/dist/common/src/util/saxy.js.map +1 -0
  199. package/dist/common/src/util/string.d.ts +80 -0
  200. package/dist/common/src/util/string.d.ts.map +1 -0
  201. package/dist/common/src/util/string.js +264 -0
  202. package/dist/common/src/util/string.js.map +1 -0
  203. package/dist/common/src/util/stripe.d.ts +4 -0
  204. package/dist/common/src/util/stripe.d.ts.map +1 -0
  205. package/dist/common/src/util/stripe.js +22 -0
  206. package/dist/common/src/util/stripe.js.map +1 -0
  207. package/dist/common/src/util/sync-failure.d.ts +2 -0
  208. package/dist/common/src/util/sync-failure.d.ts.map +1 -0
  209. package/dist/{code-map/scripts/tree-sitter-test.js → common/src/util/sync-failure.js} +28 -25
  210. package/dist/common/src/util/sync-failure.js.map +1 -0
  211. package/dist/common/src/websockets/websocket-client.d.ts +43 -0
  212. package/dist/common/src/websockets/websocket-client.d.ts.map +1 -0
  213. package/dist/common/src/websockets/websocket-client.js +216 -0
  214. package/dist/common/src/websockets/websocket-client.js.map +1 -0
  215. package/dist/common/src/websockets/websocket-schema.d.ts +5159 -0
  216. package/dist/common/src/websockets/websocket-schema.d.ts.map +1 -0
  217. package/dist/common/src/websockets/websocket-schema.js +55 -0
  218. package/dist/common/src/websockets/websocket-schema.js.map +1 -0
  219. package/dist/common/tsconfig.tsbuildinfo +1 -0
  220. package/dist/common/types/message.d.ts +16 -16
  221. package/dist/common/websockets/websocket-schema.d.ts +122 -122
  222. package/dist/index.js +5 -5
  223. package/package.json +1 -1
  224. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts +0 -12
  225. package/dist/code-map/__mocks__/tree-sitter-typescript.d.ts.map +0 -1
  226. package/dist/code-map/__mocks__/tree-sitter-typescript.js +0 -14
  227. package/dist/code-map/__mocks__/tree-sitter-typescript.js.map +0 -1
  228. package/dist/code-map/jest.config.d.ts +0 -4
  229. package/dist/code-map/jest.config.d.ts.map +0 -1
  230. package/dist/code-map/jest.config.js +0 -18
  231. package/dist/code-map/jest.config.js.map +0 -1
  232. package/dist/code-map/scripts/tree-sitter-test.cjs +0 -27
  233. package/dist/code-map/scripts/tree-sitter-test.cjs.map +0 -1
  234. package/dist/code-map/scripts/tree-sitter-test.d.cts +0 -2
  235. package/dist/code-map/scripts/tree-sitter-test.d.cts.map +0 -1
  236. package/dist/code-map/scripts/tree-sitter-test.d.ts +0 -2
  237. package/dist/code-map/scripts/tree-sitter-test.d.ts.map +0 -1
  238. package/dist/code-map/scripts/tree-sitter-test.js.map +0 -1
@@ -0,0 +1,2673 @@
1
+ import { z } from 'zod';
2
+ export declare const FileChangeSchema: z.ZodObject<{
3
+ type: z.ZodEnum<["patch", "file"]>;
4
+ path: z.ZodString;
5
+ content: z.ZodString;
6
+ }, "strip", z.ZodTypeAny, {
7
+ path: string;
8
+ type: "file" | "patch";
9
+ content: string;
10
+ }, {
11
+ path: string;
12
+ type: "file" | "patch";
13
+ content: string;
14
+ }>;
15
+ export type FileChange = z.infer<typeof FileChangeSchema>;
16
+ export declare const CHANGES: z.ZodArray<z.ZodObject<{
17
+ type: z.ZodEnum<["patch", "file"]>;
18
+ path: z.ZodString;
19
+ content: z.ZodString;
20
+ }, "strip", z.ZodTypeAny, {
21
+ path: string;
22
+ type: "file" | "patch";
23
+ content: string;
24
+ }, {
25
+ path: string;
26
+ type: "file" | "patch";
27
+ content: string;
28
+ }>, "many">;
29
+ export type FileChanges = z.infer<typeof CHANGES>;
30
+ export declare const ToolCallSchema: z.ZodObject<{
31
+ name: z.ZodString;
32
+ id: z.ZodString;
33
+ input: z.ZodRecord<z.ZodString, z.ZodAny>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ name: string;
36
+ id: string;
37
+ input: Record<string, any>;
38
+ }, {
39
+ name: string;
40
+ id: string;
41
+ input: Record<string, any>;
42
+ }>;
43
+ export type ToolCall = z.infer<typeof ToolCallSchema>;
44
+ export declare const CLIENT_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
45
+ type: z.ZodLiteral<"prompt">;
46
+ promptId: z.ZodString;
47
+ prompt: z.ZodUnion<[z.ZodString, z.ZodUndefined]>;
48
+ fingerprintId: z.ZodString;
49
+ authToken: z.ZodOptional<z.ZodString>;
50
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
51
+ agentState: z.ZodObject<{
52
+ agentContext: z.ZodString;
53
+ fileContext: z.ZodObject<{
54
+ currentWorkingDirectory: z.ZodString;
55
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
56
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
57
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
58
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
59
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
60
+ gitChanges: z.ZodObject<{
61
+ status: z.ZodString;
62
+ diff: z.ZodString;
63
+ diffCached: z.ZodString;
64
+ lastCommitMessages: z.ZodString;
65
+ }, "strip", z.ZodTypeAny, {
66
+ status: string;
67
+ diff: string;
68
+ diffCached: string;
69
+ lastCommitMessages: string;
70
+ }, {
71
+ status: string;
72
+ diff: string;
73
+ diffCached: string;
74
+ lastCommitMessages: string;
75
+ }>;
76
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
77
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
78
+ systemInfo: z.ZodObject<{
79
+ platform: z.ZodString;
80
+ shell: z.ZodString;
81
+ nodeVersion: z.ZodString;
82
+ arch: z.ZodString;
83
+ homedir: z.ZodString;
84
+ cpus: z.ZodNumber;
85
+ }, "strip", z.ZodTypeAny, {
86
+ platform: string;
87
+ shell: string;
88
+ nodeVersion: string;
89
+ arch: string;
90
+ homedir: string;
91
+ cpus: number;
92
+ }, {
93
+ platform: string;
94
+ shell: string;
95
+ nodeVersion: string;
96
+ arch: string;
97
+ homedir: string;
98
+ cpus: number;
99
+ }>;
100
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
101
+ path: z.ZodString;
102
+ content: z.ZodString;
103
+ }, "strip", z.ZodTypeAny, {
104
+ path: string;
105
+ content: string;
106
+ }, {
107
+ path: string;
108
+ content: string;
109
+ }>, "many">, "many">>;
110
+ }, "strip", z.ZodTypeAny, {
111
+ currentWorkingDirectory: string;
112
+ fileTree: import("./util/file").FileTreeNode[];
113
+ fileTokenScores: Record<string, Record<string, number>>;
114
+ knowledgeFiles: Record<string, string>;
115
+ gitChanges: {
116
+ status: string;
117
+ diff: string;
118
+ diffCached: string;
119
+ lastCommitMessages: string;
120
+ };
121
+ changesSinceLastChat: Record<string, string>;
122
+ shellConfigFiles: Record<string, string>;
123
+ systemInfo: {
124
+ platform: string;
125
+ shell: string;
126
+ nodeVersion: string;
127
+ arch: string;
128
+ homedir: string;
129
+ cpus: number;
130
+ };
131
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
132
+ userKnowledgeFiles?: Record<string, string> | undefined;
133
+ fileVersions?: {
134
+ path: string;
135
+ content: string;
136
+ }[][] | undefined;
137
+ }, {
138
+ currentWorkingDirectory: string;
139
+ fileTree: import("./util/file").FileTreeNode[];
140
+ fileTokenScores: Record<string, Record<string, number>>;
141
+ knowledgeFiles: Record<string, string>;
142
+ gitChanges: {
143
+ status: string;
144
+ diff: string;
145
+ diffCached: string;
146
+ lastCommitMessages: string;
147
+ };
148
+ changesSinceLastChat: Record<string, string>;
149
+ shellConfigFiles: Record<string, string>;
150
+ systemInfo: {
151
+ platform: string;
152
+ shell: string;
153
+ nodeVersion: string;
154
+ arch: string;
155
+ homedir: string;
156
+ cpus: number;
157
+ };
158
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
159
+ userKnowledgeFiles?: Record<string, string> | undefined;
160
+ fileVersions?: {
161
+ path: string;
162
+ content: string;
163
+ }[][] | undefined;
164
+ }>;
165
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
166
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
167
+ }, "strip", z.ZodTypeAny, {
168
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
169
+ }, {
170
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
171
+ }>>, "many">;
172
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
173
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
174
+ }, "strip", z.ZodTypeAny, {
175
+ agentContext: string;
176
+ fileContext: {
177
+ currentWorkingDirectory: string;
178
+ fileTree: import("./util/file").FileTreeNode[];
179
+ fileTokenScores: Record<string, Record<string, number>>;
180
+ knowledgeFiles: Record<string, string>;
181
+ gitChanges: {
182
+ status: string;
183
+ diff: string;
184
+ diffCached: string;
185
+ lastCommitMessages: string;
186
+ };
187
+ changesSinceLastChat: Record<string, string>;
188
+ shellConfigFiles: Record<string, string>;
189
+ systemInfo: {
190
+ platform: string;
191
+ shell: string;
192
+ nodeVersion: string;
193
+ arch: string;
194
+ homedir: string;
195
+ cpus: number;
196
+ };
197
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
198
+ userKnowledgeFiles?: Record<string, string> | undefined;
199
+ fileVersions?: {
200
+ path: string;
201
+ content: string;
202
+ }[][] | undefined;
203
+ };
204
+ messageHistory: (import("ai").CoreMessage & {
205
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
206
+ })[];
207
+ consecutiveAssistantMessages?: number | undefined;
208
+ agentStepsRemaining?: number | undefined;
209
+ }, {
210
+ agentContext: string;
211
+ fileContext: {
212
+ currentWorkingDirectory: string;
213
+ fileTree: import("./util/file").FileTreeNode[];
214
+ fileTokenScores: Record<string, Record<string, number>>;
215
+ knowledgeFiles: Record<string, string>;
216
+ gitChanges: {
217
+ status: string;
218
+ diff: string;
219
+ diffCached: string;
220
+ lastCommitMessages: string;
221
+ };
222
+ changesSinceLastChat: Record<string, string>;
223
+ shellConfigFiles: Record<string, string>;
224
+ systemInfo: {
225
+ platform: string;
226
+ shell: string;
227
+ nodeVersion: string;
228
+ arch: string;
229
+ homedir: string;
230
+ cpus: number;
231
+ };
232
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
233
+ userKnowledgeFiles?: Record<string, string> | undefined;
234
+ fileVersions?: {
235
+ path: string;
236
+ content: string;
237
+ }[][] | undefined;
238
+ };
239
+ messageHistory: (import("ai").CoreMessage & {
240
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
241
+ })[];
242
+ consecutiveAssistantMessages?: number | undefined;
243
+ agentStepsRemaining?: number | undefined;
244
+ }>;
245
+ toolResults: z.ZodArray<z.ZodObject<{
246
+ name: z.ZodString;
247
+ result: z.ZodString;
248
+ id: z.ZodString;
249
+ }, "strip", z.ZodTypeAny, {
250
+ name: string;
251
+ id: string;
252
+ result: string;
253
+ }, {
254
+ name: string;
255
+ id: string;
256
+ result: string;
257
+ }>, "many">;
258
+ model: z.ZodOptional<z.ZodString>;
259
+ cwd: z.ZodOptional<z.ZodString>;
260
+ repoUrl: z.ZodOptional<z.ZodString>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ type: "prompt";
263
+ promptId: string;
264
+ fingerprintId: string;
265
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
266
+ agentState: {
267
+ agentContext: string;
268
+ fileContext: {
269
+ currentWorkingDirectory: string;
270
+ fileTree: import("./util/file").FileTreeNode[];
271
+ fileTokenScores: Record<string, Record<string, number>>;
272
+ knowledgeFiles: Record<string, string>;
273
+ gitChanges: {
274
+ status: string;
275
+ diff: string;
276
+ diffCached: string;
277
+ lastCommitMessages: string;
278
+ };
279
+ changesSinceLastChat: Record<string, string>;
280
+ shellConfigFiles: Record<string, string>;
281
+ systemInfo: {
282
+ platform: string;
283
+ shell: string;
284
+ nodeVersion: string;
285
+ arch: string;
286
+ homedir: string;
287
+ cpus: number;
288
+ };
289
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
290
+ userKnowledgeFiles?: Record<string, string> | undefined;
291
+ fileVersions?: {
292
+ path: string;
293
+ content: string;
294
+ }[][] | undefined;
295
+ };
296
+ messageHistory: (import("ai").CoreMessage & {
297
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
298
+ })[];
299
+ consecutiveAssistantMessages?: number | undefined;
300
+ agentStepsRemaining?: number | undefined;
301
+ };
302
+ toolResults: {
303
+ name: string;
304
+ id: string;
305
+ result: string;
306
+ }[];
307
+ prompt?: string | undefined;
308
+ authToken?: string | undefined;
309
+ model?: string | undefined;
310
+ cwd?: string | undefined;
311
+ repoUrl?: string | undefined;
312
+ }, {
313
+ type: "prompt";
314
+ promptId: string;
315
+ fingerprintId: string;
316
+ agentState: {
317
+ agentContext: string;
318
+ fileContext: {
319
+ currentWorkingDirectory: string;
320
+ fileTree: import("./util/file").FileTreeNode[];
321
+ fileTokenScores: Record<string, Record<string, number>>;
322
+ knowledgeFiles: Record<string, string>;
323
+ gitChanges: {
324
+ status: string;
325
+ diff: string;
326
+ diffCached: string;
327
+ lastCommitMessages: string;
328
+ };
329
+ changesSinceLastChat: Record<string, string>;
330
+ shellConfigFiles: Record<string, string>;
331
+ systemInfo: {
332
+ platform: string;
333
+ shell: string;
334
+ nodeVersion: string;
335
+ arch: string;
336
+ homedir: string;
337
+ cpus: number;
338
+ };
339
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
340
+ userKnowledgeFiles?: Record<string, string> | undefined;
341
+ fileVersions?: {
342
+ path: string;
343
+ content: string;
344
+ }[][] | undefined;
345
+ };
346
+ messageHistory: (import("ai").CoreMessage & {
347
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
348
+ })[];
349
+ consecutiveAssistantMessages?: number | undefined;
350
+ agentStepsRemaining?: number | undefined;
351
+ };
352
+ toolResults: {
353
+ name: string;
354
+ id: string;
355
+ result: string;
356
+ }[];
357
+ prompt?: string | undefined;
358
+ authToken?: string | undefined;
359
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
360
+ model?: string | undefined;
361
+ cwd?: string | undefined;
362
+ repoUrl?: string | undefined;
363
+ }>, z.ZodObject<{
364
+ type: z.ZodLiteral<"manager-prompt">;
365
+ promptId: z.ZodString;
366
+ prompt: z.ZodOptional<z.ZodString>;
367
+ agentState: z.ZodObject<{
368
+ agentContext: z.ZodString;
369
+ fileContext: z.ZodObject<{
370
+ currentWorkingDirectory: z.ZodString;
371
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
372
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
373
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
374
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
375
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
376
+ gitChanges: z.ZodObject<{
377
+ status: z.ZodString;
378
+ diff: z.ZodString;
379
+ diffCached: z.ZodString;
380
+ lastCommitMessages: z.ZodString;
381
+ }, "strip", z.ZodTypeAny, {
382
+ status: string;
383
+ diff: string;
384
+ diffCached: string;
385
+ lastCommitMessages: string;
386
+ }, {
387
+ status: string;
388
+ diff: string;
389
+ diffCached: string;
390
+ lastCommitMessages: string;
391
+ }>;
392
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
393
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
394
+ systemInfo: z.ZodObject<{
395
+ platform: z.ZodString;
396
+ shell: z.ZodString;
397
+ nodeVersion: z.ZodString;
398
+ arch: z.ZodString;
399
+ homedir: z.ZodString;
400
+ cpus: z.ZodNumber;
401
+ }, "strip", z.ZodTypeAny, {
402
+ platform: string;
403
+ shell: string;
404
+ nodeVersion: string;
405
+ arch: string;
406
+ homedir: string;
407
+ cpus: number;
408
+ }, {
409
+ platform: string;
410
+ shell: string;
411
+ nodeVersion: string;
412
+ arch: string;
413
+ homedir: string;
414
+ cpus: number;
415
+ }>;
416
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
417
+ path: z.ZodString;
418
+ content: z.ZodString;
419
+ }, "strip", z.ZodTypeAny, {
420
+ path: string;
421
+ content: string;
422
+ }, {
423
+ path: string;
424
+ content: string;
425
+ }>, "many">, "many">>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ currentWorkingDirectory: string;
428
+ fileTree: import("./util/file").FileTreeNode[];
429
+ fileTokenScores: Record<string, Record<string, number>>;
430
+ knowledgeFiles: Record<string, string>;
431
+ gitChanges: {
432
+ status: string;
433
+ diff: string;
434
+ diffCached: string;
435
+ lastCommitMessages: string;
436
+ };
437
+ changesSinceLastChat: Record<string, string>;
438
+ shellConfigFiles: Record<string, string>;
439
+ systemInfo: {
440
+ platform: string;
441
+ shell: string;
442
+ nodeVersion: string;
443
+ arch: string;
444
+ homedir: string;
445
+ cpus: number;
446
+ };
447
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
448
+ userKnowledgeFiles?: Record<string, string> | undefined;
449
+ fileVersions?: {
450
+ path: string;
451
+ content: string;
452
+ }[][] | undefined;
453
+ }, {
454
+ currentWorkingDirectory: string;
455
+ fileTree: import("./util/file").FileTreeNode[];
456
+ fileTokenScores: Record<string, Record<string, number>>;
457
+ knowledgeFiles: Record<string, string>;
458
+ gitChanges: {
459
+ status: string;
460
+ diff: string;
461
+ diffCached: string;
462
+ lastCommitMessages: string;
463
+ };
464
+ changesSinceLastChat: Record<string, string>;
465
+ shellConfigFiles: Record<string, string>;
466
+ systemInfo: {
467
+ platform: string;
468
+ shell: string;
469
+ nodeVersion: string;
470
+ arch: string;
471
+ homedir: string;
472
+ cpus: number;
473
+ };
474
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
475
+ userKnowledgeFiles?: Record<string, string> | undefined;
476
+ fileVersions?: {
477
+ path: string;
478
+ content: string;
479
+ }[][] | undefined;
480
+ }>;
481
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
482
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
483
+ }, "strip", z.ZodTypeAny, {
484
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
485
+ }, {
486
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
487
+ }>>, "many">;
488
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
489
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
490
+ }, "strip", z.ZodTypeAny, {
491
+ agentContext: string;
492
+ fileContext: {
493
+ currentWorkingDirectory: string;
494
+ fileTree: import("./util/file").FileTreeNode[];
495
+ fileTokenScores: Record<string, Record<string, number>>;
496
+ knowledgeFiles: Record<string, string>;
497
+ gitChanges: {
498
+ status: string;
499
+ diff: string;
500
+ diffCached: string;
501
+ lastCommitMessages: string;
502
+ };
503
+ changesSinceLastChat: Record<string, string>;
504
+ shellConfigFiles: Record<string, string>;
505
+ systemInfo: {
506
+ platform: string;
507
+ shell: string;
508
+ nodeVersion: string;
509
+ arch: string;
510
+ homedir: string;
511
+ cpus: number;
512
+ };
513
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
514
+ userKnowledgeFiles?: Record<string, string> | undefined;
515
+ fileVersions?: {
516
+ path: string;
517
+ content: string;
518
+ }[][] | undefined;
519
+ };
520
+ messageHistory: (import("ai").CoreMessage & {
521
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
522
+ })[];
523
+ consecutiveAssistantMessages?: number | undefined;
524
+ agentStepsRemaining?: number | undefined;
525
+ }, {
526
+ agentContext: string;
527
+ fileContext: {
528
+ currentWorkingDirectory: string;
529
+ fileTree: import("./util/file").FileTreeNode[];
530
+ fileTokenScores: Record<string, Record<string, number>>;
531
+ knowledgeFiles: Record<string, string>;
532
+ gitChanges: {
533
+ status: string;
534
+ diff: string;
535
+ diffCached: string;
536
+ lastCommitMessages: string;
537
+ };
538
+ changesSinceLastChat: Record<string, string>;
539
+ shellConfigFiles: Record<string, string>;
540
+ systemInfo: {
541
+ platform: string;
542
+ shell: string;
543
+ nodeVersion: string;
544
+ arch: string;
545
+ homedir: string;
546
+ cpus: number;
547
+ };
548
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
549
+ userKnowledgeFiles?: Record<string, string> | undefined;
550
+ fileVersions?: {
551
+ path: string;
552
+ content: string;
553
+ }[][] | undefined;
554
+ };
555
+ messageHistory: (import("ai").CoreMessage & {
556
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
557
+ })[];
558
+ consecutiveAssistantMessages?: number | undefined;
559
+ agentStepsRemaining?: number | undefined;
560
+ }>;
561
+ toolResults: z.ZodArray<z.ZodObject<{
562
+ name: z.ZodString;
563
+ result: z.ZodString;
564
+ id: z.ZodString;
565
+ }, "strip", z.ZodTypeAny, {
566
+ name: string;
567
+ id: string;
568
+ result: string;
569
+ }, {
570
+ name: string;
571
+ id: string;
572
+ result: string;
573
+ }>, "many">;
574
+ fingerprintId: z.ZodString;
575
+ authToken: z.ZodOptional<z.ZodString>;
576
+ costMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["lite", "normal", "max", "experimental", "ask"]>>>;
577
+ model: z.ZodOptional<z.ZodString>;
578
+ cwd: z.ZodOptional<z.ZodString>;
579
+ repoName: z.ZodOptional<z.ZodString>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ type: "manager-prompt";
582
+ promptId: string;
583
+ fingerprintId: string;
584
+ costMode: "lite" | "normal" | "max" | "experimental" | "ask";
585
+ agentState: {
586
+ agentContext: string;
587
+ fileContext: {
588
+ currentWorkingDirectory: string;
589
+ fileTree: import("./util/file").FileTreeNode[];
590
+ fileTokenScores: Record<string, Record<string, number>>;
591
+ knowledgeFiles: Record<string, string>;
592
+ gitChanges: {
593
+ status: string;
594
+ diff: string;
595
+ diffCached: string;
596
+ lastCommitMessages: string;
597
+ };
598
+ changesSinceLastChat: Record<string, string>;
599
+ shellConfigFiles: Record<string, string>;
600
+ systemInfo: {
601
+ platform: string;
602
+ shell: string;
603
+ nodeVersion: string;
604
+ arch: string;
605
+ homedir: string;
606
+ cpus: number;
607
+ };
608
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
609
+ userKnowledgeFiles?: Record<string, string> | undefined;
610
+ fileVersions?: {
611
+ path: string;
612
+ content: string;
613
+ }[][] | undefined;
614
+ };
615
+ messageHistory: (import("ai").CoreMessage & {
616
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
617
+ })[];
618
+ consecutiveAssistantMessages?: number | undefined;
619
+ agentStepsRemaining?: number | undefined;
620
+ };
621
+ toolResults: {
622
+ name: string;
623
+ id: string;
624
+ result: string;
625
+ }[];
626
+ prompt?: string | undefined;
627
+ authToken?: string | undefined;
628
+ model?: string | undefined;
629
+ cwd?: string | undefined;
630
+ repoName?: string | undefined;
631
+ }, {
632
+ type: "manager-prompt";
633
+ promptId: string;
634
+ fingerprintId: string;
635
+ agentState: {
636
+ agentContext: string;
637
+ fileContext: {
638
+ currentWorkingDirectory: string;
639
+ fileTree: import("./util/file").FileTreeNode[];
640
+ fileTokenScores: Record<string, Record<string, number>>;
641
+ knowledgeFiles: Record<string, string>;
642
+ gitChanges: {
643
+ status: string;
644
+ diff: string;
645
+ diffCached: string;
646
+ lastCommitMessages: string;
647
+ };
648
+ changesSinceLastChat: Record<string, string>;
649
+ shellConfigFiles: Record<string, string>;
650
+ systemInfo: {
651
+ platform: string;
652
+ shell: string;
653
+ nodeVersion: string;
654
+ arch: string;
655
+ homedir: string;
656
+ cpus: number;
657
+ };
658
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
659
+ userKnowledgeFiles?: Record<string, string> | undefined;
660
+ fileVersions?: {
661
+ path: string;
662
+ content: string;
663
+ }[][] | undefined;
664
+ };
665
+ messageHistory: (import("ai").CoreMessage & {
666
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
667
+ })[];
668
+ consecutiveAssistantMessages?: number | undefined;
669
+ agentStepsRemaining?: number | undefined;
670
+ };
671
+ toolResults: {
672
+ name: string;
673
+ id: string;
674
+ result: string;
675
+ }[];
676
+ prompt?: string | undefined;
677
+ authToken?: string | undefined;
678
+ costMode?: "lite" | "normal" | "max" | "experimental" | "ask" | undefined;
679
+ model?: string | undefined;
680
+ cwd?: string | undefined;
681
+ repoName?: string | undefined;
682
+ }>, z.ZodObject<{
683
+ type: z.ZodLiteral<"read-files-response">;
684
+ files: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNull]>>;
685
+ requestId: z.ZodOptional<z.ZodString>;
686
+ }, "strip", z.ZodTypeAny, {
687
+ type: "read-files-response";
688
+ files: Record<string, string | null>;
689
+ requestId?: string | undefined;
690
+ }, {
691
+ type: "read-files-response";
692
+ files: Record<string, string | null>;
693
+ requestId?: string | undefined;
694
+ }>, z.ZodObject<{
695
+ type: z.ZodLiteral<"init">;
696
+ fingerprintId: z.ZodString;
697
+ authToken: z.ZodOptional<z.ZodString>;
698
+ fileContext: z.ZodObject<{
699
+ currentWorkingDirectory: z.ZodString;
700
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
701
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
702
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
703
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
704
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
705
+ gitChanges: z.ZodObject<{
706
+ status: z.ZodString;
707
+ diff: z.ZodString;
708
+ diffCached: z.ZodString;
709
+ lastCommitMessages: z.ZodString;
710
+ }, "strip", z.ZodTypeAny, {
711
+ status: string;
712
+ diff: string;
713
+ diffCached: string;
714
+ lastCommitMessages: string;
715
+ }, {
716
+ status: string;
717
+ diff: string;
718
+ diffCached: string;
719
+ lastCommitMessages: string;
720
+ }>;
721
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
722
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
723
+ systemInfo: z.ZodObject<{
724
+ platform: z.ZodString;
725
+ shell: z.ZodString;
726
+ nodeVersion: z.ZodString;
727
+ arch: z.ZodString;
728
+ homedir: z.ZodString;
729
+ cpus: z.ZodNumber;
730
+ }, "strip", z.ZodTypeAny, {
731
+ platform: string;
732
+ shell: string;
733
+ nodeVersion: string;
734
+ arch: string;
735
+ homedir: string;
736
+ cpus: number;
737
+ }, {
738
+ platform: string;
739
+ shell: string;
740
+ nodeVersion: string;
741
+ arch: string;
742
+ homedir: string;
743
+ cpus: number;
744
+ }>;
745
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
746
+ path: z.ZodString;
747
+ content: z.ZodString;
748
+ }, "strip", z.ZodTypeAny, {
749
+ path: string;
750
+ content: string;
751
+ }, {
752
+ path: string;
753
+ content: string;
754
+ }>, "many">, "many">>;
755
+ }, "strip", z.ZodTypeAny, {
756
+ currentWorkingDirectory: string;
757
+ fileTree: import("./util/file").FileTreeNode[];
758
+ fileTokenScores: Record<string, Record<string, number>>;
759
+ knowledgeFiles: Record<string, string>;
760
+ gitChanges: {
761
+ status: string;
762
+ diff: string;
763
+ diffCached: string;
764
+ lastCommitMessages: string;
765
+ };
766
+ changesSinceLastChat: Record<string, string>;
767
+ shellConfigFiles: Record<string, string>;
768
+ systemInfo: {
769
+ platform: string;
770
+ shell: string;
771
+ nodeVersion: string;
772
+ arch: string;
773
+ homedir: string;
774
+ cpus: number;
775
+ };
776
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
777
+ userKnowledgeFiles?: Record<string, string> | undefined;
778
+ fileVersions?: {
779
+ path: string;
780
+ content: string;
781
+ }[][] | undefined;
782
+ }, {
783
+ currentWorkingDirectory: string;
784
+ fileTree: import("./util/file").FileTreeNode[];
785
+ fileTokenScores: Record<string, Record<string, number>>;
786
+ knowledgeFiles: Record<string, string>;
787
+ gitChanges: {
788
+ status: string;
789
+ diff: string;
790
+ diffCached: string;
791
+ lastCommitMessages: string;
792
+ };
793
+ changesSinceLastChat: Record<string, string>;
794
+ shellConfigFiles: Record<string, string>;
795
+ systemInfo: {
796
+ platform: string;
797
+ shell: string;
798
+ nodeVersion: string;
799
+ arch: string;
800
+ homedir: string;
801
+ cpus: number;
802
+ };
803
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
804
+ userKnowledgeFiles?: Record<string, string> | undefined;
805
+ fileVersions?: {
806
+ path: string;
807
+ content: string;
808
+ }[][] | undefined;
809
+ }>;
810
+ repoUrl: z.ZodOptional<z.ZodString>;
811
+ }, "strip", z.ZodTypeAny, {
812
+ type: "init";
813
+ fileContext: {
814
+ currentWorkingDirectory: string;
815
+ fileTree: import("./util/file").FileTreeNode[];
816
+ fileTokenScores: Record<string, Record<string, number>>;
817
+ knowledgeFiles: Record<string, string>;
818
+ gitChanges: {
819
+ status: string;
820
+ diff: string;
821
+ diffCached: string;
822
+ lastCommitMessages: string;
823
+ };
824
+ changesSinceLastChat: Record<string, string>;
825
+ shellConfigFiles: Record<string, string>;
826
+ systemInfo: {
827
+ platform: string;
828
+ shell: string;
829
+ nodeVersion: string;
830
+ arch: string;
831
+ homedir: string;
832
+ cpus: number;
833
+ };
834
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
835
+ userKnowledgeFiles?: Record<string, string> | undefined;
836
+ fileVersions?: {
837
+ path: string;
838
+ content: string;
839
+ }[][] | undefined;
840
+ };
841
+ fingerprintId: string;
842
+ authToken?: string | undefined;
843
+ repoUrl?: string | undefined;
844
+ }, {
845
+ type: "init";
846
+ fileContext: {
847
+ currentWorkingDirectory: string;
848
+ fileTree: import("./util/file").FileTreeNode[];
849
+ fileTokenScores: Record<string, Record<string, number>>;
850
+ knowledgeFiles: Record<string, string>;
851
+ gitChanges: {
852
+ status: string;
853
+ diff: string;
854
+ diffCached: string;
855
+ lastCommitMessages: string;
856
+ };
857
+ changesSinceLastChat: Record<string, string>;
858
+ shellConfigFiles: Record<string, string>;
859
+ systemInfo: {
860
+ platform: string;
861
+ shell: string;
862
+ nodeVersion: string;
863
+ arch: string;
864
+ homedir: string;
865
+ cpus: number;
866
+ };
867
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
868
+ userKnowledgeFiles?: Record<string, string> | undefined;
869
+ fileVersions?: {
870
+ path: string;
871
+ content: string;
872
+ }[][] | undefined;
873
+ };
874
+ fingerprintId: string;
875
+ authToken?: string | undefined;
876
+ repoUrl?: string | undefined;
877
+ }>, z.ZodObject<{
878
+ type: z.ZodLiteral<"generate-commit-message">;
879
+ fingerprintId: z.ZodString;
880
+ authToken: z.ZodOptional<z.ZodString>;
881
+ stagedChanges: z.ZodString;
882
+ }, "strip", z.ZodTypeAny, {
883
+ type: "generate-commit-message";
884
+ fingerprintId: string;
885
+ stagedChanges: string;
886
+ authToken?: string | undefined;
887
+ }, {
888
+ type: "generate-commit-message";
889
+ fingerprintId: string;
890
+ stagedChanges: string;
891
+ authToken?: string | undefined;
892
+ }>]>;
893
+ export type ClientAction = z.infer<typeof CLIENT_ACTION_SCHEMA>;
894
+ export declare const UsageReponseSchema: z.ZodObject<{
895
+ type: z.ZodLiteral<"usage-response">;
896
+ usage: z.ZodNumber;
897
+ remainingBalance: z.ZodNumber;
898
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
899
+ next_quota_reset: z.ZodNullable<z.ZodDate>;
900
+ autoTopupAdded: z.ZodOptional<z.ZodNumber>;
901
+ }, "strip", z.ZodTypeAny, {
902
+ type: "usage-response";
903
+ usage: number;
904
+ remainingBalance: number;
905
+ next_quota_reset: Date | null;
906
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
907
+ autoTopupAdded?: number | undefined;
908
+ }, {
909
+ type: "usage-response";
910
+ usage: number;
911
+ remainingBalance: number;
912
+ next_quota_reset: Date | null;
913
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
914
+ autoTopupAdded?: number | undefined;
915
+ }>;
916
+ export type UsageResponse = z.infer<typeof UsageReponseSchema>;
917
+ export declare const InitResponseSchema: z.ZodObject<z.objectUtil.extendShape<{
918
+ type: z.ZodLiteral<"init-response">;
919
+ }, Omit<{
920
+ type: z.ZodLiteral<"usage-response">;
921
+ usage: z.ZodNumber;
922
+ remainingBalance: z.ZodNumber;
923
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
924
+ next_quota_reset: z.ZodNullable<z.ZodDate>;
925
+ autoTopupAdded: z.ZodOptional<z.ZodNumber>;
926
+ }, "type">>, "strip", z.ZodTypeAny, {
927
+ type: "init-response";
928
+ usage: number;
929
+ remainingBalance: number;
930
+ next_quota_reset: Date | null;
931
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
932
+ autoTopupAdded?: number | undefined;
933
+ }, {
934
+ type: "init-response";
935
+ usage: number;
936
+ remainingBalance: number;
937
+ next_quota_reset: Date | null;
938
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
939
+ autoTopupAdded?: number | undefined;
940
+ }>;
941
+ export type InitResponse = z.infer<typeof InitResponseSchema>;
942
+ export declare const ResponseCompleteSchema: z.ZodObject<z.objectUtil.extendShape<{
943
+ type: z.ZodLiteral<"response-complete">;
944
+ userInputId: z.ZodString;
945
+ response: z.ZodString;
946
+ changes: z.ZodArray<z.ZodObject<{
947
+ type: z.ZodEnum<["patch", "file"]>;
948
+ path: z.ZodString;
949
+ content: z.ZodString;
950
+ }, "strip", z.ZodTypeAny, {
951
+ path: string;
952
+ type: "file" | "patch";
953
+ content: string;
954
+ }, {
955
+ path: string;
956
+ type: "file" | "patch";
957
+ content: string;
958
+ }>, "many">;
959
+ changesAlreadyApplied: z.ZodArray<z.ZodObject<{
960
+ type: z.ZodEnum<["patch", "file"]>;
961
+ path: z.ZodString;
962
+ content: z.ZodString;
963
+ }, "strip", z.ZodTypeAny, {
964
+ path: string;
965
+ type: "file" | "patch";
966
+ content: string;
967
+ }, {
968
+ path: string;
969
+ type: "file" | "patch";
970
+ content: string;
971
+ }>, "many">;
972
+ addedFileVersions: z.ZodArray<z.ZodObject<{
973
+ path: z.ZodString;
974
+ content: z.ZodString;
975
+ }, "strip", z.ZodTypeAny, {
976
+ path: string;
977
+ content: string;
978
+ }, {
979
+ path: string;
980
+ content: string;
981
+ }>, "many">;
982
+ resetFileVersions: z.ZodBoolean;
983
+ }, {
984
+ usage: z.ZodOptional<z.ZodNumber>;
985
+ remainingBalance: z.ZodOptional<z.ZodNumber>;
986
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
987
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
988
+ autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
989
+ }>, "strip", z.ZodTypeAny, {
990
+ type: "response-complete";
991
+ userInputId: string;
992
+ response: string;
993
+ changes: {
994
+ path: string;
995
+ type: "file" | "patch";
996
+ content: string;
997
+ }[];
998
+ changesAlreadyApplied: {
999
+ path: string;
1000
+ type: "file" | "patch";
1001
+ content: string;
1002
+ }[];
1003
+ addedFileVersions: {
1004
+ path: string;
1005
+ content: string;
1006
+ }[];
1007
+ resetFileVersions: boolean;
1008
+ usage?: number | undefined;
1009
+ remainingBalance?: number | undefined;
1010
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1011
+ next_quota_reset?: Date | null | undefined;
1012
+ autoTopupAdded?: number | undefined;
1013
+ }, {
1014
+ type: "response-complete";
1015
+ userInputId: string;
1016
+ response: string;
1017
+ changes: {
1018
+ path: string;
1019
+ type: "file" | "patch";
1020
+ content: string;
1021
+ }[];
1022
+ changesAlreadyApplied: {
1023
+ path: string;
1024
+ type: "file" | "patch";
1025
+ content: string;
1026
+ }[];
1027
+ addedFileVersions: {
1028
+ path: string;
1029
+ content: string;
1030
+ }[];
1031
+ resetFileVersions: boolean;
1032
+ usage?: number | undefined;
1033
+ remainingBalance?: number | undefined;
1034
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1035
+ next_quota_reset?: Date | null | undefined;
1036
+ autoTopupAdded?: number | undefined;
1037
+ }>;
1038
+ export declare const MessageCostResponseSchema: z.ZodObject<{
1039
+ type: z.ZodLiteral<"message-cost-response">;
1040
+ promptId: z.ZodString;
1041
+ credits: z.ZodNumber;
1042
+ }, "strip", z.ZodTypeAny, {
1043
+ type: "message-cost-response";
1044
+ promptId: string;
1045
+ credits: number;
1046
+ }, {
1047
+ type: "message-cost-response";
1048
+ promptId: string;
1049
+ credits: number;
1050
+ }>;
1051
+ export type MessageCostResponse = z.infer<typeof MessageCostResponseSchema>;
1052
+ export declare const PromptResponseSchema: z.ZodObject<{
1053
+ type: z.ZodLiteral<"prompt-response">;
1054
+ promptId: z.ZodString;
1055
+ agentState: z.ZodObject<{
1056
+ agentContext: z.ZodString;
1057
+ fileContext: z.ZodObject<{
1058
+ currentWorkingDirectory: z.ZodString;
1059
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1060
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1061
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
1062
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1063
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1064
+ gitChanges: z.ZodObject<{
1065
+ status: z.ZodString;
1066
+ diff: z.ZodString;
1067
+ diffCached: z.ZodString;
1068
+ lastCommitMessages: z.ZodString;
1069
+ }, "strip", z.ZodTypeAny, {
1070
+ status: string;
1071
+ diff: string;
1072
+ diffCached: string;
1073
+ lastCommitMessages: string;
1074
+ }, {
1075
+ status: string;
1076
+ diff: string;
1077
+ diffCached: string;
1078
+ lastCommitMessages: string;
1079
+ }>;
1080
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
1081
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1082
+ systemInfo: z.ZodObject<{
1083
+ platform: z.ZodString;
1084
+ shell: z.ZodString;
1085
+ nodeVersion: z.ZodString;
1086
+ arch: z.ZodString;
1087
+ homedir: z.ZodString;
1088
+ cpus: z.ZodNumber;
1089
+ }, "strip", z.ZodTypeAny, {
1090
+ platform: string;
1091
+ shell: string;
1092
+ nodeVersion: string;
1093
+ arch: string;
1094
+ homedir: string;
1095
+ cpus: number;
1096
+ }, {
1097
+ platform: string;
1098
+ shell: string;
1099
+ nodeVersion: string;
1100
+ arch: string;
1101
+ homedir: string;
1102
+ cpus: number;
1103
+ }>;
1104
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1105
+ path: z.ZodString;
1106
+ content: z.ZodString;
1107
+ }, "strip", z.ZodTypeAny, {
1108
+ path: string;
1109
+ content: string;
1110
+ }, {
1111
+ path: string;
1112
+ content: string;
1113
+ }>, "many">, "many">>;
1114
+ }, "strip", z.ZodTypeAny, {
1115
+ currentWorkingDirectory: string;
1116
+ fileTree: import("./util/file").FileTreeNode[];
1117
+ fileTokenScores: Record<string, Record<string, number>>;
1118
+ knowledgeFiles: Record<string, string>;
1119
+ gitChanges: {
1120
+ status: string;
1121
+ diff: string;
1122
+ diffCached: string;
1123
+ lastCommitMessages: string;
1124
+ };
1125
+ changesSinceLastChat: Record<string, string>;
1126
+ shellConfigFiles: Record<string, string>;
1127
+ systemInfo: {
1128
+ platform: string;
1129
+ shell: string;
1130
+ nodeVersion: string;
1131
+ arch: string;
1132
+ homedir: string;
1133
+ cpus: number;
1134
+ };
1135
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1136
+ userKnowledgeFiles?: Record<string, string> | undefined;
1137
+ fileVersions?: {
1138
+ path: string;
1139
+ content: string;
1140
+ }[][] | undefined;
1141
+ }, {
1142
+ currentWorkingDirectory: string;
1143
+ fileTree: import("./util/file").FileTreeNode[];
1144
+ fileTokenScores: Record<string, Record<string, number>>;
1145
+ knowledgeFiles: Record<string, string>;
1146
+ gitChanges: {
1147
+ status: string;
1148
+ diff: string;
1149
+ diffCached: string;
1150
+ lastCommitMessages: string;
1151
+ };
1152
+ changesSinceLastChat: Record<string, string>;
1153
+ shellConfigFiles: Record<string, string>;
1154
+ systemInfo: {
1155
+ platform: string;
1156
+ shell: string;
1157
+ nodeVersion: string;
1158
+ arch: string;
1159
+ homedir: string;
1160
+ cpus: number;
1161
+ };
1162
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1163
+ userKnowledgeFiles?: Record<string, string> | undefined;
1164
+ fileVersions?: {
1165
+ path: string;
1166
+ content: string;
1167
+ }[][] | undefined;
1168
+ }>;
1169
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
1170
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
1171
+ }, "strip", z.ZodTypeAny, {
1172
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1173
+ }, {
1174
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1175
+ }>>, "many">;
1176
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
1177
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
1178
+ }, "strip", z.ZodTypeAny, {
1179
+ agentContext: string;
1180
+ fileContext: {
1181
+ currentWorkingDirectory: string;
1182
+ fileTree: import("./util/file").FileTreeNode[];
1183
+ fileTokenScores: Record<string, Record<string, number>>;
1184
+ knowledgeFiles: Record<string, string>;
1185
+ gitChanges: {
1186
+ status: string;
1187
+ diff: string;
1188
+ diffCached: string;
1189
+ lastCommitMessages: string;
1190
+ };
1191
+ changesSinceLastChat: Record<string, string>;
1192
+ shellConfigFiles: Record<string, string>;
1193
+ systemInfo: {
1194
+ platform: string;
1195
+ shell: string;
1196
+ nodeVersion: string;
1197
+ arch: string;
1198
+ homedir: string;
1199
+ cpus: number;
1200
+ };
1201
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1202
+ userKnowledgeFiles?: Record<string, string> | undefined;
1203
+ fileVersions?: {
1204
+ path: string;
1205
+ content: string;
1206
+ }[][] | undefined;
1207
+ };
1208
+ messageHistory: (import("ai").CoreMessage & {
1209
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1210
+ })[];
1211
+ consecutiveAssistantMessages?: number | undefined;
1212
+ agentStepsRemaining?: number | undefined;
1213
+ }, {
1214
+ agentContext: string;
1215
+ fileContext: {
1216
+ currentWorkingDirectory: string;
1217
+ fileTree: import("./util/file").FileTreeNode[];
1218
+ fileTokenScores: Record<string, Record<string, number>>;
1219
+ knowledgeFiles: Record<string, string>;
1220
+ gitChanges: {
1221
+ status: string;
1222
+ diff: string;
1223
+ diffCached: string;
1224
+ lastCommitMessages: string;
1225
+ };
1226
+ changesSinceLastChat: Record<string, string>;
1227
+ shellConfigFiles: Record<string, string>;
1228
+ systemInfo: {
1229
+ platform: string;
1230
+ shell: string;
1231
+ nodeVersion: string;
1232
+ arch: string;
1233
+ homedir: string;
1234
+ cpus: number;
1235
+ };
1236
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1237
+ userKnowledgeFiles?: Record<string, string> | undefined;
1238
+ fileVersions?: {
1239
+ path: string;
1240
+ content: string;
1241
+ }[][] | undefined;
1242
+ };
1243
+ messageHistory: (import("ai").CoreMessage & {
1244
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1245
+ })[];
1246
+ consecutiveAssistantMessages?: number | undefined;
1247
+ agentStepsRemaining?: number | undefined;
1248
+ }>;
1249
+ toolCalls: z.ZodArray<z.ZodObject<{
1250
+ name: z.ZodString;
1251
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
1252
+ id: z.ZodString;
1253
+ }, "strip", z.ZodTypeAny, {
1254
+ name: string;
1255
+ id: string;
1256
+ parameters: Record<string, string>;
1257
+ }, {
1258
+ name: string;
1259
+ id: string;
1260
+ parameters: Record<string, string>;
1261
+ }>, "many">;
1262
+ toolResults: z.ZodArray<z.ZodObject<{
1263
+ name: z.ZodString;
1264
+ result: z.ZodString;
1265
+ id: z.ZodString;
1266
+ }, "strip", z.ZodTypeAny, {
1267
+ name: string;
1268
+ id: string;
1269
+ result: string;
1270
+ }, {
1271
+ name: string;
1272
+ id: string;
1273
+ result: string;
1274
+ }>, "many">;
1275
+ }, "strip", z.ZodTypeAny, {
1276
+ type: "prompt-response";
1277
+ promptId: string;
1278
+ agentState: {
1279
+ agentContext: string;
1280
+ fileContext: {
1281
+ currentWorkingDirectory: string;
1282
+ fileTree: import("./util/file").FileTreeNode[];
1283
+ fileTokenScores: Record<string, Record<string, number>>;
1284
+ knowledgeFiles: Record<string, string>;
1285
+ gitChanges: {
1286
+ status: string;
1287
+ diff: string;
1288
+ diffCached: string;
1289
+ lastCommitMessages: string;
1290
+ };
1291
+ changesSinceLastChat: Record<string, string>;
1292
+ shellConfigFiles: Record<string, string>;
1293
+ systemInfo: {
1294
+ platform: string;
1295
+ shell: string;
1296
+ nodeVersion: string;
1297
+ arch: string;
1298
+ homedir: string;
1299
+ cpus: number;
1300
+ };
1301
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1302
+ userKnowledgeFiles?: Record<string, string> | undefined;
1303
+ fileVersions?: {
1304
+ path: string;
1305
+ content: string;
1306
+ }[][] | undefined;
1307
+ };
1308
+ messageHistory: (import("ai").CoreMessage & {
1309
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1310
+ })[];
1311
+ consecutiveAssistantMessages?: number | undefined;
1312
+ agentStepsRemaining?: number | undefined;
1313
+ };
1314
+ toolResults: {
1315
+ name: string;
1316
+ id: string;
1317
+ result: string;
1318
+ }[];
1319
+ toolCalls: {
1320
+ name: string;
1321
+ id: string;
1322
+ parameters: Record<string, string>;
1323
+ }[];
1324
+ }, {
1325
+ type: "prompt-response";
1326
+ promptId: string;
1327
+ agentState: {
1328
+ agentContext: string;
1329
+ fileContext: {
1330
+ currentWorkingDirectory: string;
1331
+ fileTree: import("./util/file").FileTreeNode[];
1332
+ fileTokenScores: Record<string, Record<string, number>>;
1333
+ knowledgeFiles: Record<string, string>;
1334
+ gitChanges: {
1335
+ status: string;
1336
+ diff: string;
1337
+ diffCached: string;
1338
+ lastCommitMessages: string;
1339
+ };
1340
+ changesSinceLastChat: Record<string, string>;
1341
+ shellConfigFiles: Record<string, string>;
1342
+ systemInfo: {
1343
+ platform: string;
1344
+ shell: string;
1345
+ nodeVersion: string;
1346
+ arch: string;
1347
+ homedir: string;
1348
+ cpus: number;
1349
+ };
1350
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1351
+ userKnowledgeFiles?: Record<string, string> | undefined;
1352
+ fileVersions?: {
1353
+ path: string;
1354
+ content: string;
1355
+ }[][] | undefined;
1356
+ };
1357
+ messageHistory: (import("ai").CoreMessage & {
1358
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1359
+ })[];
1360
+ consecutiveAssistantMessages?: number | undefined;
1361
+ agentStepsRemaining?: number | undefined;
1362
+ };
1363
+ toolResults: {
1364
+ name: string;
1365
+ id: string;
1366
+ result: string;
1367
+ }[];
1368
+ toolCalls: {
1369
+ name: string;
1370
+ id: string;
1371
+ parameters: Record<string, string>;
1372
+ }[];
1373
+ }>;
1374
+ export type PromptResponse = z.infer<typeof PromptResponseSchema>;
1375
+ export declare const ManagerPromptResponseSchema: z.ZodObject<{
1376
+ type: z.ZodLiteral<"manager-prompt-response">;
1377
+ promptId: z.ZodString;
1378
+ agentState: z.ZodObject<{
1379
+ agentContext: z.ZodString;
1380
+ fileContext: z.ZodObject<{
1381
+ currentWorkingDirectory: z.ZodString;
1382
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1383
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1384
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
1385
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1386
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1387
+ gitChanges: z.ZodObject<{
1388
+ status: z.ZodString;
1389
+ diff: z.ZodString;
1390
+ diffCached: z.ZodString;
1391
+ lastCommitMessages: z.ZodString;
1392
+ }, "strip", z.ZodTypeAny, {
1393
+ status: string;
1394
+ diff: string;
1395
+ diffCached: string;
1396
+ lastCommitMessages: string;
1397
+ }, {
1398
+ status: string;
1399
+ diff: string;
1400
+ diffCached: string;
1401
+ lastCommitMessages: string;
1402
+ }>;
1403
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
1404
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1405
+ systemInfo: z.ZodObject<{
1406
+ platform: z.ZodString;
1407
+ shell: z.ZodString;
1408
+ nodeVersion: z.ZodString;
1409
+ arch: z.ZodString;
1410
+ homedir: z.ZodString;
1411
+ cpus: z.ZodNumber;
1412
+ }, "strip", z.ZodTypeAny, {
1413
+ platform: string;
1414
+ shell: string;
1415
+ nodeVersion: string;
1416
+ arch: string;
1417
+ homedir: string;
1418
+ cpus: number;
1419
+ }, {
1420
+ platform: string;
1421
+ shell: string;
1422
+ nodeVersion: string;
1423
+ arch: string;
1424
+ homedir: string;
1425
+ cpus: number;
1426
+ }>;
1427
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1428
+ path: z.ZodString;
1429
+ content: z.ZodString;
1430
+ }, "strip", z.ZodTypeAny, {
1431
+ path: string;
1432
+ content: string;
1433
+ }, {
1434
+ path: string;
1435
+ content: string;
1436
+ }>, "many">, "many">>;
1437
+ }, "strip", z.ZodTypeAny, {
1438
+ currentWorkingDirectory: string;
1439
+ fileTree: import("./util/file").FileTreeNode[];
1440
+ fileTokenScores: Record<string, Record<string, number>>;
1441
+ knowledgeFiles: Record<string, string>;
1442
+ gitChanges: {
1443
+ status: string;
1444
+ diff: string;
1445
+ diffCached: string;
1446
+ lastCommitMessages: string;
1447
+ };
1448
+ changesSinceLastChat: Record<string, string>;
1449
+ shellConfigFiles: Record<string, string>;
1450
+ systemInfo: {
1451
+ platform: string;
1452
+ shell: string;
1453
+ nodeVersion: string;
1454
+ arch: string;
1455
+ homedir: string;
1456
+ cpus: number;
1457
+ };
1458
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1459
+ userKnowledgeFiles?: Record<string, string> | undefined;
1460
+ fileVersions?: {
1461
+ path: string;
1462
+ content: string;
1463
+ }[][] | undefined;
1464
+ }, {
1465
+ currentWorkingDirectory: string;
1466
+ fileTree: import("./util/file").FileTreeNode[];
1467
+ fileTokenScores: Record<string, Record<string, number>>;
1468
+ knowledgeFiles: Record<string, string>;
1469
+ gitChanges: {
1470
+ status: string;
1471
+ diff: string;
1472
+ diffCached: string;
1473
+ lastCommitMessages: string;
1474
+ };
1475
+ changesSinceLastChat: Record<string, string>;
1476
+ shellConfigFiles: Record<string, string>;
1477
+ systemInfo: {
1478
+ platform: string;
1479
+ shell: string;
1480
+ nodeVersion: string;
1481
+ arch: string;
1482
+ homedir: string;
1483
+ cpus: number;
1484
+ };
1485
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1486
+ userKnowledgeFiles?: Record<string, string> | undefined;
1487
+ fileVersions?: {
1488
+ path: string;
1489
+ content: string;
1490
+ }[][] | undefined;
1491
+ }>;
1492
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
1493
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
1494
+ }, "strip", z.ZodTypeAny, {
1495
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1496
+ }, {
1497
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1498
+ }>>, "many">;
1499
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
1500
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
1501
+ }, "strip", z.ZodTypeAny, {
1502
+ agentContext: string;
1503
+ fileContext: {
1504
+ currentWorkingDirectory: string;
1505
+ fileTree: import("./util/file").FileTreeNode[];
1506
+ fileTokenScores: Record<string, Record<string, number>>;
1507
+ knowledgeFiles: Record<string, string>;
1508
+ gitChanges: {
1509
+ status: string;
1510
+ diff: string;
1511
+ diffCached: string;
1512
+ lastCommitMessages: string;
1513
+ };
1514
+ changesSinceLastChat: Record<string, string>;
1515
+ shellConfigFiles: Record<string, string>;
1516
+ systemInfo: {
1517
+ platform: string;
1518
+ shell: string;
1519
+ nodeVersion: string;
1520
+ arch: string;
1521
+ homedir: string;
1522
+ cpus: number;
1523
+ };
1524
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1525
+ userKnowledgeFiles?: Record<string, string> | undefined;
1526
+ fileVersions?: {
1527
+ path: string;
1528
+ content: string;
1529
+ }[][] | undefined;
1530
+ };
1531
+ messageHistory: (import("ai").CoreMessage & {
1532
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1533
+ })[];
1534
+ consecutiveAssistantMessages?: number | undefined;
1535
+ agentStepsRemaining?: number | undefined;
1536
+ }, {
1537
+ agentContext: string;
1538
+ fileContext: {
1539
+ currentWorkingDirectory: string;
1540
+ fileTree: import("./util/file").FileTreeNode[];
1541
+ fileTokenScores: Record<string, Record<string, number>>;
1542
+ knowledgeFiles: Record<string, string>;
1543
+ gitChanges: {
1544
+ status: string;
1545
+ diff: string;
1546
+ diffCached: string;
1547
+ lastCommitMessages: string;
1548
+ };
1549
+ changesSinceLastChat: Record<string, string>;
1550
+ shellConfigFiles: Record<string, string>;
1551
+ systemInfo: {
1552
+ platform: string;
1553
+ shell: string;
1554
+ nodeVersion: string;
1555
+ arch: string;
1556
+ homedir: string;
1557
+ cpus: number;
1558
+ };
1559
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1560
+ userKnowledgeFiles?: Record<string, string> | undefined;
1561
+ fileVersions?: {
1562
+ path: string;
1563
+ content: string;
1564
+ }[][] | undefined;
1565
+ };
1566
+ messageHistory: (import("ai").CoreMessage & {
1567
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1568
+ })[];
1569
+ consecutiveAssistantMessages?: number | undefined;
1570
+ agentStepsRemaining?: number | undefined;
1571
+ }>;
1572
+ toolCalls: z.ZodArray<z.ZodObject<{
1573
+ name: z.ZodString;
1574
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
1575
+ id: z.ZodString;
1576
+ }, "strip", z.ZodTypeAny, {
1577
+ name: string;
1578
+ id: string;
1579
+ parameters: Record<string, string>;
1580
+ }, {
1581
+ name: string;
1582
+ id: string;
1583
+ parameters: Record<string, string>;
1584
+ }>, "many">;
1585
+ toolResults: z.ZodArray<z.ZodObject<{
1586
+ name: z.ZodString;
1587
+ result: z.ZodString;
1588
+ id: z.ZodString;
1589
+ }, "strip", z.ZodTypeAny, {
1590
+ name: string;
1591
+ id: string;
1592
+ result: string;
1593
+ }, {
1594
+ name: string;
1595
+ id: string;
1596
+ result: string;
1597
+ }>, "many">;
1598
+ }, "strip", z.ZodTypeAny, {
1599
+ type: "manager-prompt-response";
1600
+ promptId: string;
1601
+ agentState: {
1602
+ agentContext: string;
1603
+ fileContext: {
1604
+ currentWorkingDirectory: string;
1605
+ fileTree: import("./util/file").FileTreeNode[];
1606
+ fileTokenScores: Record<string, Record<string, number>>;
1607
+ knowledgeFiles: Record<string, string>;
1608
+ gitChanges: {
1609
+ status: string;
1610
+ diff: string;
1611
+ diffCached: string;
1612
+ lastCommitMessages: string;
1613
+ };
1614
+ changesSinceLastChat: Record<string, string>;
1615
+ shellConfigFiles: Record<string, string>;
1616
+ systemInfo: {
1617
+ platform: string;
1618
+ shell: string;
1619
+ nodeVersion: string;
1620
+ arch: string;
1621
+ homedir: string;
1622
+ cpus: number;
1623
+ };
1624
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1625
+ userKnowledgeFiles?: Record<string, string> | undefined;
1626
+ fileVersions?: {
1627
+ path: string;
1628
+ content: string;
1629
+ }[][] | undefined;
1630
+ };
1631
+ messageHistory: (import("ai").CoreMessage & {
1632
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1633
+ })[];
1634
+ consecutiveAssistantMessages?: number | undefined;
1635
+ agentStepsRemaining?: number | undefined;
1636
+ };
1637
+ toolResults: {
1638
+ name: string;
1639
+ id: string;
1640
+ result: string;
1641
+ }[];
1642
+ toolCalls: {
1643
+ name: string;
1644
+ id: string;
1645
+ parameters: Record<string, string>;
1646
+ }[];
1647
+ }, {
1648
+ type: "manager-prompt-response";
1649
+ promptId: string;
1650
+ agentState: {
1651
+ agentContext: string;
1652
+ fileContext: {
1653
+ currentWorkingDirectory: string;
1654
+ fileTree: import("./util/file").FileTreeNode[];
1655
+ fileTokenScores: Record<string, Record<string, number>>;
1656
+ knowledgeFiles: Record<string, string>;
1657
+ gitChanges: {
1658
+ status: string;
1659
+ diff: string;
1660
+ diffCached: string;
1661
+ lastCommitMessages: string;
1662
+ };
1663
+ changesSinceLastChat: Record<string, string>;
1664
+ shellConfigFiles: Record<string, string>;
1665
+ systemInfo: {
1666
+ platform: string;
1667
+ shell: string;
1668
+ nodeVersion: string;
1669
+ arch: string;
1670
+ homedir: string;
1671
+ cpus: number;
1672
+ };
1673
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1674
+ userKnowledgeFiles?: Record<string, string> | undefined;
1675
+ fileVersions?: {
1676
+ path: string;
1677
+ content: string;
1678
+ }[][] | undefined;
1679
+ };
1680
+ messageHistory: (import("ai").CoreMessage & {
1681
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1682
+ })[];
1683
+ consecutiveAssistantMessages?: number | undefined;
1684
+ agentStepsRemaining?: number | undefined;
1685
+ };
1686
+ toolResults: {
1687
+ name: string;
1688
+ id: string;
1689
+ result: string;
1690
+ }[];
1691
+ toolCalls: {
1692
+ name: string;
1693
+ id: string;
1694
+ parameters: Record<string, string>;
1695
+ }[];
1696
+ }>;
1697
+ export type ManagerPromptResponse = z.infer<typeof ManagerPromptResponseSchema>;
1698
+ export declare const SERVER_ACTION_SCHEMA: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1699
+ type: z.ZodLiteral<"response-chunk">;
1700
+ userInputId: z.ZodString;
1701
+ chunk: z.ZodString;
1702
+ }, "strip", z.ZodTypeAny, {
1703
+ type: "response-chunk";
1704
+ userInputId: string;
1705
+ chunk: string;
1706
+ }, {
1707
+ type: "response-chunk";
1708
+ userInputId: string;
1709
+ chunk: string;
1710
+ }>, z.ZodObject<z.objectUtil.extendShape<{
1711
+ type: z.ZodLiteral<"response-complete">;
1712
+ userInputId: z.ZodString;
1713
+ response: z.ZodString;
1714
+ changes: z.ZodArray<z.ZodObject<{
1715
+ type: z.ZodEnum<["patch", "file"]>;
1716
+ path: z.ZodString;
1717
+ content: z.ZodString;
1718
+ }, "strip", z.ZodTypeAny, {
1719
+ path: string;
1720
+ type: "file" | "patch";
1721
+ content: string;
1722
+ }, {
1723
+ path: string;
1724
+ type: "file" | "patch";
1725
+ content: string;
1726
+ }>, "many">;
1727
+ changesAlreadyApplied: z.ZodArray<z.ZodObject<{
1728
+ type: z.ZodEnum<["patch", "file"]>;
1729
+ path: z.ZodString;
1730
+ content: z.ZodString;
1731
+ }, "strip", z.ZodTypeAny, {
1732
+ path: string;
1733
+ type: "file" | "patch";
1734
+ content: string;
1735
+ }, {
1736
+ path: string;
1737
+ type: "file" | "patch";
1738
+ content: string;
1739
+ }>, "many">;
1740
+ addedFileVersions: z.ZodArray<z.ZodObject<{
1741
+ path: z.ZodString;
1742
+ content: z.ZodString;
1743
+ }, "strip", z.ZodTypeAny, {
1744
+ path: string;
1745
+ content: string;
1746
+ }, {
1747
+ path: string;
1748
+ content: string;
1749
+ }>, "many">;
1750
+ resetFileVersions: z.ZodBoolean;
1751
+ }, {
1752
+ usage: z.ZodOptional<z.ZodNumber>;
1753
+ remainingBalance: z.ZodOptional<z.ZodNumber>;
1754
+ balanceBreakdown: z.ZodOptional<z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>>;
1755
+ next_quota_reset: z.ZodOptional<z.ZodNullable<z.ZodDate>>;
1756
+ autoTopupAdded: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
1757
+ }>, "strip", z.ZodTypeAny, {
1758
+ type: "response-complete";
1759
+ userInputId: string;
1760
+ response: string;
1761
+ changes: {
1762
+ path: string;
1763
+ type: "file" | "patch";
1764
+ content: string;
1765
+ }[];
1766
+ changesAlreadyApplied: {
1767
+ path: string;
1768
+ type: "file" | "patch";
1769
+ content: string;
1770
+ }[];
1771
+ addedFileVersions: {
1772
+ path: string;
1773
+ content: string;
1774
+ }[];
1775
+ resetFileVersions: boolean;
1776
+ usage?: number | undefined;
1777
+ remainingBalance?: number | undefined;
1778
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1779
+ next_quota_reset?: Date | null | undefined;
1780
+ autoTopupAdded?: number | undefined;
1781
+ }, {
1782
+ type: "response-complete";
1783
+ userInputId: string;
1784
+ response: string;
1785
+ changes: {
1786
+ path: string;
1787
+ type: "file" | "patch";
1788
+ content: string;
1789
+ }[];
1790
+ changesAlreadyApplied: {
1791
+ path: string;
1792
+ type: "file" | "patch";
1793
+ content: string;
1794
+ }[];
1795
+ addedFileVersions: {
1796
+ path: string;
1797
+ content: string;
1798
+ }[];
1799
+ resetFileVersions: boolean;
1800
+ usage?: number | undefined;
1801
+ remainingBalance?: number | undefined;
1802
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
1803
+ next_quota_reset?: Date | null | undefined;
1804
+ autoTopupAdded?: number | undefined;
1805
+ }>, z.ZodObject<{
1806
+ type: z.ZodLiteral<"prompt-response">;
1807
+ promptId: z.ZodString;
1808
+ agentState: z.ZodObject<{
1809
+ agentContext: z.ZodString;
1810
+ fileContext: z.ZodObject<{
1811
+ currentWorkingDirectory: z.ZodString;
1812
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
1813
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
1814
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
1815
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1816
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1817
+ gitChanges: z.ZodObject<{
1818
+ status: z.ZodString;
1819
+ diff: z.ZodString;
1820
+ diffCached: z.ZodString;
1821
+ lastCommitMessages: z.ZodString;
1822
+ }, "strip", z.ZodTypeAny, {
1823
+ status: string;
1824
+ diff: string;
1825
+ diffCached: string;
1826
+ lastCommitMessages: string;
1827
+ }, {
1828
+ status: string;
1829
+ diff: string;
1830
+ diffCached: string;
1831
+ lastCommitMessages: string;
1832
+ }>;
1833
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
1834
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
1835
+ systemInfo: z.ZodObject<{
1836
+ platform: z.ZodString;
1837
+ shell: z.ZodString;
1838
+ nodeVersion: z.ZodString;
1839
+ arch: z.ZodString;
1840
+ homedir: z.ZodString;
1841
+ cpus: z.ZodNumber;
1842
+ }, "strip", z.ZodTypeAny, {
1843
+ platform: string;
1844
+ shell: string;
1845
+ nodeVersion: string;
1846
+ arch: string;
1847
+ homedir: string;
1848
+ cpus: number;
1849
+ }, {
1850
+ platform: string;
1851
+ shell: string;
1852
+ nodeVersion: string;
1853
+ arch: string;
1854
+ homedir: string;
1855
+ cpus: number;
1856
+ }>;
1857
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
1858
+ path: z.ZodString;
1859
+ content: z.ZodString;
1860
+ }, "strip", z.ZodTypeAny, {
1861
+ path: string;
1862
+ content: string;
1863
+ }, {
1864
+ path: string;
1865
+ content: string;
1866
+ }>, "many">, "many">>;
1867
+ }, "strip", z.ZodTypeAny, {
1868
+ currentWorkingDirectory: string;
1869
+ fileTree: import("./util/file").FileTreeNode[];
1870
+ fileTokenScores: Record<string, Record<string, number>>;
1871
+ knowledgeFiles: Record<string, string>;
1872
+ gitChanges: {
1873
+ status: string;
1874
+ diff: string;
1875
+ diffCached: string;
1876
+ lastCommitMessages: string;
1877
+ };
1878
+ changesSinceLastChat: Record<string, string>;
1879
+ shellConfigFiles: Record<string, string>;
1880
+ systemInfo: {
1881
+ platform: string;
1882
+ shell: string;
1883
+ nodeVersion: string;
1884
+ arch: string;
1885
+ homedir: string;
1886
+ cpus: number;
1887
+ };
1888
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1889
+ userKnowledgeFiles?: Record<string, string> | undefined;
1890
+ fileVersions?: {
1891
+ path: string;
1892
+ content: string;
1893
+ }[][] | undefined;
1894
+ }, {
1895
+ currentWorkingDirectory: string;
1896
+ fileTree: import("./util/file").FileTreeNode[];
1897
+ fileTokenScores: Record<string, Record<string, number>>;
1898
+ knowledgeFiles: Record<string, string>;
1899
+ gitChanges: {
1900
+ status: string;
1901
+ diff: string;
1902
+ diffCached: string;
1903
+ lastCommitMessages: string;
1904
+ };
1905
+ changesSinceLastChat: Record<string, string>;
1906
+ shellConfigFiles: Record<string, string>;
1907
+ systemInfo: {
1908
+ platform: string;
1909
+ shell: string;
1910
+ nodeVersion: string;
1911
+ arch: string;
1912
+ homedir: string;
1913
+ cpus: number;
1914
+ };
1915
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1916
+ userKnowledgeFiles?: Record<string, string> | undefined;
1917
+ fileVersions?: {
1918
+ path: string;
1919
+ content: string;
1920
+ }[][] | undefined;
1921
+ }>;
1922
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
1923
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
1924
+ }, "strip", z.ZodTypeAny, {
1925
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1926
+ }, {
1927
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1928
+ }>>, "many">;
1929
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
1930
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
1931
+ }, "strip", z.ZodTypeAny, {
1932
+ agentContext: string;
1933
+ fileContext: {
1934
+ currentWorkingDirectory: string;
1935
+ fileTree: import("./util/file").FileTreeNode[];
1936
+ fileTokenScores: Record<string, Record<string, number>>;
1937
+ knowledgeFiles: Record<string, string>;
1938
+ gitChanges: {
1939
+ status: string;
1940
+ diff: string;
1941
+ diffCached: string;
1942
+ lastCommitMessages: string;
1943
+ };
1944
+ changesSinceLastChat: Record<string, string>;
1945
+ shellConfigFiles: Record<string, string>;
1946
+ systemInfo: {
1947
+ platform: string;
1948
+ shell: string;
1949
+ nodeVersion: string;
1950
+ arch: string;
1951
+ homedir: string;
1952
+ cpus: number;
1953
+ };
1954
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1955
+ userKnowledgeFiles?: Record<string, string> | undefined;
1956
+ fileVersions?: {
1957
+ path: string;
1958
+ content: string;
1959
+ }[][] | undefined;
1960
+ };
1961
+ messageHistory: (import("ai").CoreMessage & {
1962
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1963
+ })[];
1964
+ consecutiveAssistantMessages?: number | undefined;
1965
+ agentStepsRemaining?: number | undefined;
1966
+ }, {
1967
+ agentContext: string;
1968
+ fileContext: {
1969
+ currentWorkingDirectory: string;
1970
+ fileTree: import("./util/file").FileTreeNode[];
1971
+ fileTokenScores: Record<string, Record<string, number>>;
1972
+ knowledgeFiles: Record<string, string>;
1973
+ gitChanges: {
1974
+ status: string;
1975
+ diff: string;
1976
+ diffCached: string;
1977
+ lastCommitMessages: string;
1978
+ };
1979
+ changesSinceLastChat: Record<string, string>;
1980
+ shellConfigFiles: Record<string, string>;
1981
+ systemInfo: {
1982
+ platform: string;
1983
+ shell: string;
1984
+ nodeVersion: string;
1985
+ arch: string;
1986
+ homedir: string;
1987
+ cpus: number;
1988
+ };
1989
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
1990
+ userKnowledgeFiles?: Record<string, string> | undefined;
1991
+ fileVersions?: {
1992
+ path: string;
1993
+ content: string;
1994
+ }[][] | undefined;
1995
+ };
1996
+ messageHistory: (import("ai").CoreMessage & {
1997
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
1998
+ })[];
1999
+ consecutiveAssistantMessages?: number | undefined;
2000
+ agentStepsRemaining?: number | undefined;
2001
+ }>;
2002
+ toolCalls: z.ZodArray<z.ZodObject<{
2003
+ name: z.ZodString;
2004
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2005
+ id: z.ZodString;
2006
+ }, "strip", z.ZodTypeAny, {
2007
+ name: string;
2008
+ id: string;
2009
+ parameters: Record<string, string>;
2010
+ }, {
2011
+ name: string;
2012
+ id: string;
2013
+ parameters: Record<string, string>;
2014
+ }>, "many">;
2015
+ toolResults: z.ZodArray<z.ZodObject<{
2016
+ name: z.ZodString;
2017
+ result: z.ZodString;
2018
+ id: z.ZodString;
2019
+ }, "strip", z.ZodTypeAny, {
2020
+ name: string;
2021
+ id: string;
2022
+ result: string;
2023
+ }, {
2024
+ name: string;
2025
+ id: string;
2026
+ result: string;
2027
+ }>, "many">;
2028
+ }, "strip", z.ZodTypeAny, {
2029
+ type: "prompt-response";
2030
+ promptId: string;
2031
+ agentState: {
2032
+ agentContext: string;
2033
+ fileContext: {
2034
+ currentWorkingDirectory: string;
2035
+ fileTree: import("./util/file").FileTreeNode[];
2036
+ fileTokenScores: Record<string, Record<string, number>>;
2037
+ knowledgeFiles: Record<string, string>;
2038
+ gitChanges: {
2039
+ status: string;
2040
+ diff: string;
2041
+ diffCached: string;
2042
+ lastCommitMessages: string;
2043
+ };
2044
+ changesSinceLastChat: Record<string, string>;
2045
+ shellConfigFiles: Record<string, string>;
2046
+ systemInfo: {
2047
+ platform: string;
2048
+ shell: string;
2049
+ nodeVersion: string;
2050
+ arch: string;
2051
+ homedir: string;
2052
+ cpus: number;
2053
+ };
2054
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2055
+ userKnowledgeFiles?: Record<string, string> | undefined;
2056
+ fileVersions?: {
2057
+ path: string;
2058
+ content: string;
2059
+ }[][] | undefined;
2060
+ };
2061
+ messageHistory: (import("ai").CoreMessage & {
2062
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2063
+ })[];
2064
+ consecutiveAssistantMessages?: number | undefined;
2065
+ agentStepsRemaining?: number | undefined;
2066
+ };
2067
+ toolResults: {
2068
+ name: string;
2069
+ id: string;
2070
+ result: string;
2071
+ }[];
2072
+ toolCalls: {
2073
+ name: string;
2074
+ id: string;
2075
+ parameters: Record<string, string>;
2076
+ }[];
2077
+ }, {
2078
+ type: "prompt-response";
2079
+ promptId: string;
2080
+ agentState: {
2081
+ agentContext: string;
2082
+ fileContext: {
2083
+ currentWorkingDirectory: string;
2084
+ fileTree: import("./util/file").FileTreeNode[];
2085
+ fileTokenScores: Record<string, Record<string, number>>;
2086
+ knowledgeFiles: Record<string, string>;
2087
+ gitChanges: {
2088
+ status: string;
2089
+ diff: string;
2090
+ diffCached: string;
2091
+ lastCommitMessages: string;
2092
+ };
2093
+ changesSinceLastChat: Record<string, string>;
2094
+ shellConfigFiles: Record<string, string>;
2095
+ systemInfo: {
2096
+ platform: string;
2097
+ shell: string;
2098
+ nodeVersion: string;
2099
+ arch: string;
2100
+ homedir: string;
2101
+ cpus: number;
2102
+ };
2103
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2104
+ userKnowledgeFiles?: Record<string, string> | undefined;
2105
+ fileVersions?: {
2106
+ path: string;
2107
+ content: string;
2108
+ }[][] | undefined;
2109
+ };
2110
+ messageHistory: (import("ai").CoreMessage & {
2111
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2112
+ })[];
2113
+ consecutiveAssistantMessages?: number | undefined;
2114
+ agentStepsRemaining?: number | undefined;
2115
+ };
2116
+ toolResults: {
2117
+ name: string;
2118
+ id: string;
2119
+ result: string;
2120
+ }[];
2121
+ toolCalls: {
2122
+ name: string;
2123
+ id: string;
2124
+ parameters: Record<string, string>;
2125
+ }[];
2126
+ }>, z.ZodObject<{
2127
+ type: z.ZodLiteral<"manager-prompt-response">;
2128
+ promptId: z.ZodString;
2129
+ agentState: z.ZodObject<{
2130
+ agentContext: z.ZodString;
2131
+ fileContext: z.ZodObject<{
2132
+ currentWorkingDirectory: z.ZodString;
2133
+ fileTree: z.ZodArray<z.ZodType<import("./util/file").FileTreeNode, z.ZodTypeDef, import("./util/file").FileTreeNode>, "many">;
2134
+ fileTokenScores: z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodNumber>>;
2135
+ tokenCallers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>>;
2136
+ knowledgeFiles: z.ZodRecord<z.ZodString, z.ZodString>;
2137
+ userKnowledgeFiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2138
+ gitChanges: z.ZodObject<{
2139
+ status: z.ZodString;
2140
+ diff: z.ZodString;
2141
+ diffCached: z.ZodString;
2142
+ lastCommitMessages: z.ZodString;
2143
+ }, "strip", z.ZodTypeAny, {
2144
+ status: string;
2145
+ diff: string;
2146
+ diffCached: string;
2147
+ lastCommitMessages: string;
2148
+ }, {
2149
+ status: string;
2150
+ diff: string;
2151
+ diffCached: string;
2152
+ lastCommitMessages: string;
2153
+ }>;
2154
+ changesSinceLastChat: z.ZodRecord<z.ZodString, z.ZodString>;
2155
+ shellConfigFiles: z.ZodRecord<z.ZodString, z.ZodString>;
2156
+ systemInfo: z.ZodObject<{
2157
+ platform: z.ZodString;
2158
+ shell: z.ZodString;
2159
+ nodeVersion: z.ZodString;
2160
+ arch: z.ZodString;
2161
+ homedir: z.ZodString;
2162
+ cpus: z.ZodNumber;
2163
+ }, "strip", z.ZodTypeAny, {
2164
+ platform: string;
2165
+ shell: string;
2166
+ nodeVersion: string;
2167
+ arch: string;
2168
+ homedir: string;
2169
+ cpus: number;
2170
+ }, {
2171
+ platform: string;
2172
+ shell: string;
2173
+ nodeVersion: string;
2174
+ arch: string;
2175
+ homedir: string;
2176
+ cpus: number;
2177
+ }>;
2178
+ fileVersions: z.ZodOptional<z.ZodArray<z.ZodArray<z.ZodObject<{
2179
+ path: z.ZodString;
2180
+ content: z.ZodString;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ path: string;
2183
+ content: string;
2184
+ }, {
2185
+ path: string;
2186
+ content: string;
2187
+ }>, "many">, "many">>;
2188
+ }, "strip", z.ZodTypeAny, {
2189
+ currentWorkingDirectory: string;
2190
+ fileTree: import("./util/file").FileTreeNode[];
2191
+ fileTokenScores: Record<string, Record<string, number>>;
2192
+ knowledgeFiles: Record<string, string>;
2193
+ gitChanges: {
2194
+ status: string;
2195
+ diff: string;
2196
+ diffCached: string;
2197
+ lastCommitMessages: string;
2198
+ };
2199
+ changesSinceLastChat: Record<string, string>;
2200
+ shellConfigFiles: Record<string, string>;
2201
+ systemInfo: {
2202
+ platform: string;
2203
+ shell: string;
2204
+ nodeVersion: string;
2205
+ arch: string;
2206
+ homedir: string;
2207
+ cpus: number;
2208
+ };
2209
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2210
+ userKnowledgeFiles?: Record<string, string> | undefined;
2211
+ fileVersions?: {
2212
+ path: string;
2213
+ content: string;
2214
+ }[][] | undefined;
2215
+ }, {
2216
+ currentWorkingDirectory: string;
2217
+ fileTree: import("./util/file").FileTreeNode[];
2218
+ fileTokenScores: Record<string, Record<string, number>>;
2219
+ knowledgeFiles: Record<string, string>;
2220
+ gitChanges: {
2221
+ status: string;
2222
+ diff: string;
2223
+ diffCached: string;
2224
+ lastCommitMessages: string;
2225
+ };
2226
+ changesSinceLastChat: Record<string, string>;
2227
+ shellConfigFiles: Record<string, string>;
2228
+ systemInfo: {
2229
+ platform: string;
2230
+ shell: string;
2231
+ nodeVersion: string;
2232
+ arch: string;
2233
+ homedir: string;
2234
+ cpus: number;
2235
+ };
2236
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2237
+ userKnowledgeFiles?: Record<string, string> | undefined;
2238
+ fileVersions?: {
2239
+ path: string;
2240
+ content: string;
2241
+ }[][] | undefined;
2242
+ }>;
2243
+ messageHistory: z.ZodArray<z.ZodIntersection<z.ZodType<import("ai").CoreMessage, z.ZodTypeDef, import("ai").CoreMessage>, z.ZodObject<{
2244
+ timeToLive: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"agentStep">, z.ZodLiteral<"userPrompt">]>>;
2245
+ }, "strip", z.ZodTypeAny, {
2246
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2247
+ }, {
2248
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2249
+ }>>, "many">;
2250
+ consecutiveAssistantMessages: z.ZodOptional<z.ZodNumber>;
2251
+ agentStepsRemaining: z.ZodOptional<z.ZodNumber>;
2252
+ }, "strip", z.ZodTypeAny, {
2253
+ agentContext: string;
2254
+ fileContext: {
2255
+ currentWorkingDirectory: string;
2256
+ fileTree: import("./util/file").FileTreeNode[];
2257
+ fileTokenScores: Record<string, Record<string, number>>;
2258
+ knowledgeFiles: Record<string, string>;
2259
+ gitChanges: {
2260
+ status: string;
2261
+ diff: string;
2262
+ diffCached: string;
2263
+ lastCommitMessages: string;
2264
+ };
2265
+ changesSinceLastChat: Record<string, string>;
2266
+ shellConfigFiles: Record<string, string>;
2267
+ systemInfo: {
2268
+ platform: string;
2269
+ shell: string;
2270
+ nodeVersion: string;
2271
+ arch: string;
2272
+ homedir: string;
2273
+ cpus: number;
2274
+ };
2275
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2276
+ userKnowledgeFiles?: Record<string, string> | undefined;
2277
+ fileVersions?: {
2278
+ path: string;
2279
+ content: string;
2280
+ }[][] | undefined;
2281
+ };
2282
+ messageHistory: (import("ai").CoreMessage & {
2283
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2284
+ })[];
2285
+ consecutiveAssistantMessages?: number | undefined;
2286
+ agentStepsRemaining?: number | undefined;
2287
+ }, {
2288
+ agentContext: string;
2289
+ fileContext: {
2290
+ currentWorkingDirectory: string;
2291
+ fileTree: import("./util/file").FileTreeNode[];
2292
+ fileTokenScores: Record<string, Record<string, number>>;
2293
+ knowledgeFiles: Record<string, string>;
2294
+ gitChanges: {
2295
+ status: string;
2296
+ diff: string;
2297
+ diffCached: string;
2298
+ lastCommitMessages: string;
2299
+ };
2300
+ changesSinceLastChat: Record<string, string>;
2301
+ shellConfigFiles: Record<string, string>;
2302
+ systemInfo: {
2303
+ platform: string;
2304
+ shell: string;
2305
+ nodeVersion: string;
2306
+ arch: string;
2307
+ homedir: string;
2308
+ cpus: number;
2309
+ };
2310
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2311
+ userKnowledgeFiles?: Record<string, string> | undefined;
2312
+ fileVersions?: {
2313
+ path: string;
2314
+ content: string;
2315
+ }[][] | undefined;
2316
+ };
2317
+ messageHistory: (import("ai").CoreMessage & {
2318
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2319
+ })[];
2320
+ consecutiveAssistantMessages?: number | undefined;
2321
+ agentStepsRemaining?: number | undefined;
2322
+ }>;
2323
+ toolCalls: z.ZodArray<z.ZodObject<{
2324
+ name: z.ZodString;
2325
+ parameters: z.ZodRecord<z.ZodString, z.ZodString>;
2326
+ id: z.ZodString;
2327
+ }, "strip", z.ZodTypeAny, {
2328
+ name: string;
2329
+ id: string;
2330
+ parameters: Record<string, string>;
2331
+ }, {
2332
+ name: string;
2333
+ id: string;
2334
+ parameters: Record<string, string>;
2335
+ }>, "many">;
2336
+ toolResults: z.ZodArray<z.ZodObject<{
2337
+ name: z.ZodString;
2338
+ result: z.ZodString;
2339
+ id: z.ZodString;
2340
+ }, "strip", z.ZodTypeAny, {
2341
+ name: string;
2342
+ id: string;
2343
+ result: string;
2344
+ }, {
2345
+ name: string;
2346
+ id: string;
2347
+ result: string;
2348
+ }>, "many">;
2349
+ }, "strip", z.ZodTypeAny, {
2350
+ type: "manager-prompt-response";
2351
+ promptId: string;
2352
+ agentState: {
2353
+ agentContext: string;
2354
+ fileContext: {
2355
+ currentWorkingDirectory: string;
2356
+ fileTree: import("./util/file").FileTreeNode[];
2357
+ fileTokenScores: Record<string, Record<string, number>>;
2358
+ knowledgeFiles: Record<string, string>;
2359
+ gitChanges: {
2360
+ status: string;
2361
+ diff: string;
2362
+ diffCached: string;
2363
+ lastCommitMessages: string;
2364
+ };
2365
+ changesSinceLastChat: Record<string, string>;
2366
+ shellConfigFiles: Record<string, string>;
2367
+ systemInfo: {
2368
+ platform: string;
2369
+ shell: string;
2370
+ nodeVersion: string;
2371
+ arch: string;
2372
+ homedir: string;
2373
+ cpus: number;
2374
+ };
2375
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2376
+ userKnowledgeFiles?: Record<string, string> | undefined;
2377
+ fileVersions?: {
2378
+ path: string;
2379
+ content: string;
2380
+ }[][] | undefined;
2381
+ };
2382
+ messageHistory: (import("ai").CoreMessage & {
2383
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2384
+ })[];
2385
+ consecutiveAssistantMessages?: number | undefined;
2386
+ agentStepsRemaining?: number | undefined;
2387
+ };
2388
+ toolResults: {
2389
+ name: string;
2390
+ id: string;
2391
+ result: string;
2392
+ }[];
2393
+ toolCalls: {
2394
+ name: string;
2395
+ id: string;
2396
+ parameters: Record<string, string>;
2397
+ }[];
2398
+ }, {
2399
+ type: "manager-prompt-response";
2400
+ promptId: string;
2401
+ agentState: {
2402
+ agentContext: string;
2403
+ fileContext: {
2404
+ currentWorkingDirectory: string;
2405
+ fileTree: import("./util/file").FileTreeNode[];
2406
+ fileTokenScores: Record<string, Record<string, number>>;
2407
+ knowledgeFiles: Record<string, string>;
2408
+ gitChanges: {
2409
+ status: string;
2410
+ diff: string;
2411
+ diffCached: string;
2412
+ lastCommitMessages: string;
2413
+ };
2414
+ changesSinceLastChat: Record<string, string>;
2415
+ shellConfigFiles: Record<string, string>;
2416
+ systemInfo: {
2417
+ platform: string;
2418
+ shell: string;
2419
+ nodeVersion: string;
2420
+ arch: string;
2421
+ homedir: string;
2422
+ cpus: number;
2423
+ };
2424
+ tokenCallers?: Record<string, Record<string, string[]>> | undefined;
2425
+ userKnowledgeFiles?: Record<string, string> | undefined;
2426
+ fileVersions?: {
2427
+ path: string;
2428
+ content: string;
2429
+ }[][] | undefined;
2430
+ };
2431
+ messageHistory: (import("ai").CoreMessage & {
2432
+ timeToLive?: "agentStep" | "userPrompt" | undefined;
2433
+ })[];
2434
+ consecutiveAssistantMessages?: number | undefined;
2435
+ agentStepsRemaining?: number | undefined;
2436
+ };
2437
+ toolResults: {
2438
+ name: string;
2439
+ id: string;
2440
+ result: string;
2441
+ }[];
2442
+ toolCalls: {
2443
+ name: string;
2444
+ id: string;
2445
+ parameters: Record<string, string>;
2446
+ }[];
2447
+ }>, z.ZodObject<{
2448
+ type: z.ZodLiteral<"read-files">;
2449
+ filePaths: z.ZodArray<z.ZodString, "many">;
2450
+ requestId: z.ZodString;
2451
+ }, "strip", z.ZodTypeAny, {
2452
+ type: "read-files";
2453
+ requestId: string;
2454
+ filePaths: string[];
2455
+ }, {
2456
+ type: "read-files";
2457
+ requestId: string;
2458
+ filePaths: string[];
2459
+ }>, z.ZodObject<{
2460
+ type: z.ZodLiteral<"tool-call">;
2461
+ userInputId: z.ZodString;
2462
+ response: z.ZodString;
2463
+ data: z.ZodObject<{
2464
+ name: z.ZodString;
2465
+ id: z.ZodString;
2466
+ input: z.ZodRecord<z.ZodString, z.ZodAny>;
2467
+ }, "strip", z.ZodTypeAny, {
2468
+ name: string;
2469
+ id: string;
2470
+ input: Record<string, any>;
2471
+ }, {
2472
+ name: string;
2473
+ id: string;
2474
+ input: Record<string, any>;
2475
+ }>;
2476
+ changes: z.ZodArray<z.ZodObject<{
2477
+ type: z.ZodEnum<["patch", "file"]>;
2478
+ path: z.ZodString;
2479
+ content: z.ZodString;
2480
+ }, "strip", z.ZodTypeAny, {
2481
+ path: string;
2482
+ type: "file" | "patch";
2483
+ content: string;
2484
+ }, {
2485
+ path: string;
2486
+ type: "file" | "patch";
2487
+ content: string;
2488
+ }>, "many">;
2489
+ changesAlreadyApplied: z.ZodArray<z.ZodObject<{
2490
+ type: z.ZodEnum<["patch", "file"]>;
2491
+ path: z.ZodString;
2492
+ content: z.ZodString;
2493
+ }, "strip", z.ZodTypeAny, {
2494
+ path: string;
2495
+ type: "file" | "patch";
2496
+ content: string;
2497
+ }, {
2498
+ path: string;
2499
+ type: "file" | "patch";
2500
+ content: string;
2501
+ }>, "many">;
2502
+ addedFileVersions: z.ZodArray<z.ZodObject<{
2503
+ path: z.ZodString;
2504
+ content: z.ZodString;
2505
+ }, "strip", z.ZodTypeAny, {
2506
+ path: string;
2507
+ content: string;
2508
+ }, {
2509
+ path: string;
2510
+ content: string;
2511
+ }>, "many">;
2512
+ resetFileVersions: z.ZodBoolean;
2513
+ }, "strip", z.ZodTypeAny, {
2514
+ type: "tool-call";
2515
+ data: {
2516
+ name: string;
2517
+ id: string;
2518
+ input: Record<string, any>;
2519
+ };
2520
+ userInputId: string;
2521
+ response: string;
2522
+ changes: {
2523
+ path: string;
2524
+ type: "file" | "patch";
2525
+ content: string;
2526
+ }[];
2527
+ changesAlreadyApplied: {
2528
+ path: string;
2529
+ type: "file" | "patch";
2530
+ content: string;
2531
+ }[];
2532
+ addedFileVersions: {
2533
+ path: string;
2534
+ content: string;
2535
+ }[];
2536
+ resetFileVersions: boolean;
2537
+ }, {
2538
+ type: "tool-call";
2539
+ data: {
2540
+ name: string;
2541
+ id: string;
2542
+ input: Record<string, any>;
2543
+ };
2544
+ userInputId: string;
2545
+ response: string;
2546
+ changes: {
2547
+ path: string;
2548
+ type: "file" | "patch";
2549
+ content: string;
2550
+ }[];
2551
+ changesAlreadyApplied: {
2552
+ path: string;
2553
+ type: "file" | "patch";
2554
+ content: string;
2555
+ }[];
2556
+ addedFileVersions: {
2557
+ path: string;
2558
+ content: string;
2559
+ }[];
2560
+ resetFileVersions: boolean;
2561
+ }>, z.ZodObject<{
2562
+ type: z.ZodLiteral<"terminal-command-result">;
2563
+ userInputId: z.ZodString;
2564
+ result: z.ZodString;
2565
+ }, "strip", z.ZodTypeAny, {
2566
+ type: "terminal-command-result";
2567
+ result: string;
2568
+ userInputId: string;
2569
+ }, {
2570
+ type: "terminal-command-result";
2571
+ result: string;
2572
+ userInputId: string;
2573
+ }>, z.ZodObject<{
2574
+ type: z.ZodLiteral<"npm-version-status">;
2575
+ isUpToDate: z.ZodBoolean;
2576
+ latestVersion: z.ZodString;
2577
+ }, "strip", z.ZodTypeAny, {
2578
+ type: "npm-version-status";
2579
+ isUpToDate: boolean;
2580
+ latestVersion: string;
2581
+ }, {
2582
+ type: "npm-version-status";
2583
+ isUpToDate: boolean;
2584
+ latestVersion: string;
2585
+ }>, z.ZodObject<z.objectUtil.extendShape<{
2586
+ type: z.ZodLiteral<"init-response">;
2587
+ }, Omit<{
2588
+ type: z.ZodLiteral<"usage-response">;
2589
+ usage: z.ZodNumber;
2590
+ remainingBalance: z.ZodNumber;
2591
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
2592
+ next_quota_reset: z.ZodNullable<z.ZodDate>;
2593
+ autoTopupAdded: z.ZodOptional<z.ZodNumber>;
2594
+ }, "type">>, "strip", z.ZodTypeAny, {
2595
+ type: "init-response";
2596
+ usage: number;
2597
+ remainingBalance: number;
2598
+ next_quota_reset: Date | null;
2599
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
2600
+ autoTopupAdded?: number | undefined;
2601
+ }, {
2602
+ type: "init-response";
2603
+ usage: number;
2604
+ remainingBalance: number;
2605
+ next_quota_reset: Date | null;
2606
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
2607
+ autoTopupAdded?: number | undefined;
2608
+ }>, z.ZodObject<{
2609
+ type: z.ZodLiteral<"usage-response">;
2610
+ usage: z.ZodNumber;
2611
+ remainingBalance: z.ZodNumber;
2612
+ balanceBreakdown: z.ZodOptional<z.ZodRecord<z.ZodEnum<["free", ...("free" | "referral" | "purchase" | "admin" | "organization")[]]>, z.ZodNumber>>;
2613
+ next_quota_reset: z.ZodNullable<z.ZodDate>;
2614
+ autoTopupAdded: z.ZodOptional<z.ZodNumber>;
2615
+ }, "strip", z.ZodTypeAny, {
2616
+ type: "usage-response";
2617
+ usage: number;
2618
+ remainingBalance: number;
2619
+ next_quota_reset: Date | null;
2620
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
2621
+ autoTopupAdded?: number | undefined;
2622
+ }, {
2623
+ type: "usage-response";
2624
+ usage: number;
2625
+ remainingBalance: number;
2626
+ next_quota_reset: Date | null;
2627
+ balanceBreakdown?: Partial<Record<"free" | "referral" | "purchase" | "admin" | "organization", number>> | undefined;
2628
+ autoTopupAdded?: number | undefined;
2629
+ }>, z.ZodObject<{
2630
+ type: z.ZodLiteral<"message-cost-response">;
2631
+ promptId: z.ZodString;
2632
+ credits: z.ZodNumber;
2633
+ }, "strip", z.ZodTypeAny, {
2634
+ type: "message-cost-response";
2635
+ promptId: string;
2636
+ credits: number;
2637
+ }, {
2638
+ type: "message-cost-response";
2639
+ promptId: string;
2640
+ credits: number;
2641
+ }>, z.ZodObject<{
2642
+ type: z.ZodLiteral<"action-error">;
2643
+ message: z.ZodString;
2644
+ error: z.ZodOptional<z.ZodString>;
2645
+ remainingBalance: z.ZodOptional<z.ZodNumber>;
2646
+ }, "strip", z.ZodTypeAny, {
2647
+ message: string;
2648
+ type: "action-error";
2649
+ remainingBalance?: number | undefined;
2650
+ error?: string | undefined;
2651
+ }, {
2652
+ message: string;
2653
+ type: "action-error";
2654
+ remainingBalance?: number | undefined;
2655
+ error?: string | undefined;
2656
+ }>, z.ZodObject<{
2657
+ type: z.ZodLiteral<"commit-message-response">;
2658
+ commitMessage: z.ZodString;
2659
+ }, "strip", z.ZodTypeAny, {
2660
+ type: "commit-message-response";
2661
+ commitMessage: string;
2662
+ }, {
2663
+ type: "commit-message-response";
2664
+ commitMessage: string;
2665
+ }>, z.ZodObject<{
2666
+ type: z.ZodLiteral<"request-reconnect">;
2667
+ }, "strip", z.ZodTypeAny, {
2668
+ type: "request-reconnect";
2669
+ }, {
2670
+ type: "request-reconnect";
2671
+ }>]>;
2672
+ export type ServerAction = z.infer<typeof SERVER_ACTION_SCHEMA>;
2673
+ //# sourceMappingURL=actions.d.ts.map