sparkecoder 0.1.11 → 0.1.13

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 (121) hide show
  1. package/README.md +30 -1
  2. package/dist/agent/index.d.ts +1 -1
  3. package/dist/agent/index.js +16 -3
  4. package/dist/agent/index.js.map +1 -1
  5. package/dist/cli.js +32 -11
  6. package/dist/cli.js.map +1 -1
  7. package/dist/{index-BeKylVnB.d.ts → index-BzedNBK-.d.ts} +6 -0
  8. package/dist/index.d.ts +2 -2
  9. package/dist/index.js +26 -7
  10. package/dist/index.js.map +1 -1
  11. package/dist/server/index.d.ts +1 -0
  12. package/dist/server/index.js +26 -7
  13. package/dist/server/index.js.map +1 -1
  14. package/dist/tools/index.js +5 -2
  15. package/dist/tools/index.js.map +1 -1
  16. package/package.json +1 -1
  17. package/web/.next/BUILD_ID +1 -1
  18. package/web/.next/build-manifest.json +2 -2
  19. package/web/.next/cache/.previewinfo +1 -1
  20. package/web/.next/cache/.rscinfo +1 -1
  21. package/web/.next/cache/config.json +3 -3
  22. package/web/.next/dev/cache/.rscinfo +1 -1
  23. package/web/.next/dev/cache/config.json +3 -3
  24. package/web/.next/dev/cache/turbopack/731ace46/00000001.sst +0 -0
  25. package/web/.next/dev/cache/turbopack/731ace46/00000002.sst +0 -0
  26. package/web/.next/dev/cache/turbopack/731ace46/00000004.sst +0 -0
  27. package/web/.next/dev/cache/turbopack/731ace46/00000005.sst +0 -0
  28. package/web/.next/dev/cache/turbopack/731ace46/00000006.meta +0 -0
  29. package/web/.next/dev/cache/turbopack/731ace46/00000007.meta +0 -0
  30. package/web/.next/dev/cache/turbopack/731ace46/00000008.meta +0 -0
  31. package/web/.next/dev/cache/turbopack/731ace46/00000010.meta +0 -0
  32. package/web/.next/dev/cache/turbopack/731ace46/00000011.sst +0 -0
  33. package/web/.next/dev/cache/turbopack/731ace46/00000012.sst +0 -0
  34. package/web/.next/dev/cache/turbopack/731ace46/00000014.sst +0 -0
  35. package/web/.next/dev/cache/turbopack/731ace46/00000015.sst +0 -0
  36. package/web/.next/dev/cache/turbopack/731ace46/00000017.meta +0 -0
  37. package/web/.next/dev/cache/turbopack/731ace46/00000018.meta +0 -0
  38. package/web/.next/dev/cache/turbopack/731ace46/00000019.meta +0 -0
  39. package/web/.next/dev/cache/turbopack/731ace46/00000020.meta +0 -0
  40. package/web/.next/dev/cache/turbopack/731ace46/00000021.sst +0 -0
  41. package/web/.next/dev/cache/turbopack/731ace46/00000022.sst +0 -0
  42. package/web/.next/dev/cache/turbopack/731ace46/00000025.meta +0 -0
  43. package/web/.next/dev/cache/turbopack/731ace46/00000026.meta +0 -0
  44. package/web/.next/dev/cache/turbopack/731ace46/00000027.sst +0 -0
  45. package/web/.next/dev/cache/turbopack/731ace46/00000028.sst +0 -0
  46. package/web/.next/dev/cache/turbopack/731ace46/00000030.meta +0 -0
  47. package/web/.next/dev/cache/turbopack/731ace46/00000031.meta +0 -0
  48. package/web/.next/dev/cache/turbopack/731ace46/00000032.meta +0 -0
  49. package/web/.next/dev/cache/turbopack/731ace46/00000033.sst +0 -0
  50. package/web/.next/dev/cache/turbopack/731ace46/00000036.meta +0 -0
  51. package/web/.next/dev/cache/turbopack/731ace46/00000037.meta +0 -0
  52. package/web/.next/dev/cache/turbopack/731ace46/00000039.sst +0 -0
  53. package/web/.next/dev/cache/turbopack/731ace46/00000040.sst +0 -0
  54. package/web/.next/dev/cache/turbopack/731ace46/00000043.meta +0 -0
  55. package/web/.next/dev/cache/turbopack/731ace46/00000044.meta +0 -0
  56. package/web/.next/dev/cache/turbopack/731ace46/00000045.sst +0 -0
  57. package/web/.next/dev/cache/turbopack/731ace46/00000046.sst +0 -0
  58. package/web/.next/dev/cache/turbopack/731ace46/00000049.meta +0 -0
  59. package/web/.next/dev/cache/turbopack/731ace46/00000050.meta +0 -0
  60. package/web/.next/dev/cache/turbopack/731ace46/00000051.sst +0 -0
  61. package/web/.next/dev/cache/turbopack/731ace46/00000052.sst +0 -0
  62. package/web/.next/dev/cache/turbopack/731ace46/00000055.meta +0 -0
  63. package/web/.next/dev/cache/turbopack/731ace46/00000056.meta +0 -0
  64. package/web/.next/dev/cache/turbopack/731ace46/00000057.sst +0 -0
  65. package/web/.next/dev/cache/turbopack/731ace46/00000058.sst +0 -0
  66. package/web/.next/dev/cache/turbopack/731ace46/00000061.meta +0 -0
  67. package/web/.next/dev/cache/turbopack/731ace46/00000062.meta +0 -0
  68. package/web/.next/dev/cache/turbopack/731ace46/00000063.sst +0 -0
  69. package/web/.next/dev/cache/turbopack/731ace46/00000064.sst +0 -0
  70. package/web/.next/dev/cache/turbopack/731ace46/00000067.meta +0 -0
  71. package/web/.next/dev/cache/turbopack/731ace46/00000068.meta +0 -0
  72. package/web/.next/dev/cache/turbopack/731ace46/00000069.sst +0 -0
  73. package/web/.next/dev/cache/turbopack/731ace46/00000070.sst +0 -0
  74. package/web/.next/dev/cache/turbopack/731ace46/00000073.meta +0 -0
  75. package/web/.next/dev/cache/turbopack/731ace46/00000074.meta +0 -0
  76. package/web/.next/dev/cache/turbopack/731ace46/CURRENT +0 -0
  77. package/web/.next/dev/cache/turbopack/731ace46/LOG +48 -54
  78. package/web/.next/dev/prerender-manifest.json +3 -3
  79. package/web/.next/dev/server/server-reference-manifest.js +1 -1
  80. package/web/.next/dev/server/server-reference-manifest.json +1 -1
  81. package/web/.next/dev/trace +1 -1
  82. package/web/.next/fallback-build-manifest.json +2 -2
  83. package/web/.next/prerender-manifest.json +3 -3
  84. package/web/.next/server/app/_global-error.html +2 -2
  85. package/web/.next/server/app/_global-error.rsc +1 -1
  86. package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  87. package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  88. package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
  89. package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
  90. package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  91. package/web/.next/server/app/_not-found.html +1 -1
  92. package/web/.next/server/app/_not-found.rsc +1 -1
  93. package/web/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  94. package/web/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
  95. package/web/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  96. package/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  97. package/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  98. package/web/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  99. package/web/.next/server/app/index.html +1 -1
  100. package/web/.next/server/app/index.rsc +1 -1
  101. package/web/.next/server/app/index.segments/!KG1haW4p/__PAGE__.segment.rsc +1 -1
  102. package/web/.next/server/app/index.segments/!KG1haW4p.segment.rsc +1 -1
  103. package/web/.next/server/app/index.segments/_full.segment.rsc +1 -1
  104. package/web/.next/server/app/index.segments/_head.segment.rsc +1 -1
  105. package/web/.next/server/app/index.segments/_index.segment.rsc +1 -1
  106. package/web/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  107. package/web/.next/server/pages/404.html +1 -1
  108. package/web/.next/server/pages/500.html +2 -2
  109. package/web/.next/server/server-reference-manifest.js +1 -1
  110. package/web/.next/server/server-reference-manifest.json +1 -1
  111. package/web/.next/trace +1 -1
  112. package/web/.next/trace-build +1 -1
  113. package/web/.next/dev/cache/turbopack/731ace46/00000075.sst +0 -0
  114. package/web/.next/dev/cache/turbopack/731ace46/00000076.sst +0 -0
  115. package/web/.next/dev/cache/turbopack/731ace46/00000077.sst +0 -0
  116. package/web/.next/dev/cache/turbopack/731ace46/00000078.meta +0 -0
  117. package/web/.next/dev/cache/turbopack/731ace46/00000079.meta +0 -0
  118. package/web/.next/dev/cache/turbopack/731ace46/00000080.meta +0 -0
  119. /package/web/.next/static/{szyAyOMgs48yag2cwDbXh → KPsafGfbr0R7NO2LA3um6}/_buildManifest.js +0 -0
  120. /package/web/.next/static/{szyAyOMgs48yag2cwDbXh → KPsafGfbr0R7NO2LA3um6}/_clientMiddlewareManifest.json +0 -0
  121. /package/web/.next/static/{szyAyOMgs48yag2cwDbXh → KPsafGfbr0R7NO2LA3um6}/_ssgManifest.js +0 -0
