@sayknow-cli/coding-agent 0.6.8 → 0.7.1

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 CHANGED
@@ -2,10 +2,37 @@
2
2
 
3
3
  ## [Unreleased]
4
4
 
5
+ ## [0.7.1] - 2026-09-29
6
+
7
+ ### Added
8
+
9
+ - Grok Build lists Grok 4.7 and Grok 4.7 Build Fast (both up to xhigh reasoning), which the Grok Build endpoint now serves; they were missing from the model picker because the Grok Build list is fixed in code.
10
+
11
+ ## [0.7.0] - 2026-09-29
12
+
13
+ ### Changed
14
+
15
+ - The pet is now Sayo, the Sayknow octopus. On kitty-graphics terminals (Ghostty, kitty, WezTerm) the composer pet is the Sayo image itself, one transformed image per pose: it tilts side to side when dancing, squashes on the "yay" beat, glances, blinks with drawn eyelids, and the blue pet cries real tears. The launch card shows Sayo as an image too (Ghostty and kitty outside tmux, through kitty Unicode placeholders, so the image scrolls and redraws with the text and dancing only changes a color). Sayo in orange is the new default and a third pet (`/pet`, `pet.mode: orange`); red and blue are hue shifts of the same image. Sixel terminals, tmux launch cards and plain text keep the pixel octopus, now also in orange. Pet frames are sent zlib-compressed.
16
+
17
+ ## [0.6.9] - 2026-09-29
18
+
19
+ ### Changed
20
+
21
+ - Tool results above 12 KB are now saved as an artifact and shown to the model as a head+tail view by default (`tools.maxInlineResultBytes`, was off; from upstream gajae #5966). Upstream's live A/B on four models cut tool-result text per task by 34–57% with task success unchanged (45/45). The full text stays readable through the artifact. When no artifact can be stored (standalone `skc read`), output is not cut. Totals and a read window's "Use :N to continue" hint survive a second cut, and images keep their position among content blocks.
22
+ - Auto-compaction with default settings now triggers at 300,000 tokens at most (from upstream gajae #6060). On million-token models the reserve-based limit let a session carry close to 1M tokens into every request. A configured `compaction.thresholdTokens` or `thresholdPercent`, adaptive compaction, and a model reached by context promotion keep their own limits. The kept-recent window is bounded below the new threshold so compaction still reduces the prompt. `/context` shows the threshold the session actually uses.
23
+
24
+ ### Changed
25
+
26
+ - The pet on the launch card keeps dancing after the intro (the composer pet's working dance: sway left, right, rest, sparkle) for as long as its top row is on screen, and stops for good once the conversation pushes the card away. Frames only change five times per 1.6 s loop. `startup.skipLogoAnimation` still turns all launch motion off.
27
+
5
28
  ## [0.6.8] - 2026-09-29
6
29
 
7
30
  ### Fixed
8
31
 
32
+ - Much lower CPU while a turn is running, in skc and in the terminal. On kitty-graphics terminals (Ghostty, kitty, WezTerm) the composer pet re-sent its full image (~28 KB) after every screen write, and the working-message shimmer writes up to 60 times a second — about 1.7 MB/s of image data for the terminal to decode. The image is now placed again only when its pose, its cell, the screen's line count, a full redraw, or the terminal size changes (terminal output in a measured run: 214 → 25 KB/s). The shimmer runs at ~30 fps instead of 60: every tick redraws the whole UI, which in a long session costs as much as the rest of the turn (a 20,000-message transcript: 15.4% → 9.9% CPU). Sixel pets still redraw on every write; their frames are ~2 KB and live in the text cells.
33
+ - Anthropic OAuth requests sign the Claude Code fingerprint (`claude-cli/<version>`, `cc_version`) with the latest published Claude Code release instead of a version fixed at build time (from upstream gajae 804436c). Anthropic answers a stale fingerprint on newer models with HTTP 400 `claude_code_version_too_old`; this fork was still sending 2.1.283. The version is looked up in the background at most every 6 hours, cached at `~/.skc/cache/claude-code-version.json`, never delays a request, and never goes below the bundled floor (2.1.284). `SKC_CLAUDE_CODE_VERSION` pins it.
34
+ - Usage lookups for credential ranking are shared across `skc` windows and one-shot runs (from upstream gajae #5961). Each account's usage is fetched by one process at a time (a lease in agent.db); the others wait for that result instead of sending their own request. A failed lookup with nothing cached is remembered for about a minute, so neither this window nor its siblings keep probing an endpoint that is answering 429. A last-good report older than 24 h is no longer reused on failure. `skc -p` and other non-interactive runs rank accounts only from reports already cached and never call the usage endpoints.
35
+ - Managed fallback no longer spends a request on an account it already knows is exhausted. With several accounts for one provider and all of them at their usage limit, the chain used to retry the same model on an exhausted account until its attempts ran out; it now tries each account once and moves to the next model. One exhausted account still hands the turn to the next account on the same model, and a provider with a single account keeps its usual retry budget (from upstream gajae #5874; the rest of that change was already covered by this fork's rotation).
9
36
  - Picking a recent session on the launch card with the arrow keys needed the key held down in terminals that use the kitty keyboard protocol (Ghostty, kitty, WezTerm): the release event that follows every press was treated as "another key" and cancelled the pick. Release events are now ignored, so one tap of `↓`/`↑` moves one row and `Enter` opens the highlighted session.
10
37
 
11
38
  ### Changed
@@ -653,18 +653,18 @@ export declare const SETTINGS_SCHEMA: {
653
653
  };
654
654
  readonly "pet.mode": {
655
655
  readonly type: "enum";
656
- readonly values: readonly ["off", "red", "blue"];
656
+ readonly values: readonly ["off", "orange", "red", "blue"];
657
657
  readonly default: "off";
658
658
  readonly ui: {
659
659
  readonly tab: "appearance";
660
660
  readonly label: "Sayknow Pet";
661
- readonly description: "16x16 real-pixel sayknow living beside the composer (sixel/kitty terminals)";
661
+ readonly description: "Sayo the octopus beside the composer (kitty-graphics terminals draw the full image; sixel terminals a pixel version)";
662
662
  readonly options: readonly [{
663
663
  readonly value: "off";
664
664
  readonly label: "Off";
665
665
  readonly description: "No pet";
666
666
  }, ...{
667
- value: "red" | "blue";
667
+ value: "orange" | "red" | "blue";
668
668
  label: string;
669
669
  description: string;
670
670
  }[]];
@@ -982,15 +982,23 @@ export declare const SETTINGS_SCHEMA: {
982
982
  };
983
983
  readonly "tools.maxInlineResultBytes": {
984
984
  readonly type: "number";
985
- readonly default: 0;
985
+ readonly default: 12;
986
986
  readonly ui: {
987
987
  readonly tab: "tools";
988
988
  readonly label: "Max inline tool-result size (KB)";
989
- readonly description: "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. 0 disables (default; opt-in pending measurement).";
989
+ readonly description: "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. Default 12 KB (live A/B, gajae #5945); 0 disables.";
990
990
  readonly options: readonly [{
991
991
  readonly value: "0";
992
992
  readonly label: "Off";
993
993
  readonly description: "Disabled; no absolute inline cap";
994
+ }, {
995
+ readonly value: "8";
996
+ readonly label: "8 KB";
997
+ readonly description: "~2K tokens";
998
+ }, {
999
+ readonly value: "12";
1000
+ readonly label: "12 KB";
1001
+ readonly description: "Default; ~3K tokens";
994
1002
  }, {
995
1003
  readonly value: "20";
996
1004
  readonly label: "20 KB";
@@ -1,5 +1,5 @@
1
1
  import type { ThinkingLevel } from "@sayknow-cli/agent-core";
2
- import { type Component, type PetSkinId } from "@sayknow-cli/tui";
2
+ import { type Component, type PetSkinId, type SayknowPixelFrameName } from "@sayknow-cli/tui";
3
3
  import { type KeyDisplayContext } from "../../config/keybindings";
4
4
  export interface RecentSession {
5
5
  name: string;
@@ -41,8 +41,22 @@ export interface WelcomeComponentOptions {
41
41
  continueKey?: string;
42
42
  /** Which Sayknow pet stands on the card (default red). */
43
43
  petSkin?: PetSkinId;
44
+ /**
45
+ * Sayo as an image in the card's text (kitty Unicode placeholders, already uploaded):
46
+ * the rows of each pose. Without it the card draws the pixel octopus in half blocks.
47
+ */
48
+ petImage?: {
49
+ rows: number;
50
+ line(pose: SayknowPixelFrameName, row: number): string;
51
+ };
44
52
  /** Called when a session row is opened by click or Enter. */
45
53
  onOpenSession?: (session: RecentSession) => void;
54
+ /**
55
+ * Whether a line of this card is on screen right now. When given, the pet keeps
56
+ * dancing after the intro for as long as its top row is visible, and stops for good
57
+ * once it scrolls away (changing a line above the viewport forces a full redraw).
58
+ */
59
+ isLineVisible?: (line: number) => boolean;
46
60
  }
47
61
  /**
48
62
  * Sayknow-CLI launch card: the wordmark with the pet beside it, who and where you are
@@ -65,6 +79,8 @@ export declare class WelcomeComponent implements Component {
65
79
  * only color and the tentacles move. Safe to call again — it restarts.
66
80
  */
67
81
  playIntro(requestRender: () => void): void;
82
+ /** True while the pet is dancing after the intro. */
83
+ get dancing(): boolean;
68
84
  dispose(): void;
69
85
  setModel(modelName: string, providerName: string): void;
70
86
  setRecentSessions(sessions: RecentSession[]): void;
@@ -41,10 +41,6 @@ export declare function getComposerPlaceholder(keybindings: Pick<KeybindingsMana
41
41
  readonly busyPromptMode: "steer" | "queue";
42
42
  }): string;
43
43
  export declare function getWelcomeTranscriptReservedRows(chatContainer: Container, width: number): number;
44
- /**
45
- * The pet on the launch card: the one the user keeps beside the composer, or —
46
- * with the pet off — the skin that matches the theme (blue for blue-octopus).
47
- */
48
44
  export declare function resolveWelcomePetSkin(petMode: PetMode, themeName: string | undefined): PetSkinId;
49
45
  export declare function configureDefaultComposerChrome(editor: CustomEditor): void;
50
46
  export type WelcomeBannerSettingMode = "auto" | "unicode" | "square" | "ascii";
@@ -1176,6 +1176,13 @@ export declare class AgentSession {
1176
1176
  * Saves to settings.
1177
1177
  */
1178
1178
  setInterruptMode(mode: "immediate" | "wait"): void;
1179
+ /**
1180
+ * Context promotion is opt-in and exists to use the larger model's headroom. On the
1181
+ * promoted model, keep the reserve-based limit instead of compacting at the same
1182
+ * 300K default ceiling that triggered the promotion.
1183
+ */
1184
+ /** The auto-compaction threshold in tokens this session uses now (adaptive and promotion included). */
1185
+ getAutoCompactionThresholdTokens(contextTokens?: number): number;
1179
1186
  /**
1180
1187
  * Manually compact the session context.
1181
1188
  * Aborts current agent operation first.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sayknow-cli/coding-agent",
4
- "version": "0.6.8",
4
+ "version": "0.7.1",
5
5
  "description": "Sayknow-CLI CLI with read, bash, edit, write tools and session management",
6
6
  "homepage": "https://sayknow-cli.com",
7
7
  "author": "jaybeyond",
@@ -54,12 +54,12 @@
54
54
  "@agentclientprotocol/sdk": "1.3.0",
55
55
  "@babel/parser": "^7.29.3",
56
56
  "@mozilla/readability": "^0.6.0",
57
- "@sayknow-cli/stats": "0.6.8",
58
- "@sayknow-cli/agent-core": "0.6.8",
59
- "@sayknow-cli/ai": "0.6.8",
60
- "@sayknow-cli/natives": "0.6.8",
61
- "@sayknow-cli/tui": "0.6.8",
62
- "@sayknow-cli/utils": "0.6.8",
57
+ "@sayknow-cli/stats": "0.7.1",
58
+ "@sayknow-cli/agent-core": "0.7.1",
59
+ "@sayknow-cli/ai": "0.7.1",
60
+ "@sayknow-cli/natives": "0.7.1",
61
+ "@sayknow-cli/tui": "0.7.1",
62
+ "@sayknow-cli/utils": "0.7.1",
63
63
  "@puppeteer/browsers": "^2.13.0",
64
64
  "@types/turndown": "5.0.6",
65
65
  "@xterm/headless": "^6.0.0",
@@ -11,6 +11,8 @@ const inventoryPath = process.env.SKC_SDK_OPERATION_INVENTORY
11
11
 
12
12
  /** Reviewed seams deliberately excluded from the public SDK operation surface. */
13
13
  const LOCKED_EXCLUSIONS: Readonly<Record<string, string>> = {
14
+ "agent_session:getAutoCompactionThresholdTokens":
15
+ "internal compaction-threshold accessor feeding the /context breakdown; exposed through context.get, not an independent SDK operation",
14
16
  "slash_command:settings": "visual/local-only command, not a user-facing SDK control seam",
15
17
  "slash_command:theme": "visual/local-only command, not a user-facing SDK control seam",
16
18
  "slash_command:copy": "visual/local-only command, not a user-facing SDK control seam",
@@ -5,6 +5,7 @@
5
5
  * prints the resulting content blocks exactly as the model would receive them
6
6
  * (including truncation/limit notices appended by the meta-notice wrapper).
7
7
  */
8
+ import type { AgentToolContext } from "@sayknow-cli/agent-core";
8
9
  import { getProjectDir } from "@sayknow-cli/utils";
9
10
  import chalk from "chalk";
10
11
  import { Settings } from "../config/settings";
@@ -38,7 +39,15 @@ export async function runReadCommand(cmd: ReadCommandArgs): Promise<void> {
38
39
  const tool = wrapToolWithMetaNotice(new ReadTool(session));
39
40
 
40
41
  try {
41
- const result = await tool.execute("skc-read", { path: cmd.path, truncation: cmd.truncation });
42
+ // Pass the loaded settings so the wrapper's output caps honor user config.
43
+ const context = { settings } as AgentToolContext;
44
+ const result = await tool.execute(
45
+ "skc-read",
46
+ { path: cmd.path, truncation: cmd.truncation },
47
+ undefined,
48
+ undefined,
49
+ context,
50
+ );
42
51
 
43
52
  for (const block of result.content) {
44
53
  if (block.type === "text") {
@@ -680,7 +680,8 @@ export const SETTINGS_SCHEMA = {
680
680
  ui: {
681
681
  tab: "appearance",
682
682
  label: "Sayknow Pet",
683
- description: "16x16 real-pixel sayknow living beside the composer (sixel/kitty terminals)",
683
+ description:
684
+ "Sayo the octopus beside the composer (kitty-graphics terminals draw the full image; sixel terminals a pixel version)",
684
685
  options: [
685
686
  { value: "off", label: "Off", description: "No pet" },
686
687
  ...PET_SKIN_IDS.map(id => ({
@@ -855,14 +856,16 @@ export const SETTINGS_SCHEMA = {
855
856
 
856
857
  "tools.maxInlineResultBytes": {
857
858
  type: "number",
858
- default: 0,
859
+ default: 12,
859
860
  ui: {
860
861
  tab: "tools",
861
862
  label: "Max inline tool-result size (KB)",
862
863
  description:
863
- "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. 0 disables (default; opt-in pending measurement).",
864
+ "Absolute backstop cap on inline tool-result text, enforced after artifact spill for every tool (including read and tools that set their own partial artifact meta). Output above this size is force-saved as an artifact and truncated to head+tail. Default 12 KB (live A/B, gajae #5945); 0 disables.",
864
865
  options: [
865
866
  { value: "0", label: "Off", description: "Disabled; no absolute inline cap" },
867
+ { value: "8", label: "8 KB", description: "~2K tokens" },
868
+ { value: "12", label: "12 KB", description: "Default; ~3K tokens" },
866
869
  { value: "20", label: "20 KB", description: "~5K tokens" },
867
870
  { value: "30", label: "30 KB", description: "~7.5K tokens" },
868
871
  { value: "50", label: "50 KB", description: "~12.5K tokens" },
@@ -11,6 +11,8 @@ const COST_43 = { input: 1.25, output: 2.5, cacheRead: 0.2, cacheWrite: 0 };
11
11
  const COST_45 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
12
12
  const COST_46 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
13
13
  const COST_420 = { input: 2, output: 6, cacheRead: 0.2, cacheWrite: 0 };
14
+ // Same as direct xAI grok-4.7 (packages/ai models.json).
15
+ const COST_47 = { input: 2, output: 6, cacheRead: 0.5, cacheWrite: 0 };
14
16
 
15
17
  // ─── Model type ───────────────────────────────────────────────────────────────
16
18
 
@@ -39,6 +41,30 @@ export interface GrokCliModelConfig {
39
41
  // the actual traffic captured through cli-chat-proxy.grok.com.
40
42
 
41
43
  const FALLBACK_MODELS: GrokCliModelConfig[] = [
44
+ {
45
+ // Served by cli-chat-proxy.grok.com/v1/models (checked 2026-09-29): grok-4.7,
46
+ // grok-4.7-build-fast, grok-4.6, grok-4.5. Metadata as direct xAI grok-4.7.
47
+ id: 'grok-4.7',
48
+ name: 'Grok 4.7',
49
+ reasoning: true,
50
+ input: ['text', 'image'],
51
+ cost: COST_47,
52
+ contextWindow: 500_000,
53
+ maxTokens: 30_000,
54
+ maxReasoningEffort: Effort.XHigh,
55
+ },
56
+ {
57
+ // The Grok Build fast variant of 4.7. xAI publishes no separate price or window;
58
+ // it is listed with grok-4.7's.
59
+ id: 'grok-4.7-build-fast',
60
+ name: 'Grok 4.7 Build Fast',
61
+ reasoning: true,
62
+ input: ['text', 'image'],
63
+ cost: COST_47,
64
+ contextWindow: 500_000,
65
+ maxTokens: 30_000,
66
+ maxReasoningEffort: Effort.XHigh,
67
+ },
42
68
  {
43
69
  id: 'grok-composer-2.5-fast',
44
70
  name: 'Composer 2.5 Fast (Grok CLI)',
@@ -140,6 +166,7 @@ const FALLBACK_MODELS: GrokCliModelConfig[] = [
140
166
  const MODEL_ALIASES: Readonly<Record<string, string>> = {
141
167
  'grok-4.5-latest': 'grok-4.5',
142
168
  'grok-4.6-latest': 'grok-4.6',
169
+ 'grok-4.7-latest': 'grok-4.7',
143
170
  'grok-build-latest': 'grok-4.5',
144
171
  };
145
172
 
@@ -166,6 +193,7 @@ const EFFORT_CAPABLE_PREFIXES = [
166
193
  'grok-4.3',
167
194
  'grok-4.5',
168
195
  'grok-4.6',
196
+ 'grok-4.7',
169
197
  ];
170
198
 
171
199
  export function supportsReasoningEffort(modelId: string): boolean {