codecane 1.0.269 → 1.0.270

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