@nextclaw/server 0.10.22 → 0.10.24

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/index.d.ts CHANGED
@@ -1146,6 +1146,7 @@ declare function executeConfigAction(configPath: string, actionId: string, reque
1146
1146
  declare function loadConfigOrDefault(configPath: string): Config;
1147
1147
  declare function updateModel(configPath: string, patch: {
1148
1148
  model?: string;
1149
+ workspace?: string;
1149
1150
  }): ConfigView;
1150
1151
  declare function updateSearch(configPath: string, patch: SearchConfigUpdate): ConfigView["search"];
1151
1152
  declare function updateProvider(configPath: string, providerName: string, patch: ProviderConfigUpdate): ProviderConfigView | null;
package/dist/index.js CHANGED
@@ -556,6 +556,7 @@ import {
556
556
  loadConfig as loadConfig2,
557
557
  saveConfig as saveConfig2,
558
558
  ConfigSchema as ConfigSchema2,
559
+ DEFAULT_WORKSPACE_PATH,
559
560
  probeFeishu,
560
561
  LiteLLMProvider,
561
562
  buildConfigSchema,
@@ -1305,8 +1306,9 @@ function loadConfigOrDefault(configPath) {
1305
1306
  }
1306
1307
  function updateModel(configPath, patch) {
1307
1308
  const config = loadConfigOrDefault(configPath);
1308
- if (typeof patch.model === "string") {
1309
- config.agents.defaults.model = patch.model;
1309
+ if (typeof patch.model === "string") config.agents.defaults.model = patch.model;
1310
+ if (typeof patch.workspace === "string") {
1311
+ config.agents.defaults.workspace = normalizeOptionalString(patch.workspace) ?? DEFAULT_WORKSPACE_PATH;
1310
1312
  }
1311
1313
  const next = ConfigSchema2.parse(config);
1312
1314
  saveConfig2(next, configPath);
@@ -3062,13 +3064,18 @@ var ConfigRoutesController = class {
3062
3064
  return c.json(err("INVALID_BODY", "model is required"), 400);
3063
3065
  }
3064
3066
  const view = updateModel(this.options.configPath, {
3065
- model: body.data.model
3067
+ model: body.data.model,
3068
+ workspace: body.data.workspace
3066
3069
  });
3067
3070
  if (hasModel) {
3068
3071
  this.options.publish({ type: "config.updated", payload: { path: "agents.defaults.model" } });
3069
3072
  }
3073
+ if (typeof body.data.workspace === "string") {
3074
+ this.options.publish({ type: "config.updated", payload: { path: "agents.defaults.workspace" } });
3075
+ }
3070
3076
  return c.json(ok({
3071
- model: view.agents.defaults.model
3077
+ model: view.agents.defaults.model,
3078
+ workspace: view.agents.defaults.workspace
3072
3079
  }));
3073
3080
  };
3074
3081
  updateConfigSearch = async (c) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/server",
3
- "version": "0.10.22",
3
+ "version": "0.10.24",
4
4
  "private": false,
5
5
  "description": "Nextclaw UI/API server.",
6
6
  "type": "module",
@@ -19,10 +19,10 @@
19
19
  "hono": "^4.6.2",
20
20
  "ws": "^8.18.0",
21
21
  "@nextclaw/ncp": "0.3.1",
22
- "@nextclaw/mcp": "0.1.22",
23
- "@nextclaw/core": "0.9.8",
24
22
  "@nextclaw/ncp-http-agent-server": "0.3.1",
23
+ "@nextclaw/core": "0.9.8",
25
24
  "@nextclaw/runtime": "0.2.8",
25
+ "@nextclaw/mcp": "0.1.24",
26
26
  "@nextclaw/openclaw-compat": "0.3.11"
27
27
  },
28
28
  "devDependencies": {