@nextclaw/server 0.5.29 → 0.5.30

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
@@ -55,7 +55,6 @@ type AgentProfileView = {
55
55
  default?: boolean;
56
56
  workspace?: string;
57
57
  model?: string;
58
- maxTokens?: number;
59
58
  contextTokens?: number;
60
59
  maxToolIterations?: number;
61
60
  };
@@ -268,7 +267,6 @@ type ConfigView = {
268
267
  defaults: {
269
268
  model: string;
270
269
  workspace?: string;
271
- maxTokens?: number;
272
270
  contextTokens?: number;
273
271
  maxToolIterations?: number;
274
272
  };
@@ -631,7 +629,6 @@ declare function executeConfigAction(configPath: string, actionId: string, reque
631
629
  declare function loadConfigOrDefault(configPath: string): Config;
632
630
  declare function updateModel(configPath: string, patch: {
633
631
  model?: string;
634
- maxTokens?: number;
635
632
  }): ConfigView;
636
633
  declare function updateProvider(configPath: string, providerName: string, patch: ProviderConfigUpdate): ProviderConfigView | null;
637
634
  declare function createCustomProvider(configPath: string, patch?: ProviderConfigUpdate): {
package/dist/index.js CHANGED
@@ -519,9 +519,6 @@ function updateModel(configPath, patch) {
519
519
  if (typeof patch.model === "string") {
520
520
  config.agents.defaults.model = patch.model;
521
521
  }
522
- if (typeof patch.maxTokens === "number" && Number.isFinite(patch.maxTokens)) {
523
- config.agents.defaults.maxTokens = Math.max(1, Math.trunc(patch.maxTokens));
524
- }
525
522
  const next = ConfigSchema.parse(config);
526
523
  saveConfig(next, configPath);
527
524
  return buildConfigView(next);
@@ -2248,23 +2245,17 @@ function createUiRouter(options) {
2248
2245
  return c.json(err("INVALID_BODY", "invalid json body"), 400);
2249
2246
  }
2250
2247
  const hasModel = typeof body.data.model === "string";
2251
- const hasMaxTokens = typeof body.data.maxTokens === "number";
2252
- if (!hasModel && !hasMaxTokens) {
2253
- return c.json(err("INVALID_BODY", "model or maxTokens is required"), 400);
2248
+ if (!hasModel) {
2249
+ return c.json(err("INVALID_BODY", "model is required"), 400);
2254
2250
  }
2255
2251
  const view = updateModel(options.configPath, {
2256
- model: hasModel ? body.data.model : void 0,
2257
- maxTokens: hasMaxTokens ? body.data.maxTokens : void 0
2252
+ model: body.data.model
2258
2253
  });
2259
2254
  if (hasModel) {
2260
2255
  options.publish({ type: "config.updated", payload: { path: "agents.defaults.model" } });
2261
2256
  }
2262
- if (hasMaxTokens) {
2263
- options.publish({ type: "config.updated", payload: { path: "agents.defaults.maxTokens" } });
2264
- }
2265
2257
  return c.json(ok({
2266
- model: view.agents.defaults.model,
2267
- maxTokens: view.agents.defaults.maxTokens
2258
+ model: view.agents.defaults.model
2268
2259
  }));
2269
2260
  });
2270
2261
  app.put("/api/config/providers/:provider", async (c) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nextclaw/server",
3
- "version": "0.5.29",
3
+ "version": "0.5.30",
4
4
  "private": false,
5
5
  "description": "Nextclaw UI/API server.",
6
6
  "type": "module",
@@ -15,10 +15,10 @@
15
15
  ],
16
16
  "dependencies": {
17
17
  "@hono/node-server": "^1.13.3",
18
- "@nextclaw/openclaw-compat": "^0.1.33",
18
+ "@nextclaw/openclaw-compat": "^0.1.34",
19
19
  "hono": "^4.6.2",
20
20
  "ws": "^8.18.0",
21
- "@nextclaw/core": "^0.6.44"
21
+ "@nextclaw/core": "^0.6.45"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^20.17.6",