sparkecoder 0.1.53 → 0.1.55
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.js +40 -15
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +40 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.js +40 -15
- package/dist/index.js.map +1 -1
- package/dist/server/index.js +40 -15
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.js +34 -15
- 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 +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_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/[root-of-the-server]__a87e1c27._.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/{static/chunks/1685d98ff8751ba3.js → chunks/9b4c4424a720586b.js} +6 -6
- package/web/.next/{static/chunks/1685d98ff8751ba3.js → standalone/web/.next/static/static/chunks/9b4c4424a720586b.js} +6 -6
- package/web/.next/standalone/web/src/components/chat-interface.tsx +42 -16
- package/web/.next/{standalone/web/.next/static/chunks/1685d98ff8751ba3.js → static/chunks/9b4c4424a720586b.js} +6 -6
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
package/dist/cli.js
CHANGED
|
@@ -4643,41 +4643,60 @@ var SearchSubagent = class extends Subagent {
|
|
|
4643
4643
|
this.maxSteps = 10;
|
|
4644
4644
|
}
|
|
4645
4645
|
getSystemPrompt(options) {
|
|
4646
|
-
|
|
4646
|
+
const contextBlock = options.additionalContext ? `
|
|
4647
|
+
## Active Context (from devtools)
|
|
4648
|
+
${options.additionalContext}
|
|
4647
4649
|
|
|
4648
|
-
|
|
4650
|
+
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.
|
|
4651
|
+
` : "";
|
|
4652
|
+
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.
|
|
4649
4653
|
|
|
4650
|
-
|
|
4651
|
-
|
|
4652
|
-
|
|
4653
|
-
-
|
|
4654
|
-
-
|
|
4655
|
-
-
|
|
4654
|
+
Working Directory: ${options.workingDirectory}
|
|
4655
|
+
${contextBlock}
|
|
4656
|
+
## Available Tools
|
|
4657
|
+
- **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.
|
|
4658
|
+
- **grep**: Search for exact patterns in files using ripgrep. Best for exact symbol/string matches.
|
|
4659
|
+
- **glob**: Find files matching a name pattern. Best for file discovery.
|
|
4660
|
+
- **read_file**: Read contents of a specific file. Use to examine code found in searches.
|
|
4661
|
+
- **list_dir**: List directory contents. Use to understand project structure.
|
|
4656
4662
|
|
|
4657
|
-
## Strategy
|
|
4663
|
+
## Search Strategy
|
|
4658
4664
|
|
|
4659
4665
|
1. **Start with semantic_search** if available - it finds code by meaning, which is the fastest way to explore
|
|
4660
|
-
2. Use grep for exact
|
|
4661
|
-
3.
|
|
4662
|
-
4.
|
|
4666
|
+
2. **Use grep** for exact symbol/string matches (function names, class names, imports)
|
|
4667
|
+
3. **Use glob** for file discovery by name patterns
|
|
4668
|
+
4. **Read key files** to get actual code content and understand context
|
|
4669
|
+
5. **Run searches in PARALLEL** - make multiple tool calls at once to cover different angles simultaneously. This is critical for speed.
|
|
4670
|
+
|
|
4671
|
+
### Tool Selection Guide
|
|
4672
|
+
- Know the exact name? Use **grep** (e.g. \`getUserById\`, \`class AuthService\`)
|
|
4673
|
+
- Exploring a concept? Use **semantic_search** (e.g. "how does authentication work")
|
|
4674
|
+
- Looking for files? Use **glob** (e.g. \`**/*.config.ts\`, \`**/auth/**\`)
|
|
4675
|
+
- Need file content? Use **read_file** with optional line ranges for large files
|
|
4663
4676
|
|
|
4664
4677
|
## CRITICAL: Your text output IS the result
|
|
4665
4678
|
|
|
4666
|
-
The text you write in your responses is what gets sent back to the main agent as the summary. You MUST include:
|
|
4679
|
+
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:
|
|
4667
4680
|
- **Exact file paths** (relative to working directory)
|
|
4668
4681
|
- **Line numbers** where relevant code is found
|
|
4669
4682
|
- **Key code snippets** showing the important parts
|
|
4670
|
-
- **How pieces connect together**
|
|
4683
|
+
- **How pieces connect together** - explain relationships between files
|
|
4671
4684
|
- **What you actually found**, not just metadata
|
|
4672
4685
|
|
|
4673
4686
|
ALWAYS end with a comprehensive summary of your findings. This summary IS the data that the main agent receives.
|
|
4674
4687
|
|
|
4688
|
+
## Constraints
|
|
4689
|
+
- You are READ-ONLY. Do NOT attempt to create, write, edit, or delete files.
|
|
4690
|
+
- Be fast. Return results quickly. Don't over-explore when you've found what's needed.
|
|
4691
|
+
- Be thorough but efficient. If you find the answer in 2 searches, stop there.
|
|
4692
|
+
- No emojis in output.
|
|
4693
|
+
|
|
4675
4694
|
## Example good output:
|
|
4676
4695
|
"Found the authentication system in src/auth/:
|
|
4677
4696
|
- \`src/auth/provider.ts\` (lines 15-45): AuthProvider class handles JWT token validation
|
|
4678
4697
|
- \`src/auth/middleware.ts\` (lines 8-20): Express middleware that checks auth headers
|
|
4679
4698
|
- \`src/auth/hooks.ts\`: useAuth() hook used by React components
|
|
4680
|
-
The auth flow: middleware validates JWT
|
|
4699
|
+
The auth flow: middleware validates JWT -> provider decodes token -> user context set"
|
|
4681
4700
|
|
|
4682
4701
|
## Example bad output:
|
|
4683
4702
|
"I searched for auth and found some files." (too vague, no paths, no details)
|
|
@@ -5337,6 +5356,12 @@ Use this proactively after making code changes to catch errors early.
|
|
|
5337
5356
|
|
|
5338
5357
|
The Explore agent is a mini-agent that intelligently explores the codebase, reads relevant files, and returns a summary of what it found. It's best for understanding and discovery.
|
|
5339
5358
|
|
|
5359
|
+
**IMPORTANT: The Explore agent has NO context on its own.** When you call \`explore_agent\`, you MUST pass along any relevant context the user has given you via the \`context\` parameter. In particular:
|
|
5360
|
+
- If the user selected a component via devtools (you'll see component name, file path, HTML, component stack in their message), pass ALL of that to the explore agent's \`context\` field.
|
|
5361
|
+
- If there is a \`<devtools-context>\` block with the current page URL, path, and viewport, include that too.
|
|
5362
|
+
- If the user references "this page", "this component", "this button", etc., the explore agent needs the component name, file path, and page path to know what to search for.
|
|
5363
|
+
- The explore agent cannot see the conversation history. The \`query\` and \`context\` fields are the ONLY information it receives.
|
|
5364
|
+
|
|
5340
5365
|
2. **Use direct commands (grep/rg, find)** for:
|
|
5341
5366
|
- Exact string matches: \`rg "functionName"\`, \`rg "class MyClass"\`
|
|
5342
5367
|
- Finding files by name: \`find . -name "*.config.ts"\`
|