🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@archships/dim-plugin-auto-compact

Package Overview
Dependencies
Maintainers
3
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@archships/dim-plugin-auto-compact - npm Package Compare versions

Comparing version
0.0.13
to
0.0.14
+2
-2
dist/index.js

@@ -102,3 +102,3 @@ //#region src/index.ts

const environmentText = buildAutoCompactEnvironmentMessage(context.status);
const plan = planCompaction(payload.messages, payload.cursor, normalized, payload.maxInputTokens, payload.thresholdTokens, environmentText);
const plan = planCompaction(payload.messages, payload.cursor, normalized, Math.max(0, payload.contextWindow - payload.plannedOutput), payload.thresholdTokens, environmentText);
if (!plan) {

@@ -662,3 +662,3 @@ const stickyFailure = previous.lastAttempt?.status === "failed" && previous.lastAttempt.reasonCode === "post_summary_over_budget";

thresholdTokens: payload.thresholdTokens,
maxInputTokens: payload.maxInputTokens,
maxInputTokens: Math.max(0, payload.contextWindow - payload.plannedOutput),
cursor: payload.cursor,

@@ -665,0 +665,0 @@ startedAt

{
"name": "@archships/dim-plugin-auto-compact",
"version": "0.0.13",
"version": "0.0.14",
"description": "Official auto compaction plugin for dim-agent-sdk.",

@@ -27,4 +27,4 @@ "homepage": "https://dimcode.dev/",

"devDependencies": {
"@archships/dim-agent-sdk": "0.0.52",
"@archships/dim-plugin-api": "0.0.19"
"@archships/dim-plugin-api": "0.0.20",
"@archships/dim-agent-sdk": "0.0.53"
},

@@ -31,0 +31,0 @@ "scripts": {

@@ -17,3 +17,4 @@ # @archships/dim-plugin-auto-compact

- configure SDK core compaction budgeting with `compaction.maxInputTokens` plus `triggerTokens` or `triggerRatio`
- enable SDK core compaction (`compaction: {}` or an explicit `safetyRatio`) on the agent
- publish `ModelCapabilities.contextWindow` on the model adapter so the gate can derive `threshold = contextWindow − plannedOutput − contextWindow × safetyRatio`
- configure `compaction.ownerPluginId: 'auto-compact'`

@@ -42,4 +43,3 @@ - grant model permission to the plugin runtime

compaction: {
maxInputTokens: 32_000,
triggerRatio: 0.8,
safetyRatio: 0.2,
ownerPluginId: 'auto-compact',

@@ -46,0 +46,0 @@ },

Sorry, the diff of this file is too big to display