@2en/clawly-plugins 1.29.0-beta.4 → 1.29.0

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/config-setup.ts CHANGED
@@ -469,6 +469,24 @@ export function patchMemorySearch(
469
469
  return dirty
470
470
  }
471
471
 
472
+ export function patchContextPruning(config: Record<string, unknown>): boolean {
473
+ const agents = (config.agents ?? {}) as Record<string, unknown>
474
+ const defaults = (agents.defaults ?? {}) as Record<string, unknown>
475
+ const cp = (defaults.contextPruning ?? {}) as Record<string, unknown>
476
+
477
+ // mode: set-if-missing — enable cache-ttl by default for cost savings,
478
+ // but don't override if an operator has explicitly configured it.
479
+ if (cp.mode === undefined) {
480
+ cp.mode = 'cache-ttl'
481
+ defaults.contextPruning = cp
482
+ agents.defaults = defaults
483
+ config.agents = agents
484
+ return true
485
+ }
486
+
487
+ return false
488
+ }
489
+
472
490
  const DEFAULT_HEARTBEAT_MODEL = `${PROVIDER_NAME}/qwen/qwen3.5-flash-02-23`
473
491
 
474
492
  function resolveDefaultHeartbeatModel(pc: ConfigPluginConfig): string {
@@ -656,6 +674,7 @@ function reconcileRuntimeConfig(
656
674
 
657
675
  let dirty = false
658
676
  dirty = patchAgent(config, pc) || dirty
677
+ dirty = patchContextPruning(config) || dirty
659
678
  dirty = patchHeartbeat(config, pc) || dirty
660
679
  dirty = patchGateway(config) || dirty
661
680
  dirty = patchBrowser(config) || dirty
@@ -50,7 +50,7 @@ export const PUBLIC_GATEWAY_MODELS = [
50
50
  input: ['text', 'image'],
51
51
  contextWindow: 1_000_000,
52
52
  maxTokens: 128_000,
53
- api: 'anthropic-messages',
53
+ // api: 'anthropic-messages', // TODO: uncomment once model gateway Anthropic Messages API support is out of testing
54
54
  },
55
55
  {
56
56
  canonicalId: 'anthropic/claude-opus-4.6',
@@ -58,7 +58,7 @@ export const PUBLIC_GATEWAY_MODELS = [
58
58
  input: ['text', 'image'],
59
59
  contextWindow: 1_000_000,
60
60
  maxTokens: 128_000,
61
- api: 'anthropic-messages',
61
+ // api: 'anthropic-messages',
62
62
  },
63
63
  {
64
64
  canonicalId: 'openai/gpt-5.4',
@@ -186,7 +186,10 @@ export function patchModelGateway(
186
186
  for (const m of existingModels) {
187
187
  const extra = extraLookup.get(m.id)
188
188
  if (!extra) continue
189
- if ((m as any).contextWindow == null || (m as any).maxTokens == null) {
189
+ if (
190
+ (m as any).contextWindow !== extra.contextWindow ||
191
+ (m as any).maxTokens !== extra.maxTokens
192
+ ) {
190
193
  ;(m as any).contextWindow = extra.contextWindow
191
194
  ;(m as any).maxTokens = extra.maxTokens
192
195
  dirty = true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@2en/clawly-plugins",
3
- "version": "1.29.0-beta.4",
3
+ "version": "1.29.0",
4
4
  "module": "index.ts",
5
5
  "type": "module",
6
6
  "repository": {