sparkecoder 0.1.32 → 0.1.34
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 +10 -10
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +48 -17
- package/dist/cli.js.map +1 -1
- package/dist/{index-CsZVebwZ.d.ts → index-BSbFzE22.d.ts} +2 -2
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/index.js.map +1 -1
- package/dist/{search-Bk0sOPXw.d.ts → search-CrICQDSa.d.ts} +4 -4
- package/dist/server/index.js +10 -10
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +3 -3
- package/dist/tools/index.js +4 -4
- 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 +7 -7
- package/web/.next/standalone/web/.next/server/app/docs/tools.rsc +5 -5
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +5 -5
- 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 +5 -5
- 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/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
- package/web/.next/standalone/web/.next/static/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.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 +5 -5
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +4 -4
- package/web/.next/standalone/web/src/components/chat-interface.tsx +36 -36
- package/web/.next/static/chunks/{ce505264d78c8eff.js → 9e2f49d8736aeb05.js} +1 -1
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
- /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_buildManifest.js +0 -0
- /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{4Qd7gbyP-9Akkkk8I1vrs → bk6IEoUxuLyCjrNYkiMkB}/_ssgManifest.js +0 -0
package/dist/agent/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import 'ai';
|
|
2
2
|
import '../schema-NcQknWCg.js';
|
|
3
|
-
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, C as ContextManager, M as MessageAttachment, d as buildSystemPrompt } from '../index-
|
|
4
|
-
import '../search-
|
|
3
|
+
export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, C as ContextManager, M as MessageAttachment, d as buildSystemPrompt } from '../index-BSbFzE22.js';
|
|
4
|
+
import '../search-CrICQDSa.js';
|
|
5
5
|
import 'zod';
|
package/dist/agent/index.js
CHANGED
|
@@ -3078,7 +3078,7 @@ function createSearchSubagent(model) {
|
|
|
3078
3078
|
var MAX_RESULT_CHARS = 8e3;
|
|
3079
3079
|
function createSearchTool(options) {
|
|
3080
3080
|
return tool8({
|
|
3081
|
-
description: `Delegate
|
|
3081
|
+
description: `Delegate an explore task to the explore_agent tool. Use this when you need to:
|
|
3082
3082
|
- Find files or code matching a pattern
|
|
3083
3083
|
- Explore the codebase structure
|
|
3084
3084
|
- Search for specific functions, classes, or variables
|
|
@@ -3097,7 +3097,7 @@ Examples:
|
|
|
3097
3097
|
context: z9.string().optional().describe("Optional additional context about why you need this information.")
|
|
3098
3098
|
}),
|
|
3099
3099
|
execute: async ({ query, context }, toolOptions) => {
|
|
3100
|
-
const toolCallId = toolOptions.toolCallId || `
|
|
3100
|
+
const toolCallId = toolOptions.toolCallId || `explore_agent_${Date.now()}`;
|
|
3101
3101
|
await options.onProgress?.({
|
|
3102
3102
|
status: "started",
|
|
3103
3103
|
subagentId: toolCallId
|
|
@@ -3146,7 +3146,7 @@ Context: ${context}` : query;
|
|
|
3146
3146
|
};
|
|
3147
3147
|
}
|
|
3148
3148
|
const searchResult = result.result;
|
|
3149
|
-
let formattedResult = `## Explore Results
|
|
3149
|
+
let formattedResult = `## Explore Agent Results
|
|
3150
3150
|
|
|
3151
3151
|
`;
|
|
3152
3152
|
formattedResult += `**Summary:** ${searchResult.summary}
|
|
@@ -3574,7 +3574,7 @@ async function createTools(options) {
|
|
|
3574
3574
|
linter: createLinterTool({
|
|
3575
3575
|
workingDirectory: options.workingDirectory
|
|
3576
3576
|
}),
|
|
3577
|
-
|
|
3577
|
+
explore_agent: createSearchTool({
|
|
3578
3578
|
sessionId: options.sessionId,
|
|
3579
3579
|
workingDirectory: options.workingDirectory,
|
|
3580
3580
|
onProgress: options.onSearchProgress
|
|
@@ -3666,7 +3666,7 @@ You have access to powerful tools for:
|
|
|
3666
3666
|
- **linter**: Check files for type errors and lint issues (TypeScript, JavaScript, TSX, JSX)
|
|
3667
3667
|
- **todo**: Manage your task list to track progress on complex operations
|
|
3668
3668
|
- **load_skill**: Load specialized knowledge documents for specific tasks
|
|
3669
|
-
- **
|
|
3669
|
+
- **explore_agent**: Explore agent for semantic discovery - for exploratory questions and finding code by meaning
|
|
3670
3670
|
|
|
3671
3671
|
|
|
3672
3672
|
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.
|
|
@@ -3760,7 +3760,7 @@ Use this proactively after making code changes to catch errors early.
|
|
|
3760
3760
|
|
|
3761
3761
|
**Choose the right search approach:**
|
|
3762
3762
|
|
|
3763
|
-
1. **Use the \`
|
|
3763
|
+
1. **Use the \`explore_agent\` tool (Explore agent)** for:
|
|
3764
3764
|
- Semantic/exploratory questions: "How does authentication work?", "Where is user data processed?"
|
|
3765
3765
|
- Finding code by meaning or concept, not exact text
|
|
3766
3766
|
- Understanding how features are implemented across multiple files
|
|
@@ -3776,9 +3776,9 @@ Use this proactively after making code changes to catch errors early.
|
|
|
3776
3776
|
- Counting occurrences or listing all matches
|
|
3777
3777
|
|
|
3778
3778
|
**Examples:**
|
|
3779
|
-
- "Where is the API authentication handled?" \u2192 Use \`
|
|
3779
|
+
- "Where is the API authentication handled?" \u2192 Use \`explore_agent\` tool
|
|
3780
3780
|
- "Find all usages of getUserById" \u2192 Use \`rg "getUserById"\`
|
|
3781
|
-
- "How does the payment flow work?" \u2192 Use \`
|
|
3781
|
+
- "How does the payment flow work?" \u2192 Use \`explore_agent\` tool
|
|
3782
3782
|
- "Find files named config" \u2192 Use \`find . -name "*config*"\`
|
|
3783
3783
|
|
|
3784
3784
|
${searchInstructions}
|
|
@@ -3805,7 +3805,7 @@ ${searchInstructions}
|
|
|
3805
3805
|
|
|
3806
3806
|
### Follow these rules to be a good agent for the user:
|
|
3807
3807
|
|
|
3808
|
-
1. Understand first - Read relevant files before making any changes. Use the \`
|
|
3808
|
+
1. Understand first - Read relevant files before making any changes. Use the \`explore_agent\` tool for exploratory questions about how things work, and direct searches (grep/rg) for finding exact strings or file names.
|
|
3809
3809
|
2. Plan for complexity - If the task involves 3+ steps or has meaningful trade-offs, create a todo list to track progress before implementing.
|
|
3810
3810
|
3. Use the right tools - Have specialized tools for reading files, editing code, semantic search via subagents, and running terminal commands. Prefer these over raw shell commands.
|
|
3811
3811
|
4. Work efficiently - When need to do multiple independent things (like reading several files), do them in parallel rather than one at a time.
|
|
@@ -3995,7 +3995,7 @@ var Agent = class _Agent {
|
|
|
3995
3995
|
skillsDirectories: config.resolvedSkillsDirectories,
|
|
3996
3996
|
onBashProgress: options.onToolProgress ? (progress) => options.onToolProgress({ toolName: "bash", data: progress }) : void 0,
|
|
3997
3997
|
onWriteFileProgress: options.onToolProgress ? (progress) => options.onToolProgress({ toolName: "write_file", data: progress }) : void 0,
|
|
3998
|
-
onSearchProgress: options.onToolProgress ? (progress) => options.onToolProgress({ toolName: "
|
|
3998
|
+
onSearchProgress: options.onToolProgress ? (progress) => options.onToolProgress({ toolName: "explore_agent", data: progress }) : void 0
|
|
3999
3999
|
});
|
|
4000
4000
|
}
|
|
4001
4001
|
/**
|