@nfreeness/clawdbot 0.124.21704 → 0.124.21802

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.
@@ -2,14 +2,18 @@ import { normalizeProviderId } from "./model-selection.js";
2
2
  const CLAUDE_MODEL_ALIASES = {
3
3
  opus: "opus",
4
4
  "opus-4.5": "opus",
5
+ "opus-4.6": "opus",
5
6
  "opus-4": "opus",
6
7
  "claude-opus-4-5": "opus",
8
+ "claude-opus-4-6": "opus",
7
9
  "claude-opus-4": "opus",
8
10
  sonnet: "sonnet",
9
11
  "sonnet-4.5": "sonnet",
12
+ "sonnet-4.6": "sonnet",
10
13
  "sonnet-4.1": "sonnet",
11
14
  "sonnet-4.0": "sonnet",
12
15
  "claude-sonnet-4-5": "sonnet",
16
+ "claude-sonnet-4-6": "sonnet",
13
17
  "claude-sonnet-4-1": "sonnet",
14
18
  "claude-sonnet-4-0": "sonnet",
15
19
  haiku: "haiku",
@@ -1,6 +1,7 @@
1
1
  const ANTHROPIC_PREFIXES = [
2
2
  "claude-opus-4-6",
3
3
  "claude-opus-4-5",
4
+ "claude-sonnet-4-6",
4
5
  "claude-sonnet-4-5",
5
6
  "claude-haiku-4-5",
6
7
  ];
@@ -217,11 +217,11 @@ async function probeImage(model, apiKey, timeoutMs) {
217
217
  }
218
218
  }
219
219
  function ensureImageInput(model) {
220
- if (model.input.includes("image"))
220
+ if (model.input?.includes("image"))
221
221
  return model;
222
222
  return {
223
223
  ...model,
224
- input: Array.from(new Set([...model.input, "image"])),
224
+ input: Array.from(new Set([...(model.input ?? []), "image"])),
225
225
  };
226
226
  }
227
227
  async function mapWithConcurrency(items, concurrency, fn, opts) {
@@ -319,7 +319,7 @@ export async function scanOpenRouterModels(options = {}) {
319
319
  reasoning: baseModel.reasoning,
320
320
  };
321
321
  const toolResult = await probeTool(model, apiKey, timeoutMs);
322
- const imageResult = model.input.includes("image")
322
+ const imageResult = model.input?.includes("image")
323
323
  ? await probeImage(ensureImageInput(model), apiKey, timeoutMs)
324
324
  : { ok: false, latencyMs: null, skipped: true };
325
325
  return {
@@ -33,8 +33,12 @@ function normalizeAnthropicModelId(model) {
33
33
  const lower = trimmed.toLowerCase();
34
34
  if (lower === "opus-4.5")
35
35
  return "claude-opus-4-5";
36
+ if (lower === "opus-4.6")
37
+ return "claude-opus-4-6";
36
38
  if (lower === "sonnet-4.5")
37
39
  return "claude-sonnet-4-5";
40
+ if (lower === "sonnet-4.6")
41
+ return "claude-sonnet-4-6";
38
42
  return trimmed;
39
43
  }
40
44
  function normalizeProviderModelId(provider, model) {
@@ -301,6 +301,7 @@ export async function runEmbeddedPiAgent(params) {
301
301
  bashElevated: params.bashElevated,
302
302
  extraSystemPrompt: params.extraSystemPrompt,
303
303
  ownerNumbers: params.ownerNumbers,
304
+ customInstructions: params.config?.agents?.defaults?.compaction?.defaultInstructions,
304
305
  });
305
306
  if (compactResult.compacted) {
306
307
  log.info(`auto-compaction succeeded for ${provider}/${modelId}; retrying prompt`);
@@ -48,7 +48,7 @@ export const handleCompactCommand = async (params) => {
48
48
  cfg: params.cfg,
49
49
  agentId: params.agentId,
50
50
  isGroup: params.isGroup,
51
- });
51
+ }) || params.cfg?.agents?.defaults?.compaction?.defaultInstructions;
52
52
  const result = await compactEmbeddedPiSession({
53
53
  sessionId,
54
54
  sessionKey: params.sessionKey,
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.124.21704",
3
- "commit": "c21948c1b36c14fbbb84887d2a7f8a356ae4dff0",
4
- "builtAt": "2026-02-17T13:43:12.766Z"
2
+ "version": "0.124.21802",
3
+ "commit": "6cc4c70b7d6ace6795607a2fa5af148ad9d298b1",
4
+ "builtAt": "2026-02-20T13:59:25.272Z"
5
5
  }
@@ -84,6 +84,7 @@ export const AgentDefaultsSchema = z
84
84
  })
85
85
  .strict()
86
86
  .optional(),
87
+ defaultInstructions: z.string().optional(),
87
88
  })
88
89
  .strict()
89
90
  .optional(),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nfreeness/clawdbot",
3
- "version": "0.124.21704",
3
+ "version": "0.124.21802",
4
4
  "description": "WhatsApp gateway CLI (Baileys web) with Pi RPC agent",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",