package/README.md CHANGED
@@ -129,7 +129,8 @@ Create a `sparkecoder.config.json` file:
129
129
  },
130
130
  "server": {
131
131
  "port": 3141,
132
- "host": "127.0.0.1"
132
+ "host": "127.0.0.1",
133
+ "publicUrl": "http://your-server:3141"
133
134
  }
134
135
  }
135
136
  ```
@@ -146,6 +147,7 @@ Create a `sparkecoder.config.json` file:
146
147
  | `context.autoSummarize` | Enable automatic summarization | `true` |
147
148
  | `server.port` | HTTP server port | `3141` |
148
149
  | `server.host` | HTTP server host | `127.0.0.1` |
150
+ | `server.publicUrl` | Public URL for web UI (Docker/remote) | Auto-detected |
149
151
 
150
152
  ## Tools
151
153
 
@@ -308,6 +310,33 @@ When approval is required:
308
310
  | `SPARKECODER_PORT` | Override server port |
309
311
  | `DATABASE_PATH` | Override database path |
310
312
 
313
+ ## Docker / Remote Access
314
+
315
+ When running SparkECoder in Docker or exposing it to remote clients, you need to configure the public URL so the web UI can connect to the API from the browser.
316
+
317
+ ### CLI Option
318
+
319
+ ```bash
320
+ sparkecoder start --public-url http://your-server:3141
321
+ ```
322
+
323
+ ### Config File
324
+
325
+ ```json
326
+ {
327
+ "server": {
328
+ "port": 3141,
329
+ "host": "0.0.0.0",
330
+ "publicUrl": "http://your-server:3141"
331
+ }
332
+ }
333
+ ```
334
+
335
+ **Notes:**
336
+ - Set `host` to `0.0.0.0` to bind to all interfaces (required for Docker/remote access)
337
+ - Set `publicUrl` to the URL the browser will use to reach the API
338
+ - The web UI receives this URL at startup via `NEXT_PUBLIC_API_URL`
339
+
311
340
  ## Development
312
341
 
313
342
  ```bash
