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.
Files changed (93) hide show
  1. package/dist/agent/index.js +40 -15
  2. package/dist/agent/index.js.map +1 -1
  3. package/dist/cli.js +40 -15
  4. package/dist/cli.js.map +1 -1
  5. package/dist/index.js +40 -15
  6. package/dist/index.js.map +1 -1
  7. package/dist/server/index.js +40 -15
  8. package/dist/server/index.js.map +1 -1
  9. package/dist/tools/index.js +34 -15
  10. package/dist/tools/index.js.map +1 -1
  11. package/package.json +1 -1
  12. package/web/.next/BUILD_ID +1 -1
  13. package/web/.next/standalone/web/.next/BUILD_ID +1 -1
  14. package/web/.next/standalone/web/.next/build-manifest.json +2 -2
  15. package/web/.next/standalone/web/.next/prerender-manifest.json +3 -3
  16. package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page_client-reference-manifest.js +1 -1
  17. package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -2
  18. package/web/.next/standalone/web/.next/server/app/_global-error.rsc +1 -1
  19. package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  20. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  21. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  22. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  23. package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  24. package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -1
  25. package/web/.next/standalone/web/.next/server/app/_not-found.rsc +1 -1
  26. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  27. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  28. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  29. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  30. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  31. package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  32. package/web/.next/standalone/web/.next/server/app/docs/installation.html +2 -2
  33. package/web/.next/standalone/web/.next/server/app/docs/installation.rsc +1 -1
  34. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +1 -1
  35. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_head.segment.rsc +1 -1
  36. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_index.segment.rsc +1 -1
  37. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +1 -1
  38. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation/__PAGE__.segment.rsc +1 -1
  39. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs/installation.segment.rsc +1 -1
  40. package/web/.next/standalone/web/.next/server/app/docs/installation.segments/docs.segment.rsc +1 -1
  41. package/web/.next/standalone/web/.next/server/app/docs/skills.html +2 -2
  42. package/web/.next/standalone/web/.next/server/app/docs/skills.rsc +1 -1
  43. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +1 -1
  44. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_head.segment.rsc +1 -1
  45. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_index.segment.rsc +1 -1
  46. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +1 -1
  47. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills/__PAGE__.segment.rsc +1 -1
  48. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs/skills.segment.rsc +1 -1
  49. package/web/.next/standalone/web/.next/server/app/docs/skills.segments/docs.segment.rsc +1 -1
  50. package/web/.next/standalone/web/.next/server/app/docs/tools.html +2 -2
  51. package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +1 -1
  52. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +1 -1
  53. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_head.segment.rsc +1 -1
  54. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_index.segment.rsc +1 -1
  55. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +1 -1
  56. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools/__PAGE__.segment.rsc +1 -1
  57. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs/tools.segment.rsc +1 -1
  58. package/web/.next/standalone/web/.next/server/app/docs/tools.segments/docs.segment.rsc +1 -1
  59. package/web/.next/standalone/web/.next/server/app/docs.html +2 -2
  60. package/web/.next/standalone/web/.next/server/app/docs.rsc +1 -1
  61. package/web/.next/standalone/web/.next/server/app/docs.segments/_full.segment.rsc +1 -1
  62. package/web/.next/standalone/web/.next/server/app/docs.segments/_head.segment.rsc +1 -1
  63. package/web/.next/standalone/web/.next/server/app/docs.segments/_index.segment.rsc +1 -1
  64. package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +1 -1
  65. package/web/.next/standalone/web/.next/server/app/docs.segments/docs/__PAGE__.segment.rsc +1 -1
  66. package/web/.next/standalone/web/.next/server/app/docs.segments/docs.segment.rsc +1 -1
  67. package/web/.next/standalone/web/.next/server/app/embed/[id]/page_client-reference-manifest.js +1 -1
  68. package/web/.next/standalone/web/.next/server/app/index.html +1 -1
  69. package/web/.next/standalone/web/.next/server/app/index.rsc +1 -1
  70. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
  71. package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
  72. package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  73. package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  74. package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  75. package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  76. package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a87e1c27._.js +1 -1
  77. package/web/.next/standalone/web/.next/server/pages/404.html +1 -1
  78. package/web/.next/standalone/web/.next/server/pages/500.html +2 -2
  79. package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -1
  80. package/web/.next/standalone/web/.next/server/server-reference-manifest.json +1 -1
  81. package/web/.next/standalone/web/.next/static/{static/chunks/1685d98ff8751ba3.js → chunks/9b4c4424a720586b.js} +6 -6
  82. package/web/.next/{static/chunks/1685d98ff8751ba3.js → standalone/web/.next/static/static/chunks/9b4c4424a720586b.js} +6 -6
  83. package/web/.next/standalone/web/src/components/chat-interface.tsx +42 -16
  84. package/web/.next/{standalone/web/.next/static/chunks/1685d98ff8751ba3.js → static/chunks/9b4c4424a720586b.js} +6 -6
  85. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  86. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  87. /package/web/.next/standalone/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
  88. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  89. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  90. /package/web/.next/standalone/web/.next/static/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
  91. /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_buildManifest.js +0 -0
  92. /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_clientMiddlewareManifest.json +0 -0
  93. /package/web/.next/static/{OpS0l4dUAiyM_f_IQW4mJ → NvcDNpBzx7zCsiSYYtQ3Z}/_ssgManifest.js +0 -0
