sparkecoder 0.1.32 → 0.1.34

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 (102) hide show
  1. package/dist/agent/index.d.ts +2 -2
  2. package/dist/agent/index.js +10 -10
  3. package/dist/agent/index.js.map +1 -1
  4. package/dist/cli.js +48 -17
  5. package/dist/cli.js.map +1 -1
  6. package/dist/{index-CsZVebwZ.d.ts → index-BSbFzE22.d.ts} +2 -2
  7. package/dist/index.d.ts +3 -3
  8. package/dist/index.js +10 -10
  9. package/dist/index.js.map +1 -1
  10. package/dist/{search-Bk0sOPXw.d.ts → search-CrICQDSa.d.ts} +4 -4
  11. package/dist/server/index.js +10 -10
  12. package/dist/server/index.js.map +1 -1
  13. package/dist/tools/index.d.ts +3 -3
  14. package/dist/tools/index.js +4 -4
  15. package/dist/tools/index.js.map +1 -1
  16. package/package.json +1 -1
  17. package/web/.next/BUILD_ID +1 -1
  18. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  19. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  20. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  21. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  22. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  23. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  24. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  25. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  26. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  27. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  28. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  29. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  30. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
  31. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  32. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  33. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  34. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  35. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  36. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  37. package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
  38. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
  42. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
  45. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
  46. package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
  47. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
  48. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
  49. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
  50. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
  51. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
  52. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
  53. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
  54. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
  55. package/web/.next/standalone/web/.next/server/app/docs/tools.html +7 -7
  56. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +5 -5
  57. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +5 -5
  58. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
  59. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
  60. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
  61. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +5 -5
  62. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
  63. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
  64. package/web/.next/standalone/web/.next/server/app/docs.html +3 -3
  65. package/web/.next/standalone/web/.next/server/app/docs.rsc +2 -2
  66. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +2 -2
  67. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  68. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
  69. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  70. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
  71. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  72. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  73. package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
  74. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
  75. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
  76. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  77. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  78. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  79. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  80. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2dbf511a._.js +1 -1
  81. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +1 -1
  82. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f764bebe._.js +1 -1
  83. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  84. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  85. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  86. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  87. package/web/.next/standalone/web/.next/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
  88. package/web/.next/standalone/web/.next/static/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
  89. package/web/.next/standalone/web/src/app/docs/page.mdx +1 -1
  90. package/web/.next/standalone/web/src/app/docs/tools/page.mdx +5 -5
  91. package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +4 -4
  92. package/web/.next/standalone/web/src/components/chat-interface.tsx +36 -36
  93. package/web/.next/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
  94. /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
  95. /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
  96. /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
  97. /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
  98. /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
  99. /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
  100. /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
  101. /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
  102. /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
@@ -54,7 +54,7 @@ The agent has access to several built-in tools:
54
54
  | `linter` | Check for type errors and lint issues |
55
55
  | `todo` | Track tasks and progress |
56
56
  | `load_skill` | Load specialized knowledge |
57
- | `search` | Explore agent for semantic discovery across codebase |
57
+ | `explore_agent` | Explore agent for semantic discovery across codebase |
58
58
 
59
59
  ### Skills
60
60
 
