@oh-my-pi/pi-agent-core 18.2.1 → 18.2.2
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.
|
@@ -124,6 +124,13 @@ export declare function shouldCompact(contextTokens: number, contextWindow: numb
|
|
|
124
124
|
*/
|
|
125
125
|
export declare function compactionContextTokens(providerContextTokens: number, storedConversationEstimate: number): number;
|
|
126
126
|
export declare function resolveThresholdTokens(contextWindow: number, settings: CompactionSettings): number;
|
|
127
|
+
/**
|
|
128
|
+
* True for entries that begin a conversational turn (a user request, a
|
|
129
|
+
* bash-execution card, a branch summary, or a custom user-role message).
|
|
130
|
+
* Compaction cut alignment, turn discovery, and the collapsed display
|
|
131
|
+
* transcript's orphan-head trim all share this boundary definition.
|
|
132
|
+
*/
|
|
133
|
+
export declare function isTurnStartEntry(entry: SessionEntry): boolean;
|
|
127
134
|
/**
|
|
128
135
|
* Find the user message (or bashExecution) that starts the turn containing the given entry index.
|
|
129
136
|
* Returns -1 if no turn start found before the index.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@oh-my-pi/pi-agent-core",
|
|
4
|
-
"version": "18.2.
|
|
4
|
+
"version": "18.2.2",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://omp.sh",
|
|
7
7
|
"author": "Stencil Labs, Inc.",
|
|
@@ -35,16 +35,16 @@
|
|
|
35
35
|
"fmt": "oxfmt --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts'"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@oh-my-pi/pi-ai": "18.2.
|
|
39
|
-
"@oh-my-pi/pi-catalog": "18.2.
|
|
40
|
-
"@oh-my-pi/pi-natives": "18.2.
|
|
41
|
-
"@oh-my-pi/pi-utils": "18.2.
|
|
42
|
-
"@oh-my-pi/pi-wire": "18.2.
|
|
43
|
-
"@oh-my-pi/snapcompact": "18.2.
|
|
38
|
+
"@oh-my-pi/pi-ai": "18.2.2",
|
|
39
|
+
"@oh-my-pi/pi-catalog": "18.2.2",
|
|
40
|
+
"@oh-my-pi/pi-natives": "18.2.2",
|
|
41
|
+
"@oh-my-pi/pi-utils": "18.2.2",
|
|
42
|
+
"@oh-my-pi/pi-wire": "18.2.2",
|
|
43
|
+
"@oh-my-pi/snapcompact": "18.2.2",
|
|
44
44
|
"@opentelemetry/api": "^1.9.1"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@oh-my-pi/omptype": "18.2.
|
|
47
|
+
"@oh-my-pi/omptype": "18.2.2",
|
|
48
48
|
"@opentelemetry/context-async-hooks": "^2.9.0",
|
|
49
49
|
"@opentelemetry/sdk-trace-base": "^2.9.0",
|
|
50
50
|
"@types/bun": "^1.3.14"
|
|
@@ -460,7 +460,13 @@ function findValidCutPoints(entries: SessionEntry[], startIndex: number, endInde
|
|
|
460
460
|
return cutPoints;
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
|
|
463
|
+
/**
|
|
464
|
+
* True for entries that begin a conversational turn (a user request, a
|
|
465
|
+
* bash-execution card, a branch summary, or a custom user-role message).
|
|
466
|
+
* Compaction cut alignment, turn discovery, and the collapsed display
|
|
467
|
+
* transcript's orphan-head trim all share this boundary definition.
|
|
468
|
+
*/
|
|
469
|
+
export function isTurnStartEntry(entry: SessionEntry): boolean {
|
|
464
470
|
if (entry.type === "branch_summary" || entry.type === "custom_message") {
|
|
465
471
|
return true;
|
|
466
472
|
}
|