@@ -1,6 +1,6 @@
1
1
  import 'ai';
2
2
  import '../schema-CkrIadxa.js';
3
- export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, C as ContextManager, d as buildSystemPrompt } from '../index-BeKylVnB.js';
3
+ export { A as Agent, a as AgentOptions, b as AgentRunOptions, c as AgentStreamResult, C as ContextManager, d as buildSystemPrompt } from '../index-BzedNBK-.js';
4
4
  import '../bash-CGAqW7HR.js';
5
5
  import 'drizzle-orm/sqlite-core';
6
6
  import 'zod';
@@ -473,7 +473,10 @@ var SparkcoderConfigSchema = z.object({
473
473
  // Server configuration
474
474
  server: z.object({
475
475
  port: z.number().default(3141),
476
- host: z.string().default("127.0.0.1")
476
+ host: z.string().default("127.0.0.1"),
477
+ // Public URL for web UI to connect to API (for Docker/remote access)
478
+ // If not set, defaults to http://{host}:{port}
479
+ publicUrl: z.string().url().optional()
477
480
  }).default({ port: 3141, host: "127.0.0.1" }),
478
481
  // Database path
479
482
  databasePath: z.string().optional().default("./sparkecoder.db")
@@ -1321,7 +1324,7 @@ import {
1321
1324
  createMessageConnection,
1322
1325
  StreamMessageReader,
1323
1326
  StreamMessageWriter
1324
- } from "vscode-jsonrpc/node";
1327
+ } from "vscode-jsonrpc/node.js";
1325
1328
  import { pathToFileURL, fileURLToPath } from "url";
1326
1329
  import { readFile as readFile4 } from "fs/promises";
1327
1330
  import { existsSync as existsSync6 } from "fs";
@@ -2499,7 +2502,7 @@ Use this proactively after making code changes to catch errors early.
2499
2502
  ### Searching and Exploration
2500
2503
  ${searchInstructions}
2501
2504
 
2502
- Follow these principles when designing and implementing software:
2505
+ ###Follow these principles when designing and implementing software:
2503
2506
 
2504
2507
  1. **Modularity** \u2014 Write simple parts connected by clean interfaces
2505
2508
  2. **Clarity** \u2014 Clarity is better than cleverness
@@ -2519,6 +2522,16 @@ Follow these principles when designing and implementing software:
2519
2522
  16. **Diversity** \u2014 Distrust all claims for "one true way"
2520
2523
  17. **Extensibility** \u2014 Design for the future, because it will be here sooner than you think
2521
2524
 
2525
+ ###Follow these ruls to be a good agent for the user:
2526
+
2527
+ 1. Understand first - Read relevant files before making any changes. Use search tools to explore the codebase and understand the existing patterns and structure.
2528
+ 2. Plan for complexity - If the task involves 3+ steps or has meaningful trade-offs, create a todo list to track progress before implementing.
2529
+ 3. Use the right tools - Have specialized tools for reading files, editing code, searching by pattern , running terminal commands, and more. Prefer these over raw shell commands.
2530
+ 4. Work efficiently - When need to do multiple independent things (like reading several files), do them in parallel rather than one at a time.
2531
+ 5. Be direct - Focus on technical accuracy rather than validation. If see issues with an approach or need clarification, say so.
2532
+ 6. Verify my work - After making changes, check for linter errors and fix any introduced.
2533
+ 7. Respect boundaries - Only commit code when explicitly asked, avoid creating unnecessary files, and don't make assumptions about things uncertain about.
2534
+
2522
2535
 
2523
2536
  ### Communication
2524
2537
  - Explain your reasoning and approach