@agimon-ai/doompi-autocompact 0.0.1-alpha.21 → 0.0.1-alpha.22

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.
Files changed (2) hide show
  1. package/README.md +42 -22
  2. package/package.json +6 -6
package/README.md CHANGED
@@ -1,40 +1,60 @@
1
1
  # @agimon-ai/doompi-autocompact
2
2
 
3
- **Compaction with breadcrumbs.**
3
+ Staged checkpoint summarization and iterative context compaction for DoomPi.
4
4
 
5
- Waiting until the context window is full leaves one hurried summary to save an entire
6
- session. Doompi checkpoints the work before that cliff, then carries the live plan, task
7
- graph, and team state beside the prose instead of asking a later model to reconstruct them.
5
+ Instead of waiting for one final summary near the context limit, Autocompact creates up to three asynchronous checkpoints and combines each checkpoint with subsequent messages.
8
6
 
9
- The ladder has three passes:
7
+ > **Alpha:** thresholds and compaction steering may change between releases.
10
8
 
11
- 1. At 50%, write the first compact summary.
12
- 2. Combine that checkpoint with later messages; let the model decide whether it is ready
13
- to compact.
14
- 3. Combine the next checkpoint with later messages and force compaction.
9
+ ## Requirements
15
10
 
16
- The work runs in a worker thread, so writing a checkpoint does not stop the session.
17
-
18
- This is part of [Doompi](https://www.npmjs.com/package/@agimon-ai/doompi). Most users get
19
- it with the distribution.
11
+ - Node.js 22.19.0 or newer
12
+ - Pi 0.84.2
13
+ - Authentication for the active Pi model used to summarize
20
14
 
21
15
  ## Install
22
16
 
17
+ DoomPi loads Autocompact as core. For direct Pi installation:
18
+
23
19
  ```bash
24
- npm install @agimon-ai/doompi-autocompact
20
+ pi install npm:@agimon-ai/doompi-autocompact
25
21
  ```
26
22
 
27
- ## How it loads
23
+ The extension entry is `@agimon-ai/doompi-autocompact/extensions/pi`.
24
+
25
+ ## Checkpoint ladder
26
+
27
+ The standard adapter uses thresholds around 50%, 75%, and 95% of the usable context window, subject to token caps and Pi's native-compaction clamp:
28
+
29
+ 1. create an initial compact summary;
30
+ 2. combine it with later messages and allow the model to decide whether compaction is ready;
31
+ 3. combine again and force compaction on the final pass.
32
+
33
+ Summarization runs in a worker thread so the foreground session can continue. Checkpoints are persisted as hidden session entries and used for later steering.
34
+
35
+ The standard adapter uses the active Pi model. Each checkpoint can therefore make another provider request, consume quota, and require the corresponding API credentials. Provider errors or missing authentication affect checkpoint generation rather than granting a free local summary.
28
36
 
29
- Doompi loads auto-compact as core. It is not a layer and does not appear in
30
- `.doom/modes.yaml`. The bare package name follows its Pi manifest and loads the Pi adapter.
37
+ ## Coordination state
31
38
 
32
- ## Entry points
39
+ Autocompact does not own Task or Team persistence. In the standard adapter, Task and Team snapshot fields supplied to summarization are empty. Task's `tasks.json` and Team's run/intercom state continue to be owned by those packages and must not be inferred from an Autocompact summary.
33
40
 
34
- | Import | Purpose |
35
- | --------------------------------------------- | ------------------------ |
36
- | `@agimon-ai/doompi-autocompact` | Library API |
37
- | `@agimon-ai/doompi-autocompact/extensions/pi` | Pi extension entry point |
41
+ ## Public API
42
+
43
+ ```ts
44
+ import { registerAutocompactExtension, thresholdTokens } from '@agimon-ai/doompi-autocompact';
45
+ import type { AutocompactPass } from '@agimon-ai/doompi-autocompact';
46
+ ```
47
+
48
+ `thresholdTokens` exposes the threshold policy for hosts that need to preview or test checkpoint boundaries.
49
+
50
+ ## Development
51
+
52
+ ```bash
53
+ pnpm build
54
+ pnpm typecheck
55
+ pnpm test
56
+ pnpm lint
57
+ ```
38
58
 
39
59
  ## License
40
60
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agimon-ai/doompi-autocompact",
3
- "version": "0.0.1-alpha.21",
3
+ "version": "0.0.1-alpha.22",
4
4
  "description": "Staged checkpoint steering and iterative context compaction for Doompi",
5
5
  "keywords": [
6
6
  "ai",
@@ -27,11 +27,11 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@agimon-ai/doompi-config": "0.0.1-alpha.21",
31
- "@agimon-ai/doompi-team": "0.0.1-alpha.21",
32
- "@agimon-ai/doompi-telemetry": "0.0.1-alpha.21",
33
- "@agimon-ai/doompi-task": "0.0.1-alpha.21",
34
- "@agimon-ai/doompi-ui": "0.0.1-alpha.21"
30
+ "@agimon-ai/doompi-config": "0.0.1-alpha.22",
31
+ "@agimon-ai/doompi-task": "0.0.1-alpha.22",
32
+ "@agimon-ai/doompi-team": "0.0.1-alpha.22",
33
+ "@agimon-ai/doompi-telemetry": "0.0.1-alpha.22",
34
+ "@agimon-ai/doompi-ui": "0.0.1-alpha.22"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@earendil-works/pi-coding-agent": "0.84.2",