sparkecoder 0.1.9 → 0.1.11

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 (180) hide show
  1. package/dist/agent/index.js +768 -34
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/cli.js +850 -120
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +831 -106
  7. package/dist/index.js.map +1 -1
  8. package/dist/server/index.js +831 -106
  9. package/dist/server/index.js.map +1 -1
  10. package/dist/tools/index.d.ts +56 -34
  11. package/dist/tools/index.js +866 -127
  12. package/dist/tools/index.js.map +1 -1
  13. package/package.json +2 -1
  14. package/web/.next/BUILD_ID +1 -1
  15. package/web/.next/build-manifest.json +2 -2
  16. package/web/.next/cache/.previewinfo +1 -1
  17. package/web/.next/cache/.rscinfo +1 -1
  18. package/web/.next/cache/.tsbuildinfo +1 -1
  19. package/web/.next/cache/config.json +3 -3
  20. package/web/.next/dev/cache/.rscinfo +1 -1
  21. package/web/.next/dev/cache/config.json +3 -3
  22. package/web/.next/dev/cache/turbopack/731ace46/00000001.sst +0 -0
  23. package/web/.next/dev/cache/turbopack/731ace46/00000002.sst +0 -0
  24. package/web/.next/dev/cache/turbopack/731ace46/00000004.sst +0 -0
  25. package/web/.next/dev/cache/turbopack/731ace46/00000005.sst +0 -0
  26. package/web/.next/dev/cache/turbopack/731ace46/00000007.meta +0 -0
  27. package/web/.next/dev/cache/turbopack/731ace46/00000008.meta +0 -0
  28. package/web/.next/dev/cache/turbopack/731ace46/00000010.meta +0 -0
  29. package/web/.next/dev/cache/turbopack/731ace46/00000011.sst +0 -0
  30. package/web/.next/dev/cache/turbopack/731ace46/00000012.sst +0 -0
  31. package/web/.next/dev/cache/turbopack/731ace46/00000014.sst +0 -0
  32. package/web/.next/dev/cache/turbopack/731ace46/00000015.sst +0 -0
  33. package/web/.next/dev/cache/turbopack/731ace46/00000017.meta +0 -0
  34. package/web/.next/dev/cache/turbopack/731ace46/00000018.meta +0 -0
  35. package/web/.next/dev/cache/turbopack/731ace46/00000019.meta +0 -0
  36. package/web/.next/dev/cache/turbopack/731ace46/00000020.meta +0 -0
  37. package/web/.next/dev/cache/turbopack/731ace46/00000021.sst +0 -0
  38. package/web/.next/dev/cache/turbopack/731ace46/00000022.sst +0 -0
  39. package/web/.next/dev/cache/turbopack/731ace46/00000023.sst +0 -0
  40. package/web/.next/dev/cache/turbopack/731ace46/{00000029.meta → 00000025.meta} +0 -0
  41. package/web/.next/dev/cache/turbopack/731ace46/00000026.meta +0 -0
  42. package/web/.next/dev/cache/turbopack/731ace46/00000027.sst +0 -0
  43. package/web/.next/dev/cache/turbopack/731ace46/00000028.sst +0 -0
  44. package/web/.next/dev/cache/turbopack/731ace46/00000029.sst +0 -0
  45. package/web/.next/dev/cache/turbopack/731ace46/00000030.meta +0 -0
  46. package/web/.next/dev/cache/turbopack/731ace46/{00000039.meta → 00000031.meta} +0 -0
  47. package/web/.next/dev/cache/turbopack/731ace46/{00000040.meta → 00000032.meta} +0 -0
  48. package/web/.next/dev/cache/turbopack/731ace46/00000033.sst +0 -0
  49. package/web/.next/dev/cache/turbopack/731ace46/00000034.sst +0 -0
  50. package/web/.next/dev/cache/turbopack/731ace46/00000035.sst +0 -0
  51. package/web/.next/dev/cache/turbopack/731ace46/00000036.meta +0 -0
  52. package/web/.next/dev/cache/turbopack/731ace46/00000037.meta +0 -0
  53. package/web/.next/dev/cache/turbopack/731ace46/00000038.meta +0 -0
  54. package/web/.next/dev/cache/turbopack/731ace46/00000039.sst +0 -0
  55. package/web/.next/dev/cache/turbopack/731ace46/00000040.sst +0 -0
  56. package/web/.next/dev/cache/turbopack/731ace46/00000041.sst +0 -0
  57. package/web/.next/dev/cache/turbopack/731ace46/00000042.meta +0 -0
  58. package/web/.next/dev/cache/turbopack/731ace46/{00000045.meta → 00000043.meta} +0 -0
  59. package/web/.next/dev/cache/turbopack/731ace46/00000044.meta +0 -0
  60. package/web/.next/dev/cache/turbopack/731ace46/00000045.sst +0 -0
  61. package/web/.next/dev/cache/turbopack/731ace46/00000046.sst +0 -0
  62. package/web/.next/dev/cache/turbopack/731ace46/00000047.sst +0 -0
  63. package/web/.next/dev/cache/turbopack/731ace46/00000048.meta +0 -0
  64. package/web/.next/dev/cache/turbopack/731ace46/00000049.meta +0 -0
  65. package/web/.next/dev/cache/turbopack/731ace46/00000050.meta +0 -0
  66. package/web/.next/dev/cache/turbopack/731ace46/00000051.sst +0 -0
  67. package/web/.next/dev/cache/turbopack/731ace46/00000052.sst +0 -0
  68. package/web/.next/dev/cache/turbopack/731ace46/00000053.sst +0 -0
  69. package/web/.next/dev/cache/turbopack/731ace46/00000054.meta +0 -0
  70. package/web/.next/dev/cache/turbopack/731ace46/00000055.meta +0 -0
  71. package/web/.next/dev/cache/turbopack/731ace46/00000056.meta +0 -0
  72. package/web/.next/dev/cache/turbopack/731ace46/00000057.sst +0 -0
  73. package/web/.next/dev/cache/turbopack/731ace46/00000058.sst +0 -0
  74. package/web/.next/dev/cache/turbopack/731ace46/00000059.sst +0 -0
  75. package/web/.next/dev/cache/turbopack/731ace46/00000060.meta +0 -0
  76. package/web/.next/dev/cache/turbopack/731ace46/00000061.meta +0 -0
  77. package/web/.next/dev/cache/turbopack/731ace46/00000062.meta +0 -0
  78. package/web/.next/dev/cache/turbopack/731ace46/00000063.sst +0 -0
  79. package/web/.next/dev/cache/turbopack/731ace46/{00000042.sst → 00000064.sst} +0 -0
  80. package/web/.next/dev/cache/turbopack/731ace46/00000065.sst +0 -0
  81. package/web/.next/dev/cache/turbopack/731ace46/00000066.meta +0 -0
  82. package/web/.next/dev/cache/turbopack/731ace46/00000067.meta +0 -0
  83. package/web/.next/dev/cache/turbopack/731ace46/00000068.meta +0 -0
  84. package/web/.next/dev/cache/turbopack/731ace46/00000069.sst +0 -0
  85. package/web/.next/dev/cache/turbopack/731ace46/00000070.sst +0 -0
  86. package/web/.next/dev/cache/turbopack/731ace46/00000071.sst +0 -0
  87. package/web/.next/dev/cache/turbopack/731ace46/00000072.meta +0 -0
  88. package/web/.next/dev/cache/turbopack/731ace46/00000073.meta +0 -0
  89. package/web/.next/dev/cache/turbopack/731ace46/00000074.meta +0 -0
  90. package/web/.next/dev/cache/turbopack/731ace46/00000075.sst +0 -0
  91. package/web/.next/dev/cache/turbopack/731ace46/00000076.sst +0 -0
  92. package/web/.next/dev/cache/turbopack/731ace46/00000077.sst +0 -0
  93. package/web/.next/dev/cache/turbopack/731ace46/00000078.meta +0 -0
  94. package/web/.next/dev/cache/turbopack/731ace46/00000079.meta +0 -0
  95. package/web/.next/dev/cache/turbopack/731ace46/00000080.meta +0 -0
  96. package/web/.next/dev/cache/turbopack/731ace46/CURRENT +0 -0
  97. package/web/.next/dev/cache/turbopack/731ace46/LOG +68 -30
  98. package/web/.next/dev/prerender-manifest.json +3 -3
  99. package/web/.next/dev/server/server-reference-manifest.js +1 -1
  100. package/web/.next/dev/server/server-reference-manifest.json +1 -1
  101. package/web/.next/dev/trace +1 -1
  102. package/web/.next/fallback-build-manifest.json +2 -2
  103. package/web/.next/prerender-manifest.json +3 -3
  104. package/web/.next/server/app/(main)/page_client-reference-manifest.js +1 -1
  105. package/web/.next/server/app/(main)/session/[id]/page.js.nft.json +1 -1
  106. package/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  107. package/web/.next/server/app/_global-error.html +2 -2
  108. package/web/.next/server/app/_global-error.rsc +1 -1
  109. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  110. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  111. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  112. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  113. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  114. package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  115. package/web/.next/server/app/_not-found.html +1 -1
  116. package/web/.next/server/app/_not-found.rsc +2 -2
  117. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  118. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  119. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
  120. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  121. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  122. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  123. package/web/.next/server/app/index.html +1 -1
  124. package/web/.next/server/app/index.rsc +4 -4
  125. package/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
  126. package/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
  127. package/web/.next/server/app/index.segments/_full.segment.rsc +4 -4
  128. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  129. package/web/.next/server/app/index.segments/_index.segment.rsc +2 -2
  130. package/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
  131. package/web/.next/server/chunks/[root-of-the-server]__4e36aa92._.js +1 -1
  132. package/web/.next/server/chunks/[root-of-the-server]__4e36aa92._.js.map +1 -1
  133. package/web/.next/server/chunks/ssr/{2374f__pnpm_aa2ce93b._.js → 2374f__pnpm_43c403e8._.js} +1 -1
  134. package/web/.next/server/chunks/ssr/{2374f__pnpm_2f0d7c45._.js → 2374f__pnpm_5f7087cf._.js} +1 -1
  135. package/web/.next/server/chunks/ssr/{2374f__pnpm_f4abb025._.js → 2374f__pnpm_7cd13576._.js} +1 -1
  136. package/web/.next/server/chunks/ssr/{2374f__pnpm_c7feb274._.js → 2374f__pnpm_9dd8b322._.js} +1 -1
  137. package/web/.next/server/chunks/ssr/{2374f__pnpm_eb87394d._.js → 2374f__pnpm_ca8b3ccf._.js} +2 -2
  138. package/web/.next/server/chunks/ssr/{2374f__pnpm_e04ff5e3._.js → 2374f__pnpm_ce00fd2a._.js} +1 -1
  139. package/web/.next/server/chunks/ssr/{2374f__pnpm_d7f11ceb._.js → 2374f__pnpm_e395e0b5._.js} +1 -1
  140. package/web/.next/server/chunks/ssr/{2374f__pnpm_c03e1359._.js → 2374f__pnpm_f1702ecf._.js} +1 -1
  141. package/web/.next/server/chunks/ssr/{[root-of-the-server]__2dfcd951._.js → [root-of-the-server]__805216cc._.js} +2 -2
  142. package/web/.next/server/chunks/ssr/[root-of-the-server]__805216cc._.js.map +1 -0
  143. package/web/.next/server/chunks/ssr/web_1658d276._.js +1 -1
  144. package/web/.next/server/chunks/ssr/web_1658d276._.js.map +1 -1
  145. package/web/.next/server/chunks/ssr/web_38b8ac39._.js +1 -1
  146. package/web/.next/server/chunks/ssr/web_38b8ac39._.js.map +1 -1
  147. package/web/.next/server/chunks/ssr/web_aaaa7872._.js +1 -1
  148. package/web/.next/server/chunks/ssr/web_aaaa7872._.js.map +1 -1
  149. package/web/.next/server/pages/404.html +1 -1
  150. package/web/.next/server/pages/500.html +2 -2
  151. package/web/.next/server/server-reference-manifest.js +1 -1
  152. package/web/.next/server/server-reference-manifest.json +1 -1
  153. package/web/.next/static/chunks/33150aab64afe27a.css +1 -0
  154. package/web/.next/static/chunks/{64d14a57d96d13ab.js → 62358f9ae3ca4fc3.js} +1 -1
  155. package/web/.next/static/chunks/{f7a8e0e717eeadf2.js → 7441934619c44e53.js} +1 -1
  156. package/web/.next/static/chunks/{dd0466c07795b288.js → 75df31f521796a31.js} +1 -1
  157. package/web/.next/static/chunks/{bf853305cd7a9765.js → fa06da28948df001.js} +3 -3
  158. package/web/.next/trace +1 -1
  159. package/web/.next/trace-build +1 -1
  160. package/web/.next/dev/cache/turbopack/731ace46/00000024.sst +0 -0
  161. package/web/.next/dev/cache/turbopack/731ace46/00000025.sst +0 -0
  162. package/web/.next/dev/cache/turbopack/731ace46/00000028.meta +0 -0
  163. package/web/.next/dev/cache/turbopack/731ace46/00000031.sst +0 -0
  164. package/web/.next/dev/cache/turbopack/731ace46/00000032.sst +0 -0
  165. package/web/.next/dev/cache/turbopack/731ace46/00000043.sst +0 -0
  166. package/web/.next/dev/cache/turbopack/731ace46/00000046.meta +0 -0
  167. package/web/.next/server/chunks/ssr/[root-of-the-server]__2dfcd951._.js.map +0 -1
  168. package/web/.next/static/chunks/7b140db694582cde.css +0 -1
  169. /package/web/.next/dev/cache/turbopack/731ace46/{00000027.meta → 00000024.meta} +0 -0
  170. /package/web/.next/server/chunks/ssr/{2374f__pnpm_aa2ce93b._.js.map → 2374f__pnpm_43c403e8._.js.map} +0 -0
  171. /package/web/.next/server/chunks/ssr/{2374f__pnpm_2f0d7c45._.js.map → 2374f__pnpm_5f7087cf._.js.map} +0 -0
  172. /package/web/.next/server/chunks/ssr/{2374f__pnpm_f4abb025._.js.map → 2374f__pnpm_7cd13576._.js.map} +0 -0
  173. /package/web/.next/server/chunks/ssr/{2374f__pnpm_c7feb274._.js.map → 2374f__pnpm_9dd8b322._.js.map} +0 -0
  174. /package/web/.next/server/chunks/ssr/{2374f__pnpm_eb87394d._.js.map → 2374f__pnpm_ca8b3ccf._.js.map} +0 -0
  175. /package/web/.next/server/chunks/ssr/{2374f__pnpm_e04ff5e3._.js.map → 2374f__pnpm_ce00fd2a._.js.map} +0 -0
  176. /package/web/.next/server/chunks/ssr/{2374f__pnpm_d7f11ceb._.js.map → 2374f__pnpm_e395e0b5._.js.map} +0 -0
  177. /package/web/.next/server/chunks/ssr/{2374f__pnpm_c03e1359._.js.map → 2374f__pnpm_f1702ecf._.js.map} +0 -0
  178. /package/web/.next/static/{O9K30qQQXDEvnesMUBQxo → szyAyOMgs48yag2cwDbXh}/_buildManifest.js +0 -0
  179. /package/web/.next/static/{O9K30qQQXDEvnesMUBQxo → szyAyOMgs48yag2cwDbXh}/_clientMiddlewareManifest.json +0 -0
  180. /package/web/.next/static/{O9K30qQQXDEvnesMUBQxo → szyAyOMgs48yag2cwDbXh}/_ssgManifest.js +0 -0