package/dist/index.js CHANGED
@@ -3825,41 +3825,60 @@ var SearchSubagent = class extends Subagent {
3825
3825
  this.maxSteps = 10;
3826
3826
  }
3827
3827
  getSystemPrompt(options) {
3828
- return `You are an Explore agent for codebase discovery. Your job is to find relevant files, understand code structure, and return clear findings to the main agent.
3828
+ const contextBlock = options.additionalContext ? `
3829
+ ## Active Context (from devtools)
3830
+ ${options.additionalContext}
3829
3831
 
3830
- Working Directory: ${options.workingDirectory}
3832
+ 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.
3833
+ ` : "";
3834
+ 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.
3831
3835
 
3832
- You have these tools available:
3833
- - grep: Search for patterns in files using ripgrep (rg)
3834
- - glob: Find files matching a pattern
3835
- - read_file: Read contents of a specific file
3836
- - list_dir: List directory contents
3837
- - semantic_search: Search the codebase by meaning (finds code related to a concept, not just exact text matches). Use this first when available!
3836
+ Working Directory: ${options.workingDirectory}
3837
+ ${contextBlock}
3838
+ ## Available Tools
3839
+ - **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.
3840
+ - **grep**: Search for exact patterns in files using ripgrep. Best for exact symbol/string matches.
3841
+ - **glob**: Find files matching a name pattern. Best for file discovery.
3842
+ - **read_file**: Read contents of a specific file. Use to examine code found in searches.
3843
+ - **list_dir**: List directory contents. Use to understand project structure.
3838
3844
 
3839
- ## Strategy
3845
+ ## Search Strategy
3840
3846
 
3841
3847
  1. **Start with semantic_search** if available - it finds code by meaning, which is the fastest way to explore
3842
- 2. Use grep for exact pattern matching and glob for file discovery
3843
- 3. Read key files to get actual code content
3844
- 4. Run searches in PARALLEL when possible to cover different angles
3848
+ 2. **Use grep** for exact symbol/string matches (function names, class names, imports)
3849
+ 3. **Use glob** for file discovery by name patterns
3850
+ 4. **Read key files** to get actual code content and understand context
3851
+ 5. **Run searches in PARALLEL** - make multiple tool calls at once to cover different angles simultaneously. This is critical for speed.
3852
+
3853
+ ### Tool Selection Guide
3854
+ - Know the exact name? Use **grep** (e.g. \`getUserById\`, \`class AuthService\`)
3855
+ - Exploring a concept? Use **semantic_search** (e.g. "how does authentication work")
3856
+ - Looking for files? Use **glob** (e.g. \`**/*.config.ts\`, \`**/auth/**\`)
3857
+ - Need file content? Use **read_file** with optional line ranges for large files
3845
3858
 
3846
3859
  ## CRITICAL: Your text output IS the result
3847
3860
 
3848
- The text you write in your responses is what gets sent back to the main agent as the summary. You MUST include:
3861
+ 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:
3849
3862
  - **Exact file paths** (relative to working directory)
3850
3863
  - **Line numbers** where relevant code is found
3851
3864
  - **Key code snippets** showing the important parts
3852
- - **How pieces connect together**
3865
+ - **How pieces connect together** - explain relationships between files
3853
3866
  - **What you actually found**, not just metadata
3854
3867
 
3855
3868
  ALWAYS end with a comprehensive summary of your findings. This summary IS the data that the main agent receives.
3856
3869
 
3870
+ ## Constraints
3871
+ - You are READ-ONLY. Do NOT attempt to create, write, edit, or delete files.
3872
+ - Be fast. Return results quickly. Don't over-explore when you've found what's needed.
3873
+ - Be thorough but efficient. If you find the answer in 2 searches, stop there.
3874
+ - No emojis in output.
3875
+
3857
3876
  ## Example good output:
3858
3877
  "Found the authentication system in src/auth/:
3859
3878
  - \`src/auth/provider.ts\` (lines 15-45): AuthProvider class handles JWT token validation
3860
3879
  - \`src/auth/middleware.ts\` (lines 8-20): Express middleware that checks auth headers
3861
3880
  - \`src/auth/hooks.ts\`: useAuth() hook used by React components
3862
- The auth flow: middleware validates JWT \u2192 provider decodes token \u2192 user context set"
3881
+ The auth flow: middleware validates JWT -> provider decodes token -> user context set"
3863
3882
 
3864
3883
  ## Example bad output:
3865
3884
  "I searched for auth and found some files." (too vague, no paths, no details)
@@ -4519,6 +4538,12 @@ Use this proactively after making code changes to catch errors early.
4519
4538
 
4520
4539
  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.
4521
4540
 
4541
+ **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:
4542
+ - 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.
4543
+ - If there is a \`<devtools-context>\` block with the current page URL, path, and viewport, include that too.
4544
+ - 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.
4545
+ - The explore agent cannot see the conversation history. The \`query\` and \`context\` fields are the ONLY information it receives.
4546
+
4522
4547
  2. **Use direct commands (grep/rg, find)** for:
4523
4548
  - Exact string matches: \`rg "functionName"\`, \`rg "class MyClass"\`
4524
4549
  - Finding files by name: \`find . -name "*.config.ts"\`