@gajae-code/agent-core 0.18.8 → 0.18.10
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 +8 -0
- package/dist/types/agent.d.ts +2 -0
- package/dist/types/types.d.ts +2 -0
- package/package.json +4 -4
- package/src/agent-loop.ts +1 -1
- package/src/agent.ts +3 -0
- package/src/types.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [0.18.10] - 2026-10-12
|
|
6
|
+
|
|
7
|
+
## [0.18.9] - 2026-10-11
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- Add `AgentPromptOptions.contextOverflowManaged` so session owners can classify and recover context overflow at their session boundary while keeping successful empty stops terminal in the agent loop.
|
|
12
|
+
|
|
5
13
|
## [0.18.8] - 2026-10-08
|
|
6
14
|
|
|
7
15
|
### Fixed
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -188,6 +188,8 @@ export interface AgentPromptOptions {
|
|
|
188
188
|
toolChoice?: ToolChoice;
|
|
189
189
|
/** Disable transport replay; fallback accounting is owned by the caller. */
|
|
190
190
|
fallbackManaged?: boolean;
|
|
191
|
+
/** Session policy owns context overflow; successful empty stops remain terminal. */
|
|
192
|
+
contextOverflowManaged?: boolean;
|
|
191
193
|
/** Continue a cooperative maintenance checkpoint under its existing logical run and cancellation domain. */
|
|
192
194
|
maintenanceContinuation?: boolean;
|
|
193
195
|
/**
|
package/dist/types/types.d.ts
CHANGED
|
@@ -210,6 +210,8 @@ export declare function isContinuingMidRunMaintenanceOutcome(outcome: unknown):
|
|
|
210
210
|
* Configuration for the agent loop.
|
|
211
211
|
*/
|
|
212
212
|
export interface AgentLoopConfig extends SimpleStreamOptions {
|
|
213
|
+
/** Session policy owns context overflow; successful empty stops remain terminal. */
|
|
214
|
+
contextOverflowManaged?: boolean;
|
|
213
215
|
model: Model;
|
|
214
216
|
/**
|
|
215
217
|
* Supplies a fresh opaque token at each concrete managed transport invocation.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@gajae-code/agent-core",
|
|
4
|
-
"version": "0.18.
|
|
4
|
+
"version": "0.18.10",
|
|
5
5
|
"description": "General-purpose agent with transport abstraction, state management, and attachment support",
|
|
6
6
|
"homepage": "https://gajae-code.com",
|
|
7
7
|
"author": "Yeachan-Heo and Gajae Code Contributors",
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"fmt": "biome format --write ."
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@gajae-code/ai": "0.18.
|
|
36
|
-
"@gajae-code/natives": "0.18.
|
|
37
|
-
"@gajae-code/utils": "0.18.
|
|
35
|
+
"@gajae-code/ai": "0.18.10",
|
|
36
|
+
"@gajae-code/natives": "0.18.10",
|
|
37
|
+
"@gajae-code/utils": "0.18.10",
|
|
38
38
|
"@opentelemetry/api": "^1.9.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
package/src/agent-loop.ts
CHANGED
|
@@ -727,7 +727,7 @@ function managedContextOverflow(message: AssistantMessage, config: AgentLoopConf
|
|
|
727
727
|
const transportFailure = managedTransportFailure(message);
|
|
728
728
|
// Managed empty-stop responses may be repaired by the managed shell below; only
|
|
729
729
|
// typed/error overflows are discardable before that normalization boundary.
|
|
730
|
-
if (config.fallbackManaged && message.stopReason !== "error") return false;
|
|
730
|
+
if ((config.fallbackManaged || config.contextOverflowManaged) && message.stopReason !== "error") return false;
|
|
731
731
|
return classifyContextOverflow(message, transportFailure, config.model.contextWindow);
|
|
732
732
|
}
|
|
733
733
|
|
package/src/agent.ts
CHANGED
|
@@ -472,6 +472,8 @@ export interface AgentPromptOptions {
|
|
|
472
472
|
toolChoice?: ToolChoice;
|
|
473
473
|
/** Disable transport replay; fallback accounting is owned by the caller. */
|
|
474
474
|
fallbackManaged?: boolean;
|
|
475
|
+
/** Session policy owns context overflow; successful empty stops remain terminal. */
|
|
476
|
+
contextOverflowManaged?: boolean;
|
|
475
477
|
/** Continue a cooperative maintenance checkpoint under its existing logical run and cancellation domain. */
|
|
476
478
|
maintenanceContinuation?: boolean;
|
|
477
479
|
/**
|
|
@@ -2020,6 +2022,7 @@ export class Agent {
|
|
|
2020
2022
|
maxRetryDelayMs: this.#maxRetryDelayMs,
|
|
2021
2023
|
requestMaxRetries: this.#requestMaxRetries,
|
|
2022
2024
|
streamMaxRetries: this.#streamMaxRetries,
|
|
2025
|
+
contextOverflowManaged: options?.contextOverflowManaged,
|
|
2023
2026
|
streamFirstEventTimeoutMs: this.#streamFirstEventTimeoutMs,
|
|
2024
2027
|
...(fallbackManaged
|
|
2025
2028
|
? {
|
package/src/types.ts
CHANGED
|
@@ -235,6 +235,8 @@ export function isContinuingMidRunMaintenanceOutcome(outcome: unknown): boolean
|
|
|
235
235
|
* Configuration for the agent loop.
|
|
236
236
|
*/
|
|
237
237
|
export interface AgentLoopConfig extends SimpleStreamOptions {
|
|
238
|
+
/** Session policy owns context overflow; successful empty stops remain terminal. */
|
|
239
|
+
contextOverflowManaged?: boolean;
|
|
238
240
|
model: Model;
|
|
239
241
|
/**
|
|
240
242
|
* Supplies a fresh opaque token at each concrete managed transport invocation.
|