@maintainer-pro/ai-server 0.1.9 → 0.1.10
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/package.json +2 -2
- package/src/server.mjs +5 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maintainer-pro/ai-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.10",
|
|
4
4
|
"description": "Node HTTP server for Maintainer Pro chat. Uses @maintainer-pro/ai-cli to talk to coding agents.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maintainer-pro",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@maintainer-pro/ai-cli": "^0.1.
|
|
33
|
+
"@maintainer-pro/ai-cli": "^0.1.18",
|
|
34
34
|
"@maintainer-pro/ai-ui": "^0.2.12",
|
|
35
35
|
"ws": "^8.21.3"
|
|
36
36
|
},
|
package/src/server.mjs
CHANGED
|
@@ -225,6 +225,7 @@ Logging (env):
|
|
|
225
225
|
* @param {string} [options.dataDir]
|
|
226
226
|
* @param {string} [options.sandboxId]
|
|
227
227
|
* @param {string} [options.label]
|
|
228
|
+
* @param {(info: { conversationId: string, userMessage: string, assistantText: string, workspaceDir: string }) => unknown} [options.onTurnComplete]
|
|
228
229
|
*/
|
|
229
230
|
export async function startAiServer(options = {}) {
|
|
230
231
|
const env = options.env && typeof options.env === "object" ? options.env : {};
|
|
@@ -296,6 +297,10 @@ export async function startAiServer(options = {}) {
|
|
|
296
297
|
sandboxId: sandboxId || undefined,
|
|
297
298
|
db,
|
|
298
299
|
logger,
|
|
300
|
+
onTurnComplete:
|
|
301
|
+
typeof options.onTurnComplete === "function"
|
|
302
|
+
? options.onTurnComplete
|
|
303
|
+
: undefined,
|
|
299
304
|
});
|
|
300
305
|
|
|
301
306
|
function applyCors(req, res) {
|