@sayknow-cli/coding-agent 0.6.9 → 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,6 +2,18 @@
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
+
5
17
  ## [0.6.9] - 2026-09-29
6
18
 
7
19
  ### 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
  }[]];
@@ -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,6 +41,14 @@ 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;
46
54
  /**
@@ -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";
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.9",
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.9",
58
- "@sayknow-cli/agent-core": "0.6.9",
59
- "@sayknow-cli/ai": "0.6.9",
60
- "@sayknow-cli/natives": "0.6.9",
61
- "@sayknow-cli/tui": "0.6.9",
62
- "@sayknow-cli/utils": "0.6.9",
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",
@@ -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 => ({
@@ -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 {
@@ -275,7 +275,7 @@ export class SayknowPetWidget {
275
275
  const cell = getCellDimensions();
276
276
  this.#builtCellW = cell.widthPx;
277
277
  this.#builtCellH = cell.heightPx;
278
- const skin: PetSkinId = this.#mode === "off" ? "red" : this.#mode;
278
+ const skin: PetSkinId = this.#mode === "off" ? "orange" : this.#mode;
279
279
  if (protocol === "kitty") {
280
280
  this.#kittyImageId ??= allocatePetKittyImageId();
281
281
  this.#kittyCleanupPending = true;
@@ -52,6 +52,11 @@ export interface WelcomeComponentOptions {
52
52
  continueKey?: string;
53
53
  /** Which Sayknow pet stands on the card (default red). */
54
54
  petSkin?: PetSkinId;
55
+ /**
56
+ * Sayo as an image in the card's text (kitty Unicode placeholders, already uploaded):
57
+ * the rows of each pose. Without it the card draws the pixel octopus in half blocks.
58
+ */
59
+ petImage?: { rows: number; line(pose: SayknowPixelFrameName, row: number): string };
55
60
  /** Called when a session row is opened by click or Enter. */
56
61
  onOpenSession?: (session: RecentSession) => void;
57
62
  /**
@@ -455,7 +460,9 @@ export class WelcomeComponent implements Component {
455
460
  : this.#danceStart !== null
456
461
  ? this.#dancePose()
457
462
  : "base";
458
- return renderPetHalfBlocks(pose, this.options.petSkin ?? "red", theme.getColorMode(), { scale: "compact" });
463
+ const image = this.options.petImage;
464
+ if (image) return Array.from({ length: image.rows }, (_, row) => image.line(pose, row));
465
+ return renderPetHalfBlocks(pose, this.options.petSkin ?? "orange", theme.getColorMode(), { scale: "compact" });
459
466
  }
460
467
 
461
468
  /** One-line title for layouts without room for the wordmark. */
@@ -7,13 +7,17 @@ import type { Component, EditorTheme, SlashCommand } from "@sayknow-cli/tui";
7
7
  import {
8
8
  Container,
9
9
  clearRenderCache,
10
+ getCellDimensions,
10
11
  getRenderCacheRetainedBytes,
11
12
  isKeyRelease,
13
+ isUnderTmux,
12
14
  Loader,
13
15
  matchesKey,
14
16
  onImageProtocolChanged,
15
17
  ProcessTerminal,
18
+ prepareSayoPlaceholderImages,
16
19
  Spacer,
20
+ TERMINAL_ID,
17
21
  Text,
18
22
  TUI,
19
23
  } from "@sayknow-cli/tui";
@@ -68,6 +72,7 @@ import type { HookInputComponent } from "./components/hook-input";
68
72
  import type { HookSelectorComponent } from "./components/hook-selector";
69
73
  import { computeIrcSplitWidths, getIrcSidebarSemanticToken, IrcSplitViewComponent } from "./components/irc-sidebar";
