sparkecoder 0.1.27 → 0.1.28
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 +18 -16
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +33 -35
- package/dist/cli.js.map +1 -1
- package/dist/{index-CWO1mYcx.d.ts → index-C6EWZ-I9.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +18 -16
- package/dist/index.js.map +1 -1
- package/dist/{search-DApagzr3.d.ts → search-CGYXoS4f.d.ts} +1 -1
- package/dist/server/index.js +18 -16
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- package/dist/tools/index.js +15 -13
- 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 +5 -5
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +4 -4
- 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 +4 -4
- 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/{static/chunks/0cc382a66266188e.js → chunks/ce505264d78c8eff.js} +1 -1
- package/web/.next/{static/chunks/0cc382a66266188e.js → standalone/web/.next/static/static/chunks/ce505264d78c8eff.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 +3 -3
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +3 -3
- package/web/.next/standalone/web/src/components/ai-elements/subagent-modal.tsx +2 -2
- package/web/.next/{standalone/web/.next/static/chunks/0cc382a66266188e.js → static/chunks/ce505264d78c8eff.js} +1 -1
- /package/web/.next/standalone/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_ssgManifest.js +0 -0
- /package/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_buildManifest.js +0 -0
- /package/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{izNDBCFq94JfW7BnJmTC7 → 7lQ63rHHj5A-p0phF3egM}/_ssgManifest.js +0 -0
package/dist/server/index.js
CHANGED
|
@@ -3369,13 +3369,13 @@ var MAX_OUTPUT_CHARS4 = 2e4;
|
|
|
3369
3369
|
var MAX_FILE_SIZE2 = 2 * 1024 * 1024;
|
|
3370
3370
|
var SearchSubagent = class extends Subagent {
|
|
3371
3371
|
type = "search";
|
|
3372
|
-
name = "
|
|
3372
|
+
name = "Explore Agent";
|
|
3373
3373
|
constructor(model) {
|
|
3374
3374
|
super(model || SUBAGENT_MODELS.search);
|
|
3375
3375
|
this.maxSteps = 15;
|
|
3376
3376
|
}
|
|
3377
3377
|
getSystemPrompt(options) {
|
|
3378
|
-
return `You are
|
|
3378
|
+
return `You are an Explore agent for codebase discovery. Your job is to map the structure, find relevant files, and surface connections based on the user's query.
|
|
3379
3379
|
|
|
3380
3380
|
Working Directory: ${options.workingDirectory}
|
|
3381
3381
|
|
|
@@ -3385,9 +3385,9 @@ You have these tools available:
|
|
|
3385
3385
|
- read_file: Read contents of a specific file
|
|
3386
3386
|
- list_dir: List directory contents
|
|
3387
3387
|
|
|
3388
|
-
## Strategy -
|
|
3388
|
+
## Strategy - Explore in Parallel
|
|
3389
3389
|
|
|
3390
|
-
IMPORTANT: When
|
|
3390
|
+
IMPORTANT: When exploring, run MULTIPLE searches in PARALLEL to cover different variations and related terms. Don't explore sequentially - batch your searches together!
|
|
3391
3391
|
|
|
3392
3392
|
For example, if asked "how does authentication work":
|
|
3393
3393
|
- Search for "auth", "login", "session", "jwt", "token" all at once
|
|
@@ -3409,10 +3409,11 @@ For example, if asked "how does authentication work":
|
|
|
3409
3409
|
- Search content: patterns, function names, class names
|
|
3410
3410
|
|
|
3411
3411
|
## Execution Flow
|
|
3412
|
-
1.
|
|
3413
|
-
2.
|
|
3414
|
-
3.
|
|
3415
|
-
4.
|
|
3412
|
+
1. Start broad: list likely directories or entry points if the query is open-ended
|
|
3413
|
+
2. Run 2-4 parallel searches covering different angles of the query
|
|
3414
|
+
3. Review results and identify the most relevant files
|
|
3415
|
+
4. Read the key files to understand the full context
|
|
3416
|
+
5. Provide a clear summary with exact file paths and line numbers
|
|
3416
3417
|
|
|
3417
3418
|
Be efficient - you have limited steps. Maximize coverage with parallel tool calls.
|
|
3418
3419
|
|
|
@@ -3421,6 +3422,7 @@ When done, provide a summary with:
|
|
|
3421
3422
|
- Key files/locations found (with full paths)
|
|
3422
3423
|
- Relevant code snippets showing the important parts
|
|
3423
3424
|
- How the pieces connect together
|
|
3425
|
+
- Suggested next files to inspect (if more depth is needed)
|
|
3424
3426
|
|
|
3425
3427
|
Keep your responses concise and focused on actionable information.`;
|
|
3426
3428
|
}
|
|
@@ -3671,13 +3673,13 @@ function createSearchSubagent(model) {
|
|
|
3671
3673
|
var MAX_RESULT_CHARS = 8e3;
|
|
3672
3674
|
function createSearchTool(options) {
|
|
3673
3675
|
return tool8({
|
|
3674
|
-
description: `Delegate a search task to a specialized
|
|
3676
|
+
description: `Delegate a search task to a specialized Explore agent. Use this when you need to:
|
|
3675
3677
|
- Find files or code matching a pattern
|
|
3676
3678
|
- Explore the codebase structure
|
|
3677
3679
|
- Search for specific functions, classes, or variables
|
|
3678
3680
|
- Understand how a feature is implemented
|
|
3679
3681
|
|
|
3680
|
-
The
|
|
3682
|
+
The Explore agent will explore the codebase and return a summary of findings.
|
|
3681
3683
|
This is more thorough than a simple grep because it can follow references and understand context.
|
|
3682
3684
|
|
|
3683
3685
|
Examples:
|
|
@@ -3739,7 +3741,7 @@ Context: ${context}` : query;
|
|
|
3739
3741
|
};
|
|
3740
3742
|
}
|
|
3741
3743
|
const searchResult = result.result;
|
|
3742
|
-
let formattedResult = `##
|
|
3744
|
+
let formattedResult = `## Explore Results
|
|
3743
3745
|
|
|
3744
3746
|
`;
|
|
3745
3747
|
formattedResult += `**Summary:** ${searchResult.summary}
|
|
@@ -3972,7 +3974,7 @@ async function getIndexStatus(workingDirectory) {
|
|
|
3972
3974
|
workingDirectory,
|
|
3973
3975
|
config.resolvedVectorGateway.namespace
|
|
3974
3976
|
);
|
|
3975
|
-
const isConfigured =
|
|
3977
|
+
const isConfigured = config.resolvedRemoteServer.isConfigured;
|
|
3976
3978
|
if (!namespace) {
|
|
3977
3979
|
return {
|
|
3978
3980
|
namespace: "",
|
|
@@ -4060,7 +4062,7 @@ Returns matching code snippets with file paths, line numbers, and relevance scor
|
|
|
4060
4062
|
if (!client) {
|
|
4061
4063
|
return {
|
|
4062
4064
|
success: false,
|
|
4063
|
-
error:
|
|
4065
|
+
error: "Remote server not configured. Set SPARKECODER_REMOTE_URL/SPARKECODER_AUTH_KEY or run sparkecoder to register."
|
|
4064
4066
|
};
|
|
4065
4067
|
}
|
|
4066
4068
|
try {
|
|
@@ -4259,7 +4261,7 @@ You have access to powerful tools for:
|
|
|
4259
4261
|
- **linter**: Check files for type errors and lint issues (TypeScript, JavaScript, TSX, JSX)
|
|
4260
4262
|
- **todo**: Manage your task list to track progress on complex operations
|
|
4261
4263
|
- **load_skill**: Load specialized knowledge documents for specific tasks
|
|
4262
|
-
- **search**:
|
|
4264
|
+
- **search**: Explore agent for semantic discovery - for exploratory questions and finding code by meaning
|
|
4263
4265
|
|
|
4264
4266
|
|
|
4265
4267
|
IMPORTANT: If you have zero context of where you are working, always explore it first to understand the structure before doing things for the user.
|
|
@@ -4353,14 +4355,14 @@ Use this proactively after making code changes to catch errors early.
|
|
|
4353
4355
|
|
|
4354
4356
|
**Choose the right search approach:**
|
|
4355
4357
|
|
|
4356
|
-
1. **Use the \`search\` tool (
|
|
4358
|
+
1. **Use the \`search\` tool (Explore agent)** for:
|
|
4357
4359
|
- Semantic/exploratory questions: "How does authentication work?", "Where is user data processed?"
|
|
4358
4360
|
- Finding code by meaning or concept, not exact text
|
|
4359
4361
|
- Understanding how features are implemented across multiple files
|
|
4360
4362
|
- Exploring unfamiliar parts of the codebase
|
|
4361
4363
|
- Questions like "where", "how", "what does X do"
|
|
4362
4364
|
|
|
4363
|
-
The
|
|
4365
|
+
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.
|
|
4364
4366
|
|
|
4365
4367
|
2. **Use direct commands (grep/rg, find)** for:
|
|
4366
4368
|
- Exact string matches: \`rg "functionName"\`, \`rg "class MyClass"\`
|