@aparte/plugin-compaction 0.25.0 → 0.27.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/dist/index.d.ts CHANGED
@@ -2,13 +2,14 @@
2
2
  * `@aparte/plugin-compaction` — conversation compaction: summarise the turns that no
3
3
  * longer fit the model's window, keep the recent ones verbatim.
4
4
  *
5
- * Core owns the seams — the `aparte-compact` command `<aparte-context>` dispatches on
6
- * reaching its `danger` threshold, the `compaction: true` message the viewport draws as
7
- * a notice and the history sends under a preamble, the events a host listens for — and
8
- * this plugin is what answers the command: a selector over the model's budget, a
9
- * summariser through the config's transport, and the replacement in the transcript.
10
- * Nothing in core compacts by itself; no UI kit does, every agent SDK ships it as an
11
- * opt-in module, and so does aparté.
5
+ * Core owns the seams — the compactor the gauge, the separator and the client call
6
+ * (`AparteConfig.setCompactor`), the checkpoint (`contextSummary`) the history resumes from
7
+ * and the transcript draws as a separator, the events a host listens for — and this plugin
8
+ * is what answers them: a selector over the model's budget, a summariser through the
9
+ * config's transport, and the checkpoint written on the first message kept. Nothing is
10
+ * deleted. It also decides when: after a turn that ends at the threshold, and before a
11
+ * send that would not fit (`auto`, on by default). Nothing in core compacts by itself; no
12
+ * UI kit does, every agent SDK ships it as an opt-in module, and so does aparté.
12
13
  *
13
14
  * No element, so one entry serves the browser and Node: `setupCompaction` touches
14
15
  * `window` when called, never at import.
@@ -16,7 +17,7 @@
16
17
  export { setupCompaction } from './compaction.js';
17
18
  export type { CompactionSetupOptions, CompactionController, CompactionOutcome, CompactionSkipReason, CompactionTarget, CompactionMessageSelector, CompactionKeyResolver, CompactionSummarizer, } from './compaction.js';
18
19
  export { createCompactionSelector } from './selector.js';
19
- export type { CompactionSelectorOptions, CompactableMessage, CompactionSelection, CompactionSelector } from './selector.js';
20
+ export type { CompactionSelectorOptions, CompactableMessage, CompactionSelection, CompactionSelector, CompactionLimits, } from './selector.js';
20
21
  export { computeHistoryBudget, splitHistoryBudget, estimateTokens, estimateTokensJson, DEFAULT_COMPACTION_CONFIG, } from './budget.js';
21
22
  export type { CompactionConfig, BudgetBreakdown, BudgetResult, SplitBudget } from './budget.js';
22
23
  export { transcriptForSummary, messageText, DEFAULT_COMPACTION_PROMPT } from './transcript.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACR,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,oBAAoB,EACrF,gBAAgB,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,oBAAoB,GAC3F,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACzD,YAAY,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAC5H,OAAO,EACH,oBAAoB,EAAE,kBAAkB,EAAE,cAAc,EAAE,kBAAkB,EAAE,yBAAyB,GAC1G,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAChG,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC/F,YAAY,EACR,wBAAwB,EAAE,6BAA6B,EAAE,4BAA4B,EAAE,6BAA6B,GACvH,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,YAAY,EACR,sBAAsB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,oBAAoB,EACrF,gBAAgB,EAAE,yBAAy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