@maintainer-pro/ai-server 0.1.13 → 0.1.14
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 +3 -3
- package/src/server.mjs +11 -1
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.14",
|
|
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,8 +30,8 @@
|
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@maintainer-pro/ai-cli": "^0.1.
|
|
34
|
-
"@maintainer-pro/ai-ui": "^0.2.
|
|
33
|
+
"@maintainer-pro/ai-cli": "^0.1.24",
|
|
34
|
+
"@maintainer-pro/ai-ui": "^0.2.16",
|
|
35
35
|
"ws": "^8.21.3"
|
|
36
36
|
},
|
|
37
37
|
"engines": {
|
package/src/server.mjs
CHANGED
|
@@ -217,6 +217,7 @@ Logging (env):
|
|
|
217
217
|
* @param {object} [options]
|
|
218
218
|
* @param {number} [options.port]
|
|
219
219
|
* @param {string} [options.workspaceDir]
|
|
220
|
+
* @param {string[]} [options.workspaceDirs] Every attached project folder. The agent cwd stays workspaceDir.
|
|
220
221
|
* @param {string} [options.uiDir]
|
|
221
222
|
* @param {string|string[]} [options.corsOrigins]
|
|
222
223
|
* @param {Record<string, string>} [options.env]
|
|
@@ -233,6 +234,10 @@ export async function startAiServer(options = {}) {
|
|
|
233
234
|
const workspaceDir = path.resolve(
|
|
234
235
|
options.workspaceDir || pickEnv(env, "AI_CLI_WORKSPACE") || process.cwd()
|
|
235
236
|
);
|
|
237
|
+
const workspaceDirs = [
|
|
238
|
+
workspaceDir,
|
|
239
|
+
...(Array.isArray(options.workspaceDirs) ? options.workspaceDirs : []),
|
|
240
|
+
].filter((dir) => typeof dir === "string" && dir.trim());
|
|
236
241
|
const sandboxId =
|
|
237
242
|
options.sandboxId || pickEnv(env, "MAINTAINER_PRO_SANDBOX_ID") || "";
|
|
238
243
|
const dataDir = ensureProjectDataDir({
|
|
@@ -291,8 +296,13 @@ export async function startAiServer(options = {}) {
|
|
|
291
296
|
);
|
|
292
297
|
|
|
293
298
|
const handlers = createChatHandler({
|
|
294
|
-
systemPrompt: createDefaultSystemPrompt({
|
|
299
|
+
systemPrompt: createDefaultSystemPrompt({
|
|
300
|
+
productDescription,
|
|
301
|
+
ignorePaths,
|
|
302
|
+
workspaceDirs,
|
|
303
|
+
}),
|
|
295
304
|
workspaceDir,
|
|
305
|
+
workspaceDirs,
|
|
296
306
|
dataDir,
|
|
297
307
|
sandboxId: sandboxId || undefined,
|
|
298
308
|
db,
|