@compilr-dev/sdk 0.7.25 → 0.7.26

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/agent.js CHANGED
@@ -294,6 +294,13 @@ class CompilrAgentImpl {
294
294
  contextManager,
295
295
  autoContextManagement: contextManager !== undefined,
296
296
  observationMask: contextManager ? observationMask : undefined,
297
+ windowing: contextManager
298
+ ? config?.context?.windowing !== false
299
+ ? {
300
+ ...(typeof config?.context?.windowing === 'object' ? config.context.windowing : {}),
301
+ }
302
+ : false
303
+ : undefined,
297
304
  hooks: mergedHooks,
298
305
  pins: {},
299
306
  permissions: {
package/dist/config.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * SDK configuration types
3
3
  */
4
- import type { LLMProvider, Message, Tool, ToolPermission, HooksConfig, AnchorInput, AgentEvent, ToolExecutionResult, DelegationConfig, ObservationMaskConfig } from '@compilr-dev/agents';
4
+ import type { LLMProvider, Message, Tool, ToolPermission, HooksConfig, AnchorInput, AgentEvent, ToolExecutionResult, DelegationConfig, ObservationMaskConfig, WindowingConfig } from '@compilr-dev/agents';
5
5
  import type { Preset } from './presets/types.js';
6
6
  import type { ToolProfile } from './team/tool-config.js';
7
7
  import type { ConditionalModule } from './capabilities/hook.js';
@@ -106,6 +106,14 @@ export interface ContextConfig {
106
106
  * Set to false to disable masking entirely.
107
107
  */
108
108
  observationMask?: Partial<ObservationMaskConfig> | false;
109
+ /**
110
+ * Smart windowing — programmatic context compaction.
111
+ * Compacts old messages when history exceeds token budget.
112
+ * Three zones: recent (intact), middle (truncated), old (event log).
113
+ * When omitted, SDK defaults are used (60K target, 15K recent window).
114
+ * Set to false to disable windowing entirely.
115
+ */
116
+ windowing?: Partial<WindowingConfig> | false;
109
117
  }
110
118
  /**
111
119
  * Usage information for the agent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@compilr-dev/sdk",
3
- "version": "0.7.25",
3
+ "version": "0.7.26",
4
4
  "description": "Universal agent runtime for building AI-powered applications",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -53,11 +53,11 @@
53
53
  "node": ">=18.0.0"
54
54
  },
55
55
  "dependencies": {
56
+ "@compilr-dev/agents": "^0.4.0",
56
57
  "@compilr-dev/sdk": "^0.5.4",
57
58
  "ajv": "^6.14.0"
58
59
  },
59
60
  "peerDependencies": {
60
- "@compilr-dev/agents": "^0.3.25",
61
61
  "@compilr-dev/agents-coding": "^1.0.2",
62
62
  "better-sqlite3": "^11.0.0 || ^12.0.0"
63
63
  },
@@ -68,7 +68,6 @@
68
68
  },
69
69
  "devDependencies": {
70
70
  "@anthropic-ai/sdk": "^0.78.0",
71
- "@compilr-dev/agents": "^0.3.28",
72
71
  "@compilr-dev/agents-coding": "^1.0.2",
73
72
  "@eslint/js": "^9.39.1",
74
73
  "@opentelemetry/api": "^1.9.0",