@@ -193,7 +193,7 @@ load_skill({
193
193
 
194
194
  ---
195
195
 
196
- ### search
196
+ ### explore_agent
197
197
 
198
198
  Explore agent for semantic discovery across your codebase.
199
199
 
@@ -207,14 +207,14 @@ Explore agent for semantic discovery across your codebase.
207
207
 
208
208
  ```
209
209
  # Exploratory search (Explore agent)
210
- search({ query: "How does authentication work?" })
210
+ explore_agent({ query: "How does authentication work?" })
211
211
 
212
212
  # Find specific patterns
213
- search({ query: "Where is user data validated?" })
213
+ explore_agent({ query: "Where is user data validated?" })
214
214
  ```
215
215
 
216
- **When to use search (Explore agent) vs grep:**
217
- - **search** - "How does X work?", "Where is Y implemented?"
216
+ **When to use explore_agent (Explore agent) vs grep:**
217
+ - **explore_agent** - "How does X work?", "Where is Y implemented?"
218
218
  - **grep/rg** - Exact string matches, symbol names
219
219
 
220
220
  ## Tool Approvals
@@ -99,7 +99,7 @@ export function SearchTool({
99
99
  const isCompleted = status === "completed";
100
100
  const isError = status === "error" || output?.success === false;
101
101
 
102
- // Auto-open modal when search starts (optional - can be removed if not desired)
102
+ // Auto-open modal when exploration starts (optional - can be removed if not desired)
103
103
  useEffect(() => {
104
104
  if (isLoading && steps.length === 1) {
105
105
  setIsModalOpen(true);
@@ -122,7 +122,7 @@ export function SearchTool({
122
122
  Icon: Loader2Icon,
123
123
  color: "text-blue-600 dark:text-blue-500",
124
124
  iconClass: "animate-spin",
125
- label: steps.length > 0 ? `Searching... (${steps.length} steps)` : "Starting search...",
125
+ label: steps.length > 0 ? `Exploring... (${steps.length} steps)` : "Starting exploration...",
126
126
  };
127
127
  }
128
128
  if (isCompleted && output?.success) {
@@ -138,7 +138,7 @@ export function SearchTool({
138
138
  Icon: XCircleIcon,
139
139
  color: "text-red-600 dark:text-red-500",
140
140
  iconClass: "",
141
- label: "Search failed",
141
+ label: "Explore failed",
142
142
  };
143
143
  }
144
144
  return {
@@ -286,7 +286,7 @@ export function SearchTool({
286
286
  {/* Stats */}
287
287
  <div className="flex items-center gap-4 text-xs text-muted-foreground pt-2 border-t">
288
288
  <span>{output.matchCount || 0} matches</span>
289
- <span>{output.filesSearched || 0} files searched</span>
289
+ <span>{output.filesSearched || 0} files explored</span>
290
290
  <span>{output.stepsCount || 0} steps</span>
291
291
  </div>
292
292
  </div>
@@ -178,8 +178,8 @@ interface ToolCallInfo {
178
178
  liveOldString?: string;
179
179
  /** Live new_string for write_file str_replace mode */
180
180
  liveNewString?: string;
181
- /** Search subagent steps - for live search progress */
182
- searchSteps?: SubagentStep[];
181
+ /** Explore agent steps - for live exploration progress */
182
+ exploreSteps?: SubagentStep[];
183
183
  }
184
184
 
185
185
  /** Attachment stored with user messages */
@@ -795,8 +795,8 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
795
795
  // 'completed' status is handled by the tool-output-available event
796
796
  }
797
797
 
798
- // Search tool progress - stream subagent steps as they happen
799
- if (event.toolName === 'search') {
798
+ // Explore agent progress - stream subagent steps as they happen
799
+ if (event.toolName === 'explore_agent') {
800
800
  const data = event.data as {
801
801
  status: 'started' | 'step' | 'complete' | 'error';
802
802
  subagentId?: string;
@@ -808,36 +808,36 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
808
808
  error?: string;
809
809
  };
810
810
 
811
- console.log('[FRONTEND] Search tool-progress:', data.status, data.stepType || '');
811
+ console.log('[FRONTEND] Explore agent tool-progress:', data.status, data.stepType || '');
812
812
 
813
- // Find existing search tool call that's running/streaming
814
- const existingSearch = toolCallsRef.current.find(
815
- (tc) => tc.toolName === 'search' && (tc.status === 'running' || tc.status === 'streaming')
813
+ // Find existing explore_agent tool call that's running/streaming
814
+ const existingExplore = toolCallsRef.current.find(
815
+ (tc) => tc.toolName === 'explore_agent' && (tc.status === 'running' || tc.status === 'streaming')
816
816
  );
817
817
 
818
818
  if (data.status === 'started') {
819
- if (!existingSearch) {
819
+ if (!existingExplore) {
820
820
  // Progress arrived before tool-input-available - create placeholder
821
821
  const placeholderToolCall: ToolCallInfo = {
822
- toolCallId: `search_pending_${Date.now()}`,
823
- toolName: 'search',
822
+ toolCallId: `explore_agent_pending_${Date.now()}`,
823
+ toolName: 'explore_agent',
824
824
  input: {},
825
825
  status: 'streaming',
826
- searchSteps: [],
826
+ exploreSteps: [],
827
827
  };
828
828
  toolCallsRef.current = [...toolCallsRef.current, placeholderToolCall];
829
829
  } else {
830
- // Initialize search steps
830
+ // Initialize explore steps
831
831
  toolCallsRef.current = toolCallsRef.current.map((tc) => {
832
- if (tc.toolName === 'search' && (tc.status === 'running' || tc.status === 'streaming')) {
833
- return { ...tc, searchSteps: [] };
832
+ if (tc.toolName === 'explore_agent' && (tc.status === 'running' || tc.status === 'streaming')) {
833
+ return { ...tc, exploreSteps: [] };
834
834
  }
835
835
  return tc;
836
836
  });
837
837
  }
838
838
  setCurrentToolCalls([...toolCallsRef.current]);
839
839
  } else if (data.status === 'step' && data.stepType) {
840
- // Add step to the search tool call
840
+ // Add step to the explore_agent tool call
841
841
  const newStep: SubagentStep = {
842
842
  id: `step_${Date.now()}_${Math.random().toString(36).slice(2, 6)}`,
843
843
  type: data.stepType,
@@ -849,8 +849,8 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
849
849
  };
850
850
 
851
851
  toolCallsRef.current = toolCallsRef.current.map((tc) => {
852
- if (tc.toolName === 'search' && (tc.status === 'running' || tc.status === 'streaming')) {
853
- return { ...tc, searchSteps: [...(tc.searchSteps || []), newStep] };
852
+ if (tc.toolName === 'explore_agent' && (tc.status === 'running' || tc.status === 'streaming')) {
853
+ return { ...tc, exploreSteps: [...(tc.exploreSteps || []), newStep] };
854
854
  }
855
855
  return tc;
856
856
  });
@@ -1013,11 +1013,11 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
1013
1013
  )
1014
1014
  : undefined;
1015
1015
 
1016
- // Check for placeholder search tool call created from early progress events
1017
- const placeholderSearch = event.toolName === 'search'
1016
+ // Check for placeholder explore_agent tool call created from early progress events
1017
+ const placeholderExplore = event.toolName === 'explore_agent'
1018
1018
  ? toolCallsRef.current.find(tc =>
1019
- tc.toolName === 'search' &&
1020
- tc.toolCallId.startsWith('search_pending_') &&
1019
+ tc.toolName === 'explore_agent' &&
1020
+ tc.toolCallId.startsWith('explore_agent_pending_') &&
1021
1021
  tc.status === 'streaming'
1022
1022
  )
1023
1023
  : undefined;
@@ -1045,8 +1045,8 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
1045
1045
  liveContent: placeholderWriteFile?.liveContent,
1046
1046
  liveOldString: placeholderWriteFile?.liveOldString,
1047
1047
  liveNewString: placeholderWriteFile?.liveNewString,
1048
- // Preserve search steps from placeholder if it exists
1049
- searchSteps: placeholderSearch?.searchSteps,
1048
+ // Preserve explore steps from placeholder if it exists
1049
+ exploreSteps: placeholderExplore?.exploreSteps,
1050
1050
  };
1051
1051
 
1052
1052
  // Update toolCallsRef
@@ -1056,10 +1056,10 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
1056
1056
  if (tc.toolCallId === placeholderWriteFile.toolCallId) return toolCallInfo;
1057
1057
  return tc;
1058
1058
  });
1059
- } else if (placeholderSearch) {
1060
- // Replace the search placeholder with the real tool call (with real toolCallId)
1059
+ } else if (placeholderExplore) {
1060
+ // Replace the explore_agent placeholder with the real tool call (with real toolCallId)
1061
1061
  toolCallsRef.current = toolCallsRef.current.map((tc) => {
1062
- if (tc.toolCallId === placeholderSearch.toolCallId) return toolCallInfo;
1062
+ if (tc.toolCallId === placeholderExplore.toolCallId) return toolCallInfo;
1063
1063
  return tc;
1064
1064
  });
1065
1065
  } else if (existingToolCall) {
@@ -1774,14 +1774,14 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
1774
1774
  );
1775
1775
  }
1776
1776
 
1777
- // Search tool - use dedicated SearchTool component with subagent steps
1778
- if (tc.toolName === 'search') {
1777
+ // Explore agent tool - use dedicated SearchTool component with subagent steps
1778
+ if (tc.toolName === 'explore_agent') {
1779
1779
  return (
1780
1780
  <SearchTool
1781
1781
  input={tc.input as SearchInput}
1782
1782
  output={tc.output as SearchOutput}
1783
1783
  status={tc.status}
1784
- steps={tc.searchSteps}
1784
+ steps={tc.exploreSteps}
1785
1785
  className="mt-2"
1786
1786
  />
1787
1787
  );
@@ -2506,15 +2506,15 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
2506
2506
  );
2507
2507
  }
2508
2508
 
2509
- // Use dedicated SearchTool component for search
2510
- if (tc.toolName === 'search') {
2509
+ // Use dedicated SearchTool component for explore_agent
2510
+ if (tc.toolName === 'explore_agent') {
2511
2511
  return (
2512
2512
  <SearchTool
2513
2513
  key={item.id}
2514
2514
  input={tc.input as SearchInput}
2515
2515
  output={tc.output as SearchOutput}
2516
2516
  status={tc.status}
2517
- steps={tc.searchSteps}
2517
+ steps={tc.exploreSteps}
2518
2518
  />
2519
2519
  );
2520
2520
  }
@@ -2671,15 +2671,15 @@ export function ChatInterface({ session }: ChatInterfaceProps) {
2671
2671
  );
2672
2672
  }
2673
2673
 
2674
- // Use dedicated SearchTool component for search
2675
- if (tc.toolName === 'search') {
2674
+ // Use dedicated SearchTool component for explore_agent
2675
+ if (tc.toolName === 'explore_agent') {
2676
2676
  return (
2677
2677
  <SearchTool
2678
2678
  key={tc.toolCallId}
2679
2679
  input={tc.input as SearchInput}
2680
2680
  output={tc.output as SearchOutput}
2681
2681
  status={tc.status}
2682
- steps={tc.searchSteps}
2682
+ steps={tc.exploreSteps}
2683
2683
  />
2684
2684
  );
2685
2685
  }