70
74
  import {
75
+ getPetPixelProtocol,
71
76
  getPetUnavailableWarning,
72
77
  isPetAvailable,
73
78
  isPetCapabilityProbePending,
@@ -78,7 +83,13 @@ import { resolveCurrentBranch } from "./components/status-line/git-utils";
78
83
  import type { ToolExecutionHandle } from "./components/tool-execution";
79
84
  import { StatusLineComponent } from "./components/tool-status-header";
80
85
  import { composeToolText } from "./components/tool-transcript-format";
81
- import { type RecentSession, WelcomeComponent, type WelcomeLogoMode, type WelcomeSnapshot } from "./components/welcome";
86
+ import {
87
+ type RecentSession,
88
+ WelcomeComponent,
89
+ type WelcomeComponentOptions,
90
+ type WelcomeLogoMode,
91
+ type WelcomeSnapshot,
92
+ } from "./components/welcome";
82
93
  import { BtwController } from "./controllers/btw-controller";
83
94
  import { CommandController } from "./controllers/command-controller";
84
95
  import { EventController } from "./controllers/event-controller";
@@ -216,9 +227,14 @@ function getShellInputPrefix(isNoContext: boolean): string {
216
227
  * The pet on the launch card: the one the user keeps beside the composer, or —
217
228
  * with the pet off — the skin that matches the theme (blue for blue-octopus).
218
229
  */
230
+ /** Height of Sayo on the launch card in terminal rows (the wordmark block is 5 rows). */
231
+ const WELCOME_PET_IMAGE_ROWS = 5;
232
+ /** Kitty image ids for the launch card poses ("SY" + index; 24-bit, carried as a color). */
233
+ const WELCOME_PET_IMAGE_ID_BASE = 0x535901;
234
+
219
235
  export function resolveWelcomePetSkin(petMode: PetMode, themeName: string | undefined): PetSkinId {
220
236
  if (petMode !== "off") return petMode;
221
- return themeName?.startsWith("blue") ? "blue" : "red";
237
+ return themeName?.startsWith("blue") ? "blue" : "orange";
222
238
  }
223
239
 
224
240
  /**
@@ -788,6 +804,12 @@ export class InteractiveMode implements InteractiveModeContext {
788
804
  resumeKey: this.keybindings.getKeys("app.session.resume")[0],
789
805
  continueKey: this.keybindings.getKeys("app.session.continue")[0],
790
806
  petSkin: resolveWelcomePetSkin(settings.get("pet.mode"), getCurrentThemeName()),
807
+ petImage:
808
+ welcomeLogoMode === "unicode"
809
+ ? this.#prepareWelcomePetImage(
810
+ resolveWelcomePetSkin(settings.get("pet.mode"), getCurrentThemeName()),
811
+ )
812
+ : undefined,
791
813
  onOpenSession: session => void this.#openWelcomeSession(session),
792
814
  isLineVisible: line =>
793
815
  this.#welcomeComponent !== undefined && this.ui.isChildLineVisible(this.#welcomeComponent, line),
@@ -2217,6 +2239,34 @@ export class InteractiveMode implements InteractiveModeContext {
2217
2239
  this.#selectorController.showSessionSelector();
2218
2240
  }
2219
2241
 
2242
+ /**
2243
+ * Sayo as an image on the launch card, where the terminal draws kitty Unicode
2244
+ * placeholders (Ghostty, kitty outside a multiplexer: the placeholder carries the
2245
+ * image id as a 24-bit color, which tmux may not pass through). Uploads the card's
2246
+ * poses once; the card's text then refers to them. Undefined keeps the pixel octopus.
2247
+ */
2248
+ #prepareWelcomePetImage(skin: PetSkinId): WelcomeComponentOptions["petImage"] {
2249
+ if (getPetPixelProtocol() !== "kitty") return undefined;
2250
+ if (TERMINAL_ID !== "ghostty" && TERMINAL_ID !== "kitty") return undefined;
2251
+ if (isUnderTmux()) return undefined;
2252
+ try {
2253
+ const cell = getCellDimensions();
2254
+ const images = prepareSayoPlaceholderImages({
2255
+ tint: skin,
2256
+ rows: WELCOME_PET_IMAGE_ROWS,
2257
+ cellWidthPx: cell.widthPx,
2258
+ cellHeightPx: cell.heightPx,
2259
+ poses: ["base", "danceL", "danceR", "flex"],
2260
+ idBase: WELCOME_PET_IMAGE_ID_BASE,
2261
+ });
2262
+ this.ui.terminal.write(images.upload);
2263
+ return images;
2264
+ } catch (error) {
2265
+ logger.debug("Launch card pet image unavailable", { error: String(error) });
2266
+ return undefined;
2267
+ }
2268
+ }
2269
+
2220
2270
  #currentSessionFileCanonical(): string | undefined {
2221
2271
  const currentFile = this.sessionManager.getSessionFile();
2222
2272
  return currentFile ? canonicalPath(currentFile) : undefined;
@@ -4288,6 +4288,17 @@
4288
4288
  "packages/coding-agent/test/sdk-operation-inventory.test.ts"
4289
4289
  ]
4290
4290
  },
4291
+ {
4292
+ "sourceId": "agent_session:getAutoCompactionThresholdTokens",
4293
+ "sourceFile": "packages/coding-agent/src/session/agent-session.ts",
4294
+ "sourceKind": "agent_session",
4295
+ "decision": "exclude",
4296
+ "rationale": "internal compaction-threshold accessor feeding the /context breakdown; exposed through context.get, not an independent SDK operation",
4297
+ "exclusionMetadata": {
4298
+ "adapterMappings": "not_applicable",
4299
+ "testIds": "not_applicable"
4300
+ }
4301
+ },
4291
4302
  {
4292
4303
  "sourceId": "agent_session:compact",
4293
4304
  "sourceFile": "packages/coding-agent/src/session/agent-session.ts",