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.
- package/dist/agent/index.d.ts +2 -2
- package/dist/agent/index.js +10 -10
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +48 -17
- package/dist/cli.js.map +1 -1
- package/dist/{index-CsZVebwZ.d.ts → index-BSbFzE22.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/{search-Bk0sOPXw.d.ts → search-CrICQDSa.d.ts} +4 -4
- package/dist/server/index.js +10 -10
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.js +4 -4
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/BUILD_ID +1 -1
- package/web/.next/standalone/web/.next/build-manifest.json +2 -2
- package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.html +7 -7
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.html +3 -3
- package/web/.next/standalone/web/.next/server/app/docs.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__2dbf511a._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__397fadd4._.js +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f764bebe._.js +1 -1
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
- package/web/.next/standalone/web/.next/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
- package/web/.next/standalone/web/.next/static/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
- package/web/.next/standalone/web/src/app/docs/page.mdx +1 -1
- package/web/.next/standalone/web/src/app/docs/tools/page.mdx +5 -5
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +4 -4
- package/web/.next/standalone/web/src/components/chat-interface.tsx +36 -36
- package/web/.next/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
- /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /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
|
-
| `
|
|
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
|
-
###
|
|
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
|
-
|
|
210
|
+
explore_agent({ query: "How does authentication work?" })
|
|
211
211
|
|
|
212
212
|
# Find specific patterns
|
|
213
|
-
|
|
213
|
+
explore_agent({ query: "Where is user data validated?" })
|
|
214
214
|
```
|
|
215
215
|
|
|
216
|
-
**When to use
|
|
217
|
-
- **
|
|
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
|
|
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 ? `
|
|
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: "
|
|
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
|
|
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
|
-
/**
|
|
182
|
-
|
|
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
|
-
//
|
|
799
|
-
if (event.toolName === '
|
|
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]
|
|
811
|
+
console.log('[FRONTEND] Explore agent tool-progress:', data.status, data.stepType || '');
|
|
812
812
|
|
|
813
|
-
// Find existing
|
|
814
|
-
const
|
|
815
|
-
(tc) => tc.toolName === '
|
|
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 (!
|
|
819
|
+
if (!existingExplore) {
|
|
820
820
|
// Progress arrived before tool-input-available - create placeholder
|
|
821
821
|
const placeholderToolCall: ToolCallInfo = {
|
|
822
|
-
toolCallId: `
|
|
823
|
-
toolName: '
|
|
822
|
+
toolCallId: `explore_agent_pending_${Date.now()}`,
|
|
823
|
+
toolName: 'explore_agent',
|
|
824
824
|
input: {},
|
|
825
825
|
status: 'streaming',
|
|
826
|
-
|
|
826
|
+
exploreSteps: [],
|
|
827
827
|
};
|
|
828
828
|
toolCallsRef.current = [...toolCallsRef.current, placeholderToolCall];
|
|
829
829
|
} else {
|
|
830
|
-
// Initialize
|
|
830
|
+
// Initialize explore steps
|
|
831
831
|
toolCallsRef.current = toolCallsRef.current.map((tc) => {
|
|
832
|
-
if (tc.toolName === '
|
|
833
|
-
return { ...tc,
|
|
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
|
|
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 === '
|
|
853
|
-
return { ...tc,
|
|
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
|
|
1017
|
-
const
|
|
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 === '
|
|
1020
|
-
tc.toolCallId.startsWith('
|
|
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
|
|
1049
|
-
|
|
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 (
|
|
1060
|
-
// Replace the
|
|
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 ===
|
|
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
|
-
//
|
|
1778
|
-
if (tc.toolName === '
|
|
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.
|
|
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
|
|
2510
|
-
if (tc.toolName === '
|
|
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.
|
|
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
|
|
2675
|
-
if (tc.toolName === '
|
|
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.
|
|
2682
|
+
steps={tc.exploreSteps}
|
|
2683
2683
|
/>
|
|
2684
2684
|
);
|
|
2685
2685
|
}
|