sparkecoder 0.1.36 → 0.1.37
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 +4 -4
- package/dist/agent/index.js.map +1 -1
- package/dist/cli.js +92 -4
- package/dist/cli.js.map +1 -1
- package/dist/{index-BSbFzE22.d.ts → index-D2eLXP9V.d.ts} +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +92 -4
- package/dist/index.js.map +1 -1
- package/dist/{search-CrICQDSa.d.ts → search-D3Wtf7TJ.d.ts} +1 -1
- package/dist/server/index.js +92 -4
- package/dist/server/index.js.map +1 -1
- package/dist/tools/index.d.ts +2 -2
- 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)/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/(main)/session/[id]/page.js.nft.json +1 -1
- 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/page_client-reference-manifest.js +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 +2 -2
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation/page_client-reference-manifest.js +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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/installation.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +1 -1
- package/web/.next/standalone/web/.next/server/app/docs/skills/page_client-reference-manifest.js +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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/skills.segments/_tree.segment.rsc +2 -2
- 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/page_client-reference-manifest.js +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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_full.segment.rsc +2 -2
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs/tools.segments/_tree.segment.rsc +2 -2
- 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 +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 +2 -2
- package/web/.next/standalone/web/.next/server/app/docs.segments/_tree.segment.rsc +2 -2
- 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/index.html +1 -1
- package/web/.next/standalone/web/.next/server/app/index.rsc +4 -4
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +4 -4
- 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 +2 -2
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_184c536d._.js → 2374f_147b1db0._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_be7e7ab5._.js → 2374f_36dd81aa._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_4efa2a34._.js → 2374f_3eca1553._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_d3aec1c3._.js → 2374f_4d1accac._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_ced8bc96._.js → 2374f_4e2c9d06._.js} +2 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_75261269._.js → 2374f_b30bed04._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_84476e55._.js → 2374f_c99180da._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/{2374f_d7e5f4a0._.js → 2374f_f5998fca._.js} +1 -1
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__a7aab2da._.js +4 -2
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_76ccf09f._.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/{6407c045dfc908fe.js → 1e9fdac31c7fd474.js} +3 -3
- package/web/.next/standalone/web/.next/static/chunks/{165f43d544d3a988.js → 6b8642759b62770c.js} +6 -4
- package/web/.next/standalone/web/.next/static/chunks/f81a19eca278424b.css +1 -0
- package/web/.next/{static/chunks/6407c045dfc908fe.js → standalone/web/.next/static/static/chunks/1e9fdac31c7fd474.js} +3 -3
- package/web/.next/standalone/web/.next/static/static/chunks/{165f43d544d3a988.js → 6b8642759b62770c.js} +6 -4
- package/web/.next/standalone/web/.next/static/static/chunks/f81a19eca278424b.css +1 -0
- package/web/.next/standalone/web/src/components/ai-elements/search-tool.tsx +107 -59
- package/web/.next/standalone/web/src/components/ai-elements/subagent-modal.tsx +116 -172
- package/web/.next/standalone/web/src/components/chat-interface.tsx +68 -3
- package/web/.next/standalone/web/src/lib/api.ts +33 -0
- package/web/.next/{standalone/web/.next/static/static/chunks/6407c045dfc908fe.js → static/chunks/1e9fdac31c7fd474.js} +3 -3
- package/web/.next/static/chunks/{165f43d544d3a988.js → 6b8642759b62770c.js} +6 -4
- package/web/.next/static/chunks/f81a19eca278424b.css +1 -0
- package/web/.next/standalone/web/.next/static/chunks/971d802e445eb147.css +0 -1
- package/web/.next/standalone/web/.next/static/static/chunks/971d802e445eb147.css +0 -1
- package/web/.next/static/chunks/971d802e445eb147.css +0 -1
- /package/web/.next/standalone/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_ssgManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_buildManifest.js +0 -0
- /package/web/.next/standalone/web/.next/static/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/standalone/web/.next/static/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_ssgManifest.js +0 -0
- /package/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_buildManifest.js +0 -0
- /package/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{IF96MaB6ualjuLVOykhqq → Px4gKJACBDiCG6uNwuICG}/_ssgManifest.js +0 -0
|
@@ -203,7 +203,7 @@ interface SearchToolOptions {
|
|
|
203
203
|
* Create the explore_agent tool that spawns a SearchSubagent
|
|
204
204
|
*
|
|
205
205
|
* This tool allows the main agent to delegate explore tasks to a specialized
|
|
206
|
-
* mini-agent that uses a smaller, faster model (Gemini
|
|
206
|
+
* mini-agent that uses a smaller, faster model (Gemini 3 Flash Preview).
|
|
207
207
|
*
|
|
208
208
|
* The subagent has access to:
|
|
209
209
|
* - grep: Search for patterns in files
|
package/dist/server/index.js
CHANGED
|
@@ -822,9 +822,9 @@ function resolveModel(modelId) {
|
|
|
822
822
|
return gateway(modelId.trim());
|
|
823
823
|
}
|
|
824
824
|
var SUBAGENT_MODELS = {
|
|
825
|
-
search: "google/gemini-
|
|
826
|
-
analyze: "google/gemini-
|
|
827
|
-
default: "google/gemini-
|
|
825
|
+
search: "google/gemini-3-flash-preview",
|
|
826
|
+
analyze: "google/gemini-3-flash-preview",
|
|
827
|
+
default: "google/gemini-3-flash-preview"
|
|
828
828
|
};
|
|
829
829
|
|
|
830
830
|
// src/agent/index.ts
|
|
@@ -3182,7 +3182,7 @@ import {
|
|
|
3182
3182
|
} from "ai";
|
|
3183
3183
|
import { nanoid as nanoid2 } from "nanoid";
|
|
3184
3184
|
var Subagent = class {
|
|
3185
|
-
/** Model to use (defaults to gemini-
|
|
3185
|
+
/** Model to use (defaults to gemini-3-flash-preview) */
|
|
3186
3186
|
model;
|
|
3187
3187
|
/** Maximum steps before stopping */
|
|
3188
3188
|
maxSteps = 20;
|
|
@@ -4912,6 +4912,24 @@ ${prompt}` });
|
|
|
4912
4912
|
|
|
4913
4913
|
// src/server/routes/sessions.ts
|
|
4914
4914
|
var sessions = new Hono();
|
|
4915
|
+
var pendingInputStore = /* @__PURE__ */ new Map();
|
|
4916
|
+
var devtoolsContextStore = /* @__PURE__ */ new Map();
|
|
4917
|
+
function cleanupPendingInputs() {
|
|
4918
|
+
const now = Date.now();
|
|
4919
|
+
for (const [sessionId, entry] of pendingInputStore) {
|
|
4920
|
+
if (now - entry.createdAt.getTime() > 5 * 60 * 1e3) {
|
|
4921
|
+
pendingInputStore.delete(sessionId);
|
|
4922
|
+
}
|
|
4923
|
+
}
|
|
4924
|
+
}
|
|
4925
|
+
function cleanupDevtoolsContexts() {
|
|
4926
|
+
const now = Date.now();
|
|
4927
|
+
for (const [sessionId, ctx] of devtoolsContextStore) {
|
|
4928
|
+
if (now - ctx.lastHeartbeat.getTime() > 30 * 1e3) {
|
|
4929
|
+
devtoolsContextStore.delete(sessionId);
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
}
|
|
4915
4933
|
var createSessionSchema = z12.object({
|
|
4916
4934
|
name: z12.string().optional(),
|
|
4917
4935
|
workingDirectory: z12.string().optional(),
|
|
@@ -5135,6 +5153,76 @@ sessions.post("/:id/clear", async (c) => {
|
|
|
5135
5153
|
await agent.clearContext();
|
|
5136
5154
|
return c.json({ success: true, sessionId: id });
|
|
5137
5155
|
});
|
|
5156
|
+
var pendingInputSchema = z12.object({
|
|
5157
|
+
text: z12.string()
|
|
5158
|
+
});
|
|
5159
|
+
sessions.post(
|
|
5160
|
+
"/:id/pending-input",
|
|
5161
|
+
zValidator("json", pendingInputSchema),
|
|
5162
|
+
async (c) => {
|
|
5163
|
+
const id = c.req.param("id");
|
|
5164
|
+
const { text } = c.req.valid("json");
|
|
5165
|
+
const session = await sessionQueries.getById(id);
|
|
5166
|
+
if (!session) {
|
|
5167
|
+
return c.json({ error: "Session not found" }, 404);
|
|
5168
|
+
}
|
|
5169
|
+
pendingInputStore.set(id, { text, createdAt: /* @__PURE__ */ new Date() });
|
|
5170
|
+
cleanupPendingInputs();
|
|
5171
|
+
return c.json({ success: true, sessionId: id });
|
|
5172
|
+
}
|
|
5173
|
+
);
|
|
5174
|
+
sessions.get("/:id/pending-input", async (c) => {
|
|
5175
|
+
const id = c.req.param("id");
|
|
5176
|
+
cleanupPendingInputs();
|
|
5177
|
+
const pending = pendingInputStore.get(id);
|
|
5178
|
+
if (!pending) {
|
|
5179
|
+
return c.json({ hasPendingInput: false, text: null });
|
|
5180
|
+
}
|
|
5181
|
+
pendingInputStore.delete(id);
|
|
5182
|
+
return c.json({
|
|
5183
|
+
hasPendingInput: true,
|
|
5184
|
+
text: pending.text,
|
|
5185
|
+
createdAt: pending.createdAt.toISOString()
|
|
5186
|
+
});
|
|
5187
|
+
});
|
|
5188
|
+
var devtoolsContextSchema = z12.object({
|
|
5189
|
+
url: z12.string(),
|
|
5190
|
+
path: z12.string(),
|
|
5191
|
+
pageName: z12.string().optional()
|
|
5192
|
+
});
|
|
5193
|
+
sessions.post(
|
|
5194
|
+
"/:id/devtools-context",
|
|
5195
|
+
zValidator("json", devtoolsContextSchema),
|
|
5196
|
+
async (c) => {
|
|
5197
|
+
const id = c.req.param("id");
|
|
5198
|
+
const body = c.req.valid("json");
|
|
5199
|
+
devtoolsContextStore.set(id, {
|
|
5200
|
+
url: body.url,
|
|
5201
|
+
path: body.path,
|
|
5202
|
+
pageName: body.pageName || body.path,
|
|
5203
|
+
lastHeartbeat: /* @__PURE__ */ new Date()
|
|
5204
|
+
});
|
|
5205
|
+
cleanupDevtoolsContexts();
|
|
5206
|
+
return c.json({ success: true, sessionId: id });
|
|
5207
|
+
}
|
|
5208
|
+
);
|
|
5209
|
+
sessions.get("/:id/devtools-context", async (c) => {
|
|
5210
|
+
const id = c.req.param("id");
|
|
5211
|
+
cleanupDevtoolsContexts();
|
|
5212
|
+
const ctx = devtoolsContextStore.get(id);
|
|
5213
|
+
if (!ctx) {
|
|
5214
|
+
return c.json({ connected: false, context: null });
|
|
5215
|
+
}
|
|
5216
|
+
return c.json({
|
|
5217
|
+
connected: true,
|
|
5218
|
+
context: {
|
|
5219
|
+
url: ctx.url,
|
|
5220
|
+
path: ctx.path,
|
|
5221
|
+
pageName: ctx.pageName,
|
|
5222
|
+
lastHeartbeat: ctx.lastHeartbeat.toISOString()
|
|
5223
|
+
}
|
|
5224
|
+
});
|
|
5225
|
+
});
|
|
5138
5226
|
sessions.get("/:id/todos", async (c) => {
|
|
5139
5227
|
const id = c.req.param("id");
|
|
5140
5228
|
const session = await sessionQueries.getById(id);
|