@dreb/coding-agent 2.47.0 → 2.48.0
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/dist/core/agent-session.d.ts +22 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +90 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/k3-context-tier.d.ts +67 -0
- package/dist/core/k3-context-tier.d.ts.map +1 -0
- package/dist/core/k3-context-tier.js +76 -0
- package/dist/core/k3-context-tier.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +7 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/providers.md +1 -0
- package/docs/rpc.md +1 -0
- package/package.json +1 -1
|
@@ -94,6 +94,13 @@ export type AgentSessionEvent = AgentEvent | SubagentArbitrationEvent | {
|
|
|
94
94
|
} | {
|
|
95
95
|
type: "suggest_next";
|
|
96
96
|
command: string;
|
|
97
|
+
} | {
|
|
98
|
+
/** The wire model tier auto-upgraded because the session context outgrew the smaller tier (e.g. Kimi K3 256k → 1M). */
|
|
99
|
+
type: "context_window_upgrade";
|
|
100
|
+
provider: string;
|
|
101
|
+
modelId: string;
|
|
102
|
+
fromContextWindow: number;
|
|
103
|
+
toContextWindow: number;
|
|
97
104
|
};
|
|
98
105
|
/** Listener function for agent session events */
|
|
99
106
|
export type AgentSessionEventListener = (event: AgentSessionEvent) => void;
|
|
@@ -601,6 +608,21 @@ export declare class AgentSession {
|
|
|
601
608
|
*/
|
|
602
609
|
abortBranchSummary(): void;
|
|
603
610
|
private _checkCompaction;
|
|
611
|
+
/**
|
|
612
|
+
* Apply the K3 auto context tier to a model being set on the agent. The
|
|
613
|
+
* user-facing `k3` model runs on the cheaper `k3-256k` wire model ID until
|
|
614
|
+
* the session context grows past the 256k cutoff; no-op for other models.
|
|
615
|
+
* See k3-context-tier.ts.
|
|
616
|
+
*/
|
|
617
|
+
private _applyContextTier;
|
|
618
|
+
/** Remove the last message from agent state when it is an assistant message. */
|
|
619
|
+
private _removeLastAssistantMessage;
|
|
620
|
+
/**
|
|
621
|
+
* Upgrade the K3 auto context tier from 256k to 1M. The Kimi backend
|
|
622
|
+
* upgrades the prompt cache seamlessly, so no context is lost or
|
|
623
|
+
* compacted. Returns true when the upgrade was applied.
|
|
624
|
+
*/
|
|
625
|
+
private _tryUpgradeK3ContextTier;
|
|
604
626
|
private _runAutoCompaction;
|
|
605
627
|
/**
|
|
606
628
|
* Toggle auto-compaction setting.
|