@@ -33,6 +33,8 @@ declare function createReadFileTool(options: ReadFileToolOptions): ai.Tool<{
33
33
  interface WriteFileToolOptions {
34
34
  workingDirectory: string;
35
35
  sessionId: string;
36
+ /** Enable LSP diagnostics after file edits (default: true) */
37
+ enableLSP?: boolean;
36
38
  }
37
39
  declare function createWriteFileTool(options: WriteFileToolOptions): ai.Tool<{
38
40
  mode: "full" | "str_replace";
@@ -41,6 +43,7 @@ declare function createWriteFileTool(options: WriteFileToolOptions): ai.Tool<{
41
43
  old_string?: string | undefined;
42
44
  new_string?: string | undefined;
43
45
  }, {
46
+ diagnostics?: string | undefined;
44
47
  success: boolean;
45
48
  path: string;
46
49
  relativePath: string;
@@ -51,38 +54,18 @@ declare function createWriteFileTool(options: WriteFileToolOptions): ai.Tool<{
51
54
  error?: undefined;
52
55
  hint?: undefined;
53
56
  filePreview?: undefined;
54
- linesRemoved?: undefined;
55
- linesAdded?: undefined;
56
- lineDelta?: undefined;
57
57
  } | {
58
58
  success: boolean;
59
59
  error: string;
60
60
  hint: string;
61
61
  filePreview: string;
62
- path?: undefined;
63
- relativePath?: undefined;
64
- mode?: undefined;
65
- action?: undefined;
66
- bytesWritten?: undefined;
67
- lineCount?: undefined;
68
- linesRemoved?: undefined;
69
- linesAdded?: undefined;
70
- lineDelta?: undefined;
71
62
  } | {
72
63
  success: boolean;
73
64
  error: string;
74
65
  hint: string;
75
- path?: undefined;
76
- relativePath?: undefined;
77
- mode?: undefined;
78
- action?: undefined;
79
- bytesWritten?: undefined;
80
- lineCount?: undefined;
81
66
  filePreview?: undefined;
82
- linesRemoved?: undefined;
83
- linesAdded?: undefined;
84
- lineDelta?: undefined;
85
67
  } | {
68
+ diagnostics?: string | undefined;
86
69
  success: boolean;
87
70
  path: string;
88
71
  relativePath: string;
@@ -90,26 +73,14 @@ declare function createWriteFileTool(options: WriteFileToolOptions): ai.Tool<{
90
73
  linesRemoved: number;
91
74
  linesAdded: number;
92
75
  lineDelta: number;
93
- action?: undefined;
94
- bytesWritten?: undefined;
95
- lineCount?: undefined;
96
76
  error?: undefined;
97
77
  hint?: undefined;
98
78
  filePreview?: undefined;
99
79
  } | {
100
80
  success: boolean;
101
81
  error: any;
102
- path?: undefined;
103
- relativePath?: undefined;
104
- mode?: undefined;
105
- action?: undefined;
106
- bytesWritten?: undefined;
107
- lineCount?: undefined;
108
82
  hint?: undefined;
109
83
  filePreview?: undefined;
110
- linesRemoved?: undefined;
111
- linesAdded?: undefined;
112
- lineDelta?: undefined;
113
84
  }>;
114
85
 
115
86
  interface TodoToolOptions {
@@ -254,16 +225,67 @@ declare function createLoadSkillTool(options: LoadSkillToolOptions): ai.Tool<{
254
225
  contentLength?: undefined;
255
226
  }>;
256
227
 
228
+ /**
229
+ * Linter Tool
230
+ *
231
+ * Provides the agent with the ability to check files for lint/type errors
232
+ * using the LSP (Language Server Protocol) integration.
233
+ */
234
+ interface LinterToolOptions {
235
+ workingDirectory: string;
236
+ }
237
+ declare function createLinterTool(options: LinterToolOptions): ai.Tool<{
238
+ fix: boolean;
239
+ paths?: string[] | undefined;
240
+ }, {
241
+ success: boolean;
242
+ message: string;
243
+ files: {
244
+ path: string;
245
+ relativePath: string;
246
+ errors: number;
247
+ warnings: number;
248
+ diagnostics: Array<{
249
+ severity: string;
250
+ line: number;
251
+ column: number;
252
+ message: string;
253
+ source?: string;
254
+ code?: string | number;
255
+ }>;
256
+ }[];
257
+ totalErrors: number;
258
+ totalWarnings: number;
259
+ totalInfo: number;
260
+ summary: string | undefined;
261
+ } | {
262
+ success: boolean;
263
+ message: string;
264
+ files: never[];
265
+ totalErrors: number;
266
+ totalWarnings: number;
267
+ error?: undefined;
268
+ } | {
269
+ success: boolean;
270
+ error: any;
271
+ message?: undefined;
272
+ files?: undefined;
273
+ totalErrors?: undefined;
274
+ totalWarnings?: undefined;
275
+ }>;
276
+
257
277
  interface CreateToolsOptions {
258
278
  sessionId: string;
259
279
  workingDirectory: string;
260
280
  skillsDirectories: string[];
261
281
  onBashOutput?: (output: string) => void;
262
282
  onBashProgress?: (progress: BashToolProgress) => void;
283
+ /** Enable LSP diagnostics for file edits (default: true) */
284
+ enableLSP?: boolean;
263
285
  }
264
286
  /**
265
287
  * Create all tools for an agent session
266
288
  */
267
289
  declare function createTools(options: CreateToolsOptions): ToolSet;
268
290
 
269
- export { BashToolProgress, type CreateToolsOptions, type LoadSkillToolOptions, type ReadFileToolOptions, type TodoToolOptions, type WriteFileToolOptions, createLoadSkillTool, createReadFileTool, createTodoTool, createTools, createWriteFileTool };
291
+ export { BashToolProgress, type CreateToolsOptions, type LinterToolOptions, type LoadSkillToolOptions, type ReadFileToolOptions, type TodoToolOptions, type WriteFileToolOptions, createLinterTool, createLoadSkillTool, createReadFileTool, createTodoTool, createTools, createWriteFileTool };