@ai-agent-forge/agent-forge 0.86.1 → 0.86.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.
- package/CHANGELOG.md +5 -0
- package/dist/bundle/.build-manifest.json +12 -12
- package/dist/bundle/chunks/{chunk-S3YLY4MG.js → chunk-JR3Q27QP.js} +4 -4
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/core/agent-session-compaction.d.ts +5 -0
- package/dist/core/agent-session-compaction.d.ts.map +1 -1
- package/dist/core/agent-session-compaction.js +19 -1
- package/dist/core/agent-session-compaction.js.map +1 -1
- package/dist/core/agent-session-internal.d.ts +6 -0
- package/dist/core/agent-session-internal.d.ts.map +1 -1
- package/dist/core/agent-session-internal.js.map +1 -1
- package/dist/core/agent-session.d.ts +8 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +13 -0
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/extensions/bootstrap-compaction-policy.d.ts.map +1 -1
- package/dist/core/extensions/bootstrap-compaction-policy.js +3 -1
- package/dist/core/extensions/bootstrap-compaction-policy.js.map +1 -1
- package/dist/core/extensions/microcompact.d.ts +3 -2
- package/dist/core/extensions/microcompact.d.ts.map +1 -1
- package/dist/core/extensions/microcompact.js +14 -5
- package/dist/core/extensions/microcompact.js.map +1 -1
- package/dist/core/settings-manager.d.ts +3 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +4 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/package.json +1 -1
|
@@ -103,6 +103,14 @@ export class AgentSession {
|
|
|
103
103
|
_overflowRecoveryAttempted = false;
|
|
104
104
|
// biome-ignore lint/correctness/noUnusedPrivateClassMembers: read and written via the agent-session-* submodule facade
|
|
105
105
|
_overflowTrimStage = 0;
|
|
106
|
+
/**
|
|
107
|
+
* microcompact 冷却(按模型请求计数,0 = 不冷却):relief 落地时置
|
|
108
|
+
* MICROCOMPACT_COOLDOWN_ASSISTANT_RESPONSES,此后每次 assistant message_end
|
|
109
|
+
* (无论 stopReason)减 1、下限 0;user message_start 不复位。冷却期内阈值
|
|
110
|
+
* decide 以 microcompactEnabled:false 关闭便宜缓解。微观经济动机见
|
|
111
|
+
* agent-session-compaction.ts 的常量注释(中部历史改写 × 不稳定前缀缓存)。
|
|
112
|
+
*/
|
|
113
|
+
_microcompactCooldown = 0;
|
|
106
114
|
// Branch summarization state
|
|
107
115
|
_branchSummaryAbortController = undefined;
|
|
108
116
|
_branchSummaryPromise = undefined;
|
|
@@ -506,6 +514,11 @@ export class AgentSession {
|
|
|
506
514
|
this._overflowRecoveryAttempted = false;
|
|
507
515
|
this._overflowTrimStage = 0;
|
|
508
516
|
}
|
|
517
|
+
// microcompact 冷却按模型请求计数:每个完成的 assistant 响应(无论
|
|
518
|
+
// stopReason)释放一档,下限 0;冷却期内的阈值 decide 不做便宜缓解。
|
|
519
|
+
if (this._microcompactCooldown > 0) {
|
|
520
|
+
this._microcompactCooldown -= 1;
|
|
521
|
+
}
|
|
509
522
|
// Reset retry counter immediately on successful assistant response
|
|
510
523
|
// This prevents accumulation across multiple LLM calls within a turn
|
|
511
524
|
if (assistantMsg.stopReason !== "error" && this._retryAttempt > 0) {
|