
Security News
GitHub Actions Checkout Now Blocks Risky pull_request_target Checkouts
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.
@archships/dim-plugin-auto-compact
Advanced tools
Official supported auto compaction plugin for dim-agent-sdk.
context.compact.beforesummaryModel instead of the session modelassistant / tooluser message, and injects one lightweight auto-compact context user message ahead of the retained anchor querysession.messages intact for UI and restorepluginState['auto-compact'], including rolling checkpoint entries (checkpointId, createdAt) plus semantic lastAttempt diagnosticscompaction.maxInputTokens plus triggerTokens or triggerRatiocompaction.ownerPluginId: 'auto-compact'import { createAgent, createModel } from '@archships/dim-agent-sdk'
import { createAutoCompactPlugin } from '@archships/dim-plugin-auto-compact'
const agent = createAgent({
model: createModel(adapter),
plugins: [
createAutoCompactPlugin({
summaryModel: { provider: 'openai', modelId: 'gpt-4.1-mini' },
retainMessages: 6,
compaction: {
auto: true,
prune: true,
reserved: 10_000,
},
}),
],
compaction: {
maxInputTokens: 32_000,
triggerRatio: 0.8,
ownerPluginId: 'auto-compact',
},
})
summaryModel is optional; the plugin defaults to context.status.modelmaxSummaryTokens is optional; the plugin defaults summary requests to 1024context.compact.before after SDK core budget detection firescontext_compaction_requiredauto_compaction, and session.compact() summary calls record manual_compaction<continuation_summary>...</continuation_summary> block before replay, including wrapped blocks, merged multi-block outputs, and malformed-tag fragments that still yield a non-empty semantic bodyinvalid_summary_contractlastAttempt is updated on every threshold-triggered compaction pass with planned / skipped / compacted / failed, budget metadata, estimator-based estimatedInputTokensAfter / estimatedSavedTokens, reason codes such as missing_summary_model, nothing_to_compact, empty_summary_preserved_previous, summary_generation_failed, or compaction_owner_required, and optional summaryNormalization values (plain_text, wrapped_block, extracted_block) when the summary output was inspectedpluginStatecontext.compacted notifications now include compacted / retained message counts plus estimator-based before / after / saved token fields when budgeting is enabledretainMessages remains a preferred target, but the planner can keep compacting down to the newest real user boundary when neededuser messages for the auto-compact environment note and the compaction summary around the retained anchor querypnpm run demo:auto-compact in the repo for the scripted walkthroughFAQs
Official auto compaction plugin for dim-agent-sdk.
The npm package @archships/dim-plugin-auto-compact receives a total of 30 weekly downloads. As such, @archships/dim-plugin-auto-compact popularity was classified as not popular.
We found that @archships/dim-plugin-auto-compact demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
GitHub Actions checkout now blocks risky pull_request_target checkouts by default to help prevent pwn request supply chain attacks.

Product
Socket now supports Custom Roles and Repository Access Permissions so organizations can control who can access specific repositories and actions.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.