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
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModelMessage, streamText } from 'ai';
|
|
2
2
|
import { S as Session, b as ToolExecution } from './schema-NcQknWCg.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
|
-
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from './search-
|
|
4
|
+
import { B as BashToolProgress, W as WriteFileProgress, S as SearchToolProgress } from './search-CGYXoS4f.js';
|
|
5
5
|
|
|
6
6
|
declare const ToolApprovalConfigSchema: z.ZodObject<{
|
|
7
7
|
bash: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { R as ResolvedConfig } from './index-
|
|
2
|
-
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, S as SparkcoderConfig, T as ToolApprovalConfig } from './index-
|
|
1
|
+
import { R as ResolvedConfig } from './index-C6EWZ-I9.js';
|
|
2
|
+
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, S as SparkcoderConfig, T as ToolApprovalConfig } from './index-C6EWZ-I9.js';
|
|
3
3
|
export { ServerOptions, createApp, startServer, stopServer } from './server/index.js';
|
|
4
4
|
export { checkpointQueries, closeDatabase, fileBackupQueries, getDb, initDatabase, messageQueries, sessionQueries, skillQueries, todoQueries, toolExecutionQueries } from './db/index.js';
|
|
5
5
|
import { F as FileBackup, C as Checkpoint } from './schema-NcQknWCg.js';
|
|
6
6
|
export { a as Message, M as ModelMessage, S as Session, q as SessionConfig, f as Terminal, T as TodoItem, b as ToolExecution } from './schema-NcQknWCg.js';
|
|
7
7
|
export { createLoadSkillTool, createReadFileTool, createTodoTool, createTools } from './tools/index.js';
|
|
8
|
-
export { c as createBashTool, a as createWriteFileTool } from './search-
|
|
8
|
+
export { c as createBashTool, a as createWriteFileTool } from './search-CGYXoS4f.js';
|
|
9
9
|
import 'ai';
|
|
10
10
|
import 'zod';
|
|
11
11
|
import 'hono/types';
|
package/dist/index.js
CHANGED
|
@@ -3365,13 +3365,13 @@ var MAX_OUTPUT_CHARS4 = 2e4;
|
|
|
3365
3365
|
var MAX_FILE_SIZE2 = 2 * 1024 * 1024;
|
|
3366
3366
|
var SearchSubagent = class extends Subagent {
|
|
3367
3367
|
type = "search";
|
|
3368
|
-
name = "
|
|
3368
|
+
name = "Explore Agent";
|
|
3369
3369
|
constructor(model) {
|
|
3370
3370
|
super(model || SUBAGENT_MODELS.search);
|
|
3371
3371
|
this.maxSteps = 15;
|
|
3372
3372
|
}
|
|
3373
3373
|
getSystemPrompt(options) {
|
|
3374
|
-
return `You are
|
|
3374
|
+
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.
|
|
3375
3375
|
|
|
3376
3376
|
Working Directory: ${options.workingDirectory}
|
|
3377
3377
|
|
|
@@ -3381,9 +3381,9 @@ You have these tools available:
|
|
|
3381
3381
|
- read_file: Read contents of a specific file
|
|
3382
3382
|
- list_dir: List directory contents
|
|
3383
3383
|
|
|
3384
|
-
## Strategy -
|
|
3384
|
+
## Strategy - Explore in Parallel
|
|
3385
3385
|
|
|
3386
|
-
IMPORTANT: When
|
|
3386
|
+
IMPORTANT: When exploring, run MULTIPLE searches in PARALLEL to cover different variations and related terms. Don't explore sequentially - batch your searches together!
|
|
3387
3387
|
|
|
3388
3388
|
For example, if asked "how does authentication work":
|
|
3389
3389
|
- Search for "auth", "login", "session", "jwt", "token" all at once
|
|
@@ -3405,10 +3405,11 @@ For example, if asked "how does authentication work":
|
|
|
3405
3405
|
- Search content: patterns, function names, class names
|
|
3406
3406
|
|
|
3407
3407
|
## Execution Flow
|
|
3408
|
-
1.
|
|
3409
|
-
2.
|
|
3410
|
-
3.
|
|
3411
|
-
4.
|
|
3408
|
+
1. Start broad: list likely directories or entry points if the query is open-ended
|
|
3409
|
+
2. Run 2-4 parallel searches covering different angles of the query
|
|
3410
|
+
3. Review results and identify the most relevant files
|
|
3411
|
+
4. Read the key files to understand the full context
|
|
3412
|
+
5. Provide a clear summary with exact file paths and line numbers
|
|
3412
3413
|
|
|
3413
3414
|
Be efficient - you have limited steps. Maximize coverage with parallel tool calls.
|
|
3414
3415
|
|
|
@@ -3417,6 +3418,7 @@ When done, provide a summary with:
|
|
|
3417
3418
|
- Key files/locations found (with full paths)
|
|
3418
3419
|
- Relevant code snippets showing the important parts
|
|
3419
3420
|
- How the pieces connect together
|
|
3421
|
+
- Suggested next files to inspect (if more depth is needed)
|
|
3420
3422
|
|
|
3421
3423
|
Keep your responses concise and focused on actionable information.`;
|
|
3422
3424
|
}
|
|
@@ -3667,13 +3669,13 @@ function createSearchSubagent(model) {
|
|
|
3667
3669
|
var MAX_RESULT_CHARS = 8e3;
|
|
3668
3670
|
function createSearchTool(options) {
|
|
3669
3671
|
return tool8({
|
|
3670
|
-
description: `Delegate a search task to a specialized
|
|
3672
|
+
description: `Delegate a search task to a specialized Explore agent. Use this when you need to:
|
|
3671
3673
|
- Find files or code matching a pattern
|
|
3672
3674
|
- Explore the codebase structure
|
|
3673
3675
|
- Search for specific functions, classes, or variables
|
|
3674
3676
|
- Understand how a feature is implemented
|
|
3675
3677
|
|
|
3676
|
-
The
|
|
3678
|
+
The Explore agent will explore the codebase and return a summary of findings.
|
|
3677
3679
|
This is more thorough than a simple grep because it can follow references and understand context.
|
|
3678
3680
|
|
|
3679
3681
|
Examples:
|
|
@@ -3735,7 +3737,7 @@ Context: ${context}` : query;
|
|
|
3735
3737
|
};
|
|
3736
3738
|
}
|
|
3737
3739
|
const searchResult = result.result;
|
|
3738
|
-
let formattedResult = `##
|
|
3740
|
+
let formattedResult = `## Explore Results
|
|
3739
3741
|
|
|
3740
3742
|
`;
|
|
3741
3743
|
formattedResult += `**Summary:** ${searchResult.summary}
|
|
@@ -3968,7 +3970,7 @@ async function getIndexStatus(workingDirectory) {
|
|
|
3968
3970
|
workingDirectory,
|
|
3969
3971
|
config.resolvedVectorGateway.namespace
|
|
3970
3972
|
);
|
|
3971
|
-
const isConfigured =
|
|
3973
|
+
const isConfigured = config.resolvedRemoteServer.isConfigured;
|
|
3972
3974
|
if (!namespace) {
|
|
3973
3975
|
return {
|
|
3974
3976
|
namespace: "",
|
|
@@ -4056,7 +4058,7 @@ Returns matching code snippets with file paths, line numbers, and relevance scor
|
|
|
4056
4058
|
if (!client) {
|
|
4057
4059
|
return {
|
|
4058
4060
|
success: false,
|
|
4059
|
-
error:
|
|
4061
|
+
error: "Remote server not configured. Set SPARKECODER_REMOTE_URL/SPARKECODER_AUTH_KEY or run sparkecoder to register."
|
|
4060
4062
|
};
|
|
4061
4063
|
}
|
|
4062
4064
|
try {
|
|
@@ -4255,7 +4257,7 @@ You have access to powerful tools for:
|
|
|
4255
4257
|
- **linter**: Check files for type errors and lint issues (TypeScript, JavaScript, TSX, JSX)
|
|
4256
4258
|
- **todo**: Manage your task list to track progress on complex operations
|
|
4257
4259
|
- **load_skill**: Load specialized knowledge documents for specific tasks
|
|
4258
|
-
- **search**:
|
|
4260
|
+
- **search**: Explore agent for semantic discovery - for exploratory questions and finding code by meaning
|
|
4259
4261
|
|
|
4260
4262
|
|
|
4261
4263
|
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.
|
|
@@ -4349,14 +4351,14 @@ Use this proactively after making code changes to catch errors early.
|
|
|
4349
4351
|
|
|
4350
4352
|
**Choose the right search approach:**
|
|
4351
4353
|
|
|
4352
|
-
1. **Use the \`search\` tool (
|
|
4354
|
+
1. **Use the \`search\` tool (Explore agent)** for:
|
|
4353
4355
|
- Semantic/exploratory questions: "How does authentication work?", "Where is user data processed?"
|
|
4354
4356
|
- Finding code by meaning or concept, not exact text
|
|
4355
4357
|
- Understanding how features are implemented across multiple files
|
|
4356
4358
|
- Exploring unfamiliar parts of the codebase
|
|
4357
4359
|
- Questions like "where", "how", "what does X do"
|
|
4358
4360
|
|
|
4359
|
-
The
|
|
4361
|
+
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.
|
|
4360
4362
|
|
|
4361
4363
|
2. **Use direct commands (grep/rg, find)** for:
|
|
4362
4364
|
- Exact string matches: \`rg "functionName"\`, \`rg "class MyClass"\`
|