sparkecoder 0.1.54 → 0.1.56
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 +50 -22
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +50 -22
- package/dist/cli.js.map +1 -1
- package/dist/{index-BYOHniN4.d.ts → index-CqKMYoJv.d.ts} +5 -5
- package/dist/index.d.ts +3 -3
- package/dist/index.js +50 -22
- package/dist/index.js.map +1 -1
- package/dist/{search-DALwmPRX.d.ts → search-CZsTAZ90.d.ts} +6 -6
- package/dist/server/index.js +50 -22
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +36 -21
- 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.js.nft.json +1 -1
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
- 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 +1 -1
- package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
- package/web/.next/standalone/web/.next/server/app/embed/[id]/page.js.nft.json +1 -1
- package/web/.next/standalone/web/.next/server/app/embed/[id]/page_client-reference-manifest.js +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/{2374f_c9e3cd7b._.js → 2374f_05c00b91._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_de035f79._.js → 2374f_1fa4a79a._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_273991ba._.js → 2374f_39f76acc._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_8d018190._.js → 2374f_562d2f4f._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_7b421f78._.js → 2374f_6ced4caf._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_ec997752._.js → 2374f_800db4e3._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_2572135b._.js → 2374f_934cb548._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_5ee28d4c._.js → 2374f_aade2a6d._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_460c0d78._.js → 2374f_ac284eb3._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_a7457131._.js → 2374f_c272cbb4._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_06a5ea48._.js → 2374f_d118a207._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_df3c414e._.js → 2374f_e35df3d7._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_88cbeb7b._.js → 2374f_ef435bac._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_65b86b54._.js → 2374f_f661d73d._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__a87e1c27._.js → [root-of-the-server]__8cdc7b0b._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{[root-of-the-server]__c94aac98._.js → [root-of-the-server]__f44222d9._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{web_b85931da._.js → web_0a13adb9._.js} +2 -2
- 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/{9b4c4424a720586b.js → ca717ddd7c8f37e8.js} +2 -2
- package/web/.next/standalone/web/.next/static/static/chunks/{9b4c4424a720586b.js → ca717ddd7c8f37e8.js} +2 -2
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +7 -9
- package/web/.next/static/chunks/{9b4c4424a720586b.js → ca717ddd7c8f37e8.js} +2 -2
- /package/web/.next/standalone/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → static/yfBGAcI8gI55lwQllPu-z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → static/yfBGAcI8gI55lwQllPu-z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → static/yfBGAcI8gI55lwQllPu-z}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{static/7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{static/7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_ssgManifest.js +0 -0
- /package/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_buildManifest.js +0 -0
- /package/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{7rKMR1VNC_1_vH6S9H5aS → yfBGAcI8gI55lwQllPu-z}/_ssgManifest.js +0 -0
package/dist/tools/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as ai from 'ai';
|
|
2
2
|
import { ToolSet } from 'ai';
|
|
3
|
-
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from '../search-
|
|
4
|
-
export { b as BashToolOptions, d as SearchToolOptions, e as WriteFileToolOptions, c as createBashTool, f as createSearchTool, a as createWriteFileTool } from '../search-
|
|
3
|
+
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from '../search-CZsTAZ90.js';
|
|
4
|
+
export { b as BashToolOptions, d as SearchToolOptions, e as WriteFileToolOptions, c as createBashTool, f as createSearchTool, a as createWriteFileTool } from '../search-CZsTAZ90.js';
|
|
5
5
|
|
|
6
6
|
interface ReadFileToolOptions {
|
|
7
7
|
workingDirectory: string;
|
package/dist/tools/index.js
CHANGED
|
@@ -2956,41 +2956,60 @@ var SearchSubagent = class extends Subagent {
|
|
|
2956
2956
|
this.maxSteps = 10;
|
|
2957
2957
|
}
|
|
2958
2958
|
getSystemPrompt(options) {
|
|
2959
|
-
|
|
2959
|
+
const contextBlock = options.additionalContext ? `
|
|
2960
|
+
## Active Context (from devtools)
|
|
2961
|
+
${options.additionalContext}
|
|
2960
2962
|
|
|
2961
|
-
|
|
2963
|
+
Use this context to understand what the user is currently looking at. If they reference "this page", "this component", "this screen", etc., this context tells you which page/route they mean. Search for files related to this page/route first.
|
|
2964
|
+
` : "";
|
|
2965
|
+
return `You are an Explore agent - a READ-ONLY file search and code analysis specialist. Your job is to find relevant files, understand code structure, and return clear findings to the main agent. You MUST NOT create, modify, or delete any files.
|
|
2962
2966
|
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
-
|
|
2967
|
-
-
|
|
2968
|
-
-
|
|
2967
|
+
Working Directory: ${options.workingDirectory}
|
|
2968
|
+
${contextBlock}
|
|
2969
|
+
## Available Tools
|
|
2970
|
+
- **semantic_search**: Search the codebase by meaning (finds code related to a concept). Use this FIRST when available - it's the fastest way to explore.
|
|
2971
|
+
- **grep**: Search for exact patterns in files using ripgrep. Best for exact symbol/string matches.
|
|
2972
|
+
- **glob**: Find files matching a name pattern. Best for file discovery.
|
|
2973
|
+
- **read_file**: Read contents of a specific file. Use to examine code found in searches.
|
|
2974
|
+
- **list_dir**: List directory contents. Use to understand project structure.
|
|
2969
2975
|
|
|
2970
|
-
## Strategy
|
|
2976
|
+
## Search Strategy
|
|
2971
2977
|
|
|
2972
2978
|
1. **Start with semantic_search** if available - it finds code by meaning, which is the fastest way to explore
|
|
2973
|
-
2. Use grep for exact
|
|
2974
|
-
3.
|
|
2975
|
-
4.
|
|
2979
|
+
2. **Use grep** for exact symbol/string matches (function names, class names, imports)
|
|
2980
|
+
3. **Use glob** for file discovery by name patterns
|
|
2981
|
+
4. **Read key files** to get actual code content and understand context
|
|
2982
|
+
5. **Run searches in PARALLEL** - make multiple tool calls at once to cover different angles simultaneously. This is critical for speed.
|
|
2983
|
+
|
|
2984
|
+
### Tool Selection Guide
|
|
2985
|
+
- Know the exact name? Use **grep** (e.g. \`getUserById\`, \`class AuthService\`)
|
|
2986
|
+
- Exploring a concept? Use **semantic_search** (e.g. "how does authentication work")
|
|
2987
|
+
- Looking for files? Use **glob** (e.g. \`**/*.config.ts\`, \`**/auth/**\`)
|
|
2988
|
+
- Need file content? Use **read_file** with optional line ranges for large files
|
|
2976
2989
|
|
|
2977
2990
|
## CRITICAL: Your text output IS the result
|
|
2978
2991
|
|
|
2979
|
-
The text you write in your responses is what gets sent back to the main agent as the summary. You MUST include:
|
|
2992
|
+
The text you write in your responses is what gets sent back to the main agent as the summary. The main agent has NO other context about what you found. You MUST include:
|
|
2980
2993
|
- **Exact file paths** (relative to working directory)
|
|
2981
2994
|
- **Line numbers** where relevant code is found
|
|
2982
2995
|
- **Key code snippets** showing the important parts
|
|
2983
|
-
- **How pieces connect together**
|
|
2996
|
+
- **How pieces connect together** - explain relationships between files
|
|
2984
2997
|
- **What you actually found**, not just metadata
|
|
2985
2998
|
|
|
2986
2999
|
ALWAYS end with a comprehensive summary of your findings. This summary IS the data that the main agent receives.
|
|
2987
3000
|
|
|
3001
|
+
## Constraints
|
|
3002
|
+
- You are READ-ONLY. Do NOT attempt to create, write, edit, or delete files.
|
|
3003
|
+
- Be fast. Return results quickly. Don't over-explore when you've found what's needed.
|
|
3004
|
+
- Be thorough but efficient. If you find the answer in 2 searches, stop there.
|
|
3005
|
+
- No emojis in output.
|
|
3006
|
+
|
|
2988
3007
|
## Example good output:
|
|
2989
3008
|
"Found the authentication system in src/auth/:
|
|
2990
3009
|
- \`src/auth/provider.ts\` (lines 15-45): AuthProvider class handles JWT token validation
|
|
2991
3010
|
- \`src/auth/middleware.ts\` (lines 8-20): Express middleware that checks auth headers
|
|
2992
3011
|
- \`src/auth/hooks.ts\`: useAuth() hook used by React components
|
|
2993
|
-
The auth flow: middleware validates JWT
|
|
3012
|
+
The auth flow: middleware validates JWT -> provider decodes token -> user context set"
|
|
2994
3013
|
|
|
2995
3014
|
## Example bad output:
|
|
2996
3015
|
"I searched for auth and found some files." (too vague, no paths, no details)
|
|
@@ -3306,14 +3325,10 @@ The Explore agent will explore the codebase and return a summary of findings.
|
|
|
3306
3325
|
This is more thorough than a simple grep because it can follow references and understand context.
|
|
3307
3326
|
It also has access to semantic search to find code by meaning, not just text.
|
|
3308
3327
|
|
|
3309
|
-
|
|
3310
|
-
- "Find all React components that use the useState hook"
|
|
3311
|
-
- "Where is the authentication logic implemented?"
|
|
3312
|
-
- "Find all API routes and their handlers"
|
|
3313
|
-
- "Search for usages of the UserService class"`,
|
|
3328
|
+
CRITICAL: The explore agent has ZERO context. It cannot see the conversation, the user's message, devtools data, or any prior context. You MUST pass ALL relevant context via the "context" parameter. If the user selected a component (component name, file path, HTML, component stack) or there is a <devtools-context> block, you MUST copy that information into the "context" field verbatim. Without it the explore agent is searching blind.`,
|
|
3314
3329
|
inputSchema: z10.object({
|
|
3315
3330
|
query: z10.string().describe("What to search for. Be specific about what you're looking for."),
|
|
3316
|
-
context: z10.string().
|
|
3331
|
+
context: z10.string().describe("ALL context the explore agent needs. It has ZERO context on its own - no conversation history, no devtools data, nothing. You MUST include: any selected component info (name, file path, HTML, component stack), any <devtools-context> block (page URL, path, viewport), and any other relevant details from the user message. The explore agent literally only sees the query and this context field.")
|
|
3317
3332
|
}),
|
|
3318
3333
|
execute: async ({ query, context }, toolOptions) => {
|
|
3319
3334
|
const toolCallId = toolOptions.toolCallId || `explore_agent_${Date.now()}`;
|