@ashx-j/lunr 0.2.15 → 0.2.16
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/CHANGELOG.md +7 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.d.ts.map +1 -1
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js +6 -2
- package/dist/builtin-extensions/narumiruna-pi-goal/src/goal.js.map +1 -1
- package/dist/core/agent-session.d.ts +3 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +50 -4
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +10 -5
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/extensions/types.d.ts +2 -2
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +19 -4
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/compaction.md +5 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/package.json +4 -4
package/docs/compaction.md
CHANGED
|
@@ -34,7 +34,9 @@ contextTokens > contextWindow - reserveTokens
|
|
|
34
34
|
|
|
35
35
|
By default, `reserveTokens` is 16384 tokens (configurable in `~/.lunr/agent/settings.json` or `<project-dir>/.lunr/settings.json`). This leaves room for the LLM's response.
|
|
36
36
|
|
|
37
|
-
|
|
37
|
+
For Codex OAuth models, lunR checks the threshold after each complete batch of tool results. If the batch crosses the threshold, lunR compacts before sending the next provider request.
|
|
38
|
+
|
|
39
|
+
You can also trigger manually with `/compact [instructions]`, where optional instructions focus the summary. Running `/compact` again at an unchanged compaction boundary is a no-op.
|
|
38
40
|
|
|
39
41
|
### How It Works
|
|
40
42
|
|
|
@@ -114,7 +116,7 @@ Valid cut points are:
|
|
|
114
116
|
- BashExecution messages
|
|
115
117
|
- Custom messages (custom_message, branch_summary)
|
|
116
118
|
|
|
117
|
-
Never cut at tool results (they must stay with their tool call).
|
|
119
|
+
Never cut at tool results (they must stay with their tool call). If the recent-token budget lands on a tool result, lunR keeps the assistant message containing its tool call.
|
|
118
120
|
|
|
119
121
|
### CompactionEntry Structure
|
|
120
122
|
|
|
@@ -288,7 +290,7 @@ pi.on("session_before_compact", async (event, ctx) => {
|
|
|
288
290
|
|
|
289
291
|
// branchEntries - all entries on current branch (for custom state)
|
|
290
292
|
// reason - "manual" (/compact), "threshold", or "overflow"
|
|
291
|
-
// willRetry - whether the
|
|
293
|
+
// willRetry - whether the active run sends another provider request after compaction
|
|
292
294
|
// signal - AbortSignal (pass to LLM calls)
|
|
293
295
|
|
|
294
296
|
// Cancel:
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-custom-provider",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-custom-provider",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.16",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "^0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-gondolin",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-gondolin",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.16",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-sandbox",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-sandbox",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.16",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "^0.0.26"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-extension-with-deps",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "pi-extension-with-deps",
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.16",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"ms": "^2.1.3"
|
|
12
12
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ashx-j/lunr",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.16",
|
|
4
4
|
"description": "lunR — terminal coding agent CLI with read, bash, edit, write tools and session management",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"piConfig": {
|
|
@@ -37,9 +37,9 @@
|
|
|
37
37
|
"shrinkwrap": "node ../../scripts/generate-coding-agent-shrinkwrap.mjs"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@ashx-j/lunr-agent": "^0.2.
|
|
41
|
-
"@ashx-j/lunr-ai": "^0.2.
|
|
42
|
-
"@ashx-j/lunr-tui": "^0.2.
|
|
40
|
+
"@ashx-j/lunr-agent": "^0.2.16",
|
|
41
|
+
"@ashx-j/lunr-ai": "^0.2.16",
|
|
42
|
+
"@ashx-j/lunr-tui": "^0.2.16",
|
|
43
43
|
"@modelcontextprotocol/ext-apps": "1.7.4",
|
|
44
44
|
"@modelcontextprotocol/sdk": "1.30.0",
|
|
45
45
|
"@mozilla/readability": "0.6.0",
|