@zergai/ztc 0.16.2-dev.202611091056 → 0.17.0-beta.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/README.md +31 -0
- package/RUST_THIRD_PARTY_LICENSES.txt +790 -753
- package/THIRD_PARTY_NOTICES.md +1203 -8
- package/bin/zmux-darwin-arm64 +0 -0
- package/bin/ztc-audio-darwin-arm64 +0 -0
- package/bin/ztc-capture-darwin-arm64 +0 -0
- package/bin/ztc-computer-darwin-arm64 +0 -0
- package/bin/ztc-llm-darwin-arm64 +0 -0
- package/bin/ztc-tts-darwin-arm64 +0 -0
- package/bin/ztc-tui-darwin-arm64 +0 -0
- package/bin/zterm-darwin-arm64 +0 -0
- package/dist/agent/commands/settings.js +17 -0
- package/dist/config/types.d.ts +9 -0
- package/dist/diagnostics/native_terminal_benchmark.js +9 -2
- package/dist/mcp/workspace_server.d.ts +10 -0
- package/dist/mcp/workspace_server.js +8 -0
- package/dist/panes/agent_cli.d.ts +6 -2
- package/dist/panes/agent_cli.js +7 -2
- package/dist/panes/agent_panes.d.ts +1 -1
- package/dist/panes/agent_panes.js +15 -1
- package/dist/panes/claude_notifications.d.ts +27 -0
- package/dist/panes/claude_notifications.js +34 -0
- package/dist/ui/core/text_width.d.ts +16 -5
- package/dist/ui/core/text_width.js +100 -22
- package/dist/ui/ratatui/pane_relay.js +2 -2
- package/dist/ui/ratatui/protocol.d.ts +57 -0
- package/dist/ui/ratatui/protocol.js +11 -0
- package/dist/ui/scrollback.js +11 -3
- package/dist/zlm-embed.mjs +1 -1
- package/package.json +44 -10
|
@@ -40,6 +40,48 @@ export declare const CAPABILITY_CLIPBOARD_IMAGE = "clipboard_image";
|
|
|
40
40
|
export declare const CAPABILITY_CLIPBOARD_TEXT = "clipboard_text";
|
|
41
41
|
/** The renderer writes `transmit_image` uploads to its terminal. */
|
|
42
42
|
export declare const CAPABILITY_KITTY_GRAPHICS = "kitty_graphics";
|
|
43
|
+
/**
|
|
44
|
+
* The renderer shows each synchronized update (DEC mode 2026) whole, as
|
|
45
|
+
* zterm's native test proves; ZTC tells Claude Code to use them there.
|
|
46
|
+
*/
|
|
47
|
+
export declare const CAPABILITY_SYNCHRONIZED_OUTPUT = "synchronized_output_v1";
|
|
48
|
+
/**
|
|
49
|
+
* The renderer badges a pane, and its tab, when the pane's program rings the
|
|
50
|
+
* bell or posts a notification (OSC 9, 777 or 99) while the person isn't
|
|
51
|
+
* looking at it, and lists the badge as the pane's `attention`.
|
|
52
|
+
*/
|
|
53
|
+
export declare const CAPABILITY_ATTENTION_BADGES = "attention_badges_v1";
|
|
54
|
+
/** Render work the native renderer counted, rather than timed, over `frames` frames
|
|
55
|
+
* (packages/zterm/src/terminal/stats.rs). Lock and repaint times are nanoseconds. */
|
|
56
|
+
export interface TerminalRenderCounters {
|
|
57
|
+
frames: number;
|
|
58
|
+
/** Shapes painted on every layer, before tessellation; `text_shapes` of them text. */
|
|
59
|
+
shapes: number;
|
|
60
|
+
text_shapes: number;
|
|
61
|
+
/** Terminal grid rows whose shapes were built again. */
|
|
62
|
+
rows_rebuilt: number;
|
|
63
|
+
/** Terminal lock taken by the renderer and input writers (not the PTY reader). */
|
|
64
|
+
term_lock_acquisitions: number;
|
|
65
|
+
term_lock_wait_ns: number;
|
|
66
|
+
term_lock_hold_ns: number;
|
|
67
|
+
/** The same, apart, for accessibility reading the visible panes for an assistive client
|
|
68
|
+
* (only while one is attached). Absent from renderers that predate these counters. */
|
|
69
|
+
accessibility_lock_acquisitions?: number;
|
|
70
|
+
accessibility_lock_wait_ns?: number;
|
|
71
|
+
accessibility_lock_hold_ns?: number;
|
|
72
|
+
/** Repaints terminal panes asked egui for, and the time those requests took. */
|
|
73
|
+
repaint_requests: number;
|
|
74
|
+
repaint_request_ns: number;
|
|
75
|
+
/** Frames tessellated again to count vertices (ZTERM_COUNT_VERTICES=N: every Nth). */
|
|
76
|
+
tessellated_frames: number;
|
|
77
|
+
vertices: number;
|
|
78
|
+
indices: number;
|
|
79
|
+
}
|
|
80
|
+
/** Counters for the last completed frame and summed since launch. */
|
|
81
|
+
export interface TerminalRenderStats {
|
|
82
|
+
last_frame: TerminalRenderCounters;
|
|
83
|
+
totals: TerminalRenderCounters;
|
|
84
|
+
}
|
|
43
85
|
export type SplitDirection = 'horizontal' | 'vertical';
|
|
44
86
|
export type LayoutPreset = 'grid' | 'columns' | 'rows' | 'main_and_stack';
|
|
45
87
|
export type PaneScrollMode = 'line_up' | 'line_down' | 'page_up' | 'page_down' | 'top' | 'bottom' | 'ratio';
|
|
@@ -53,6 +95,17 @@ export interface PaneLabels {
|
|
|
53
95
|
}
|
|
54
96
|
/** What a renderer's new-pane menu asks the owner to open; absent means a ZTC pane. */
|
|
55
97
|
export type PaneRequestKind = 'ztc' | 'shell' | 'claude_code' | 'codex';
|
|
98
|
+
/**
|
|
99
|
+
* The bells and notifications a pane's program sent while the person wasn't
|
|
100
|
+
* looking at it (packages/ztc-core/src/protocol.rs). `kind` is notification
|
|
101
|
+
* once any notification came; `text` is the latest text one brought, made
|
|
102
|
+
* safe to show.
|
|
103
|
+
*/
|
|
104
|
+
export interface PaneAttention {
|
|
105
|
+
kind: 'bell' | 'notification';
|
|
106
|
+
text?: string;
|
|
107
|
+
count: number;
|
|
108
|
+
}
|
|
56
109
|
export interface PaneInfo {
|
|
57
110
|
id: number;
|
|
58
111
|
title: string;
|
|
@@ -73,6 +126,8 @@ export interface PaneInfo {
|
|
|
73
126
|
activity_status?: string;
|
|
74
127
|
activity_spinner?: string;
|
|
75
128
|
activity_label?: string;
|
|
129
|
+
/** Absent from renderers that don't track bells and notifications. */
|
|
130
|
+
attention?: PaneAttention;
|
|
76
131
|
}
|
|
77
132
|
export type MuxLayoutNode = {
|
|
78
133
|
type: 'leaf';
|
|
@@ -575,6 +630,7 @@ export type RustEvent = DesktopTaskAction | DesktopRuntimeAction | DesktopSessio
|
|
|
575
630
|
/** Native previous-frame CPU update/render ms, excluding vsync/presentation.
|
|
576
631
|
* History is oldest→newest, finite/nonnegative, last≤120; sample count is cumulative.
|
|
577
632
|
* Grid is protocol owner pane 0; pane count includes that owner.
|
|
633
|
+
* `render_stats` is absent from renderers that don't count render work.
|
|
578
634
|
*/
|
|
579
635
|
| {
|
|
580
636
|
type: 'terminal_metrics';
|
|
@@ -589,6 +645,7 @@ export type RustEvent = DesktopTaskAction | DesktopRuntimeAction | DesktopSessio
|
|
|
589
645
|
window_height_points: number;
|
|
590
646
|
pixels_per_point: number;
|
|
591
647
|
focused: boolean;
|
|
648
|
+
render_stats?: TerminalRenderStats;
|
|
592
649
|
} | {
|
|
593
650
|
type: 'workspace_pane_action';
|
|
594
651
|
pane_id: number;
|
|
@@ -17,6 +17,17 @@ export const CAPABILITY_CLIPBOARD_IMAGE = 'clipboard_image';
|
|
|
17
17
|
export const CAPABILITY_CLIPBOARD_TEXT = 'clipboard_text';
|
|
18
18
|
/** The renderer writes `transmit_image` uploads to its terminal. */
|
|
19
19
|
export const CAPABILITY_KITTY_GRAPHICS = 'kitty_graphics';
|
|
20
|
+
/**
|
|
21
|
+
* The renderer shows each synchronized update (DEC mode 2026) whole, as
|
|
22
|
+
* zterm's native test proves; ZTC tells Claude Code to use them there.
|
|
23
|
+
*/
|
|
24
|
+
export const CAPABILITY_SYNCHRONIZED_OUTPUT = 'synchronized_output_v1';
|
|
25
|
+
/**
|
|
26
|
+
* The renderer badges a pane, and its tab, when the pane's program rings the
|
|
27
|
+
* bell or posts a notification (OSC 9, 777 or 99) while the person isn't
|
|
28
|
+
* looking at it, and lists the badge as the pane's `attention`.
|
|
29
|
+
*/
|
|
30
|
+
export const CAPABILITY_ATTENTION_BADGES = 'attention_badges_v1';
|
|
20
31
|
// ============================================================================
|
|
21
32
|
// Serialization helpers
|
|
22
33
|
// ============================================================================
|
package/dist/ui/scrollback.js
CHANGED
|
@@ -13,7 +13,7 @@ import { TERMINAL_THEME } from './views/theme.js';
|
|
|
13
13
|
import { ZTC_WORDMARK } from '../onboarding/wordmark.js';
|
|
14
14
|
import { wrapText } from './core/wrap_text.js';
|
|
15
15
|
import { CODE_FRAME_DEFAULT_WIDTH, ListNesting, MESSAGE_BODY_INDENT, RECAP_CONTINUATION_INDENT, RECAP_PREFIX, THINKING_BODY_INDENT, TRANSCRIPT_INDENT_STEP, frameIndentFor, indentUnits, leadingIndentSpaces, parseListMarker, parseQuotePrefix, quoteGutter, } from './indent.js';
|
|
16
|
-
import { displayWidth, normalizeTranscriptText, padEndDisplay, } from './core/text_width.js';
|
|
16
|
+
import { displayWidth, expandTabs, normalizeTranscriptText, padEndDisplay, } from './core/text_width.js';
|
|
17
17
|
import { attachmentImagePreviews, extractImageTokens, imagePathPreviews, toolImagePreviews, TRANSCRIPT_IMAGE_MAX_COLS, } from './terminal_image.js';
|
|
18
18
|
/** Leading whitespace of a line, as written in the source. */
|
|
19
19
|
const LEADING_WHITESPACE = /^[ \t]*/;
|
|
@@ -76,6 +76,14 @@ function isBlankScrollbackLine(line) {
|
|
|
76
76
|
// Re-export for back-compat with existing callers (tests, table renderer, etc.).
|
|
77
77
|
// New code should import directly from `./core/text_width.js`.
|
|
78
78
|
export { displayWidth, normalizeTranscriptText, padEndDisplay };
|
|
79
|
+
/**
|
|
80
|
+
* A message body's lines as the transcript lays them out: normalized, and
|
|
81
|
+
* each tab expanded to its tab stop. The panes that show the transcript
|
|
82
|
+
* give a tab no column, so tab-indented code would show no indentation.
|
|
83
|
+
*/
|
|
84
|
+
function transcriptLines(content) {
|
|
85
|
+
return normalizeTranscriptText(content).split('\n').map(line => expandTabs(line));
|
|
86
|
+
}
|
|
79
87
|
const ANSI_RE = /\x1b\[[0-9;]*m/g;
|
|
80
88
|
/**
|
|
81
89
|
* Group tokens into wrap units.
|
|
@@ -596,7 +604,7 @@ export function wordmarkWelcomeRows(content, cols, showMark) {
|
|
|
596
604
|
*/
|
|
597
605
|
export function renderBodyToScrollback(content, isToolTrace, cols, options = {}) {
|
|
598
606
|
const result = [];
|
|
599
|
-
const lines =
|
|
607
|
+
const lines = transcriptLines(content);
|
|
600
608
|
const indent = options.indent ?? MESSAGE_BODY_INDENT;
|
|
601
609
|
let tableBuffer = [];
|
|
602
610
|
const flushTable = () => {
|
|
@@ -692,7 +700,7 @@ export function renderBodyToScrollback(content, isToolTrace, cols, options = {})
|
|
|
692
700
|
*/
|
|
693
701
|
export function renderMarkdownToScrollback(content, cols = 0, options = {}) {
|
|
694
702
|
const result = [];
|
|
695
|
-
const lines =
|
|
703
|
+
const lines = transcriptLines(content);
|
|
696
704
|
const indent = options.indent ?? MESSAGE_BODY_INDENT;
|
|
697
705
|
// Framed blocks (code fences, box tables) bleed one step left of the body:
|
|
698
706
|
// the chrome takes the gutter, so the framed text lands on the prose column.
|
package/dist/zlm-embed.mjs
CHANGED
|
@@ -44833,7 +44833,7 @@ var invokeSkillTool = makeInvokeSkillTool(resolveAmbientSkills);
|
|
|
44833
44833
|
// src/zlm.ts
|
|
44834
44834
|
var ZLM_EMBED_API_VERSION = "zerglang.ztc-embed/1";
|
|
44835
44835
|
var ZLM_STDIO_PROTOCOL = "zerglang.ztc-host/1";
|
|
44836
|
-
var ZLM_ZTC_VERSION = true ? "0.
|
|
44836
|
+
var ZLM_ZTC_VERSION = true ? "0.17.0-beta.1" : "development";
|
|
44837
44837
|
var ZLM_MAX_HOST_TOOLS = 64;
|
|
44838
44838
|
var ZLM_MAX_SYSTEM_PROMPT_BYTES = 128 * 1024;
|
|
44839
44839
|
var ZLM_HOST_APPROVAL_CAPABILITIES = Object.freeze([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zergai/ztc",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0-beta.1",
|
|
4
4
|
"description": "Zerg Terminal Client - CLI agent for continual AI systems",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"homepage": "https://zergai.com/docs/ztc",
|
|
@@ -154,6 +154,7 @@
|
|
|
154
154
|
"test:unit:ci": "node scripts/run-unit-tests.mjs --ci",
|
|
155
155
|
"test:unit:fast": "node scripts/run-unit-tests.mjs --fast",
|
|
156
156
|
"test:zterm:smoke": "cargo build --manifest-path packages/zterm/Cargo.toml && node tests/sim/smoke-zterm-desktop.mjs",
|
|
157
|
+
"test:zterm-bench": "node scripts/test-zterm-bench.mjs",
|
|
157
158
|
"release:zterm:request": "node scripts/write-zterm-release-request.mjs",
|
|
158
159
|
"release:zterm:package": "node scripts/package-zterm-macos.mjs",
|
|
159
160
|
"release:zterm:collect": "node scripts/collect-zterm-release.mjs",
|
|
@@ -275,15 +276,15 @@
|
|
|
275
276
|
"node": "^20.19.0 || >=22.12.0"
|
|
276
277
|
},
|
|
277
278
|
"zergRelease": {
|
|
278
|
-
"branch": "
|
|
279
|
-
"channel": "
|
|
280
|
-
"sourceCommit": "
|
|
279
|
+
"branch": "main",
|
|
280
|
+
"channel": "next",
|
|
281
|
+
"sourceCommit": "bc68c439703355c11769f2a693bd35368ab89bb1",
|
|
281
282
|
"sourceVersion": "0.2.0-canary.2",
|
|
282
283
|
"whatsNew": [
|
|
283
|
-
"
|
|
284
|
-
"
|
|
285
|
-
"
|
|
286
|
-
"
|
|
284
|
+
"Terminal panes in the desktop app draw in JetBrains Mono with real bold and italic, and braille, Powerline and icons draw instead of boxes.",
|
|
285
|
+
"Shift+Enter starts a new line in Claude Code and Codex, and terminal panes gain search, Cmd-click links, file drops and terminal selection.",
|
|
286
|
+
"Keys reach a terminal program in a fraction of a millisecond, even as its pane floods with output, and closing a pane closes its terminal.",
|
|
287
|
+
"What you queue with Tab, or type during an account change, is still yours when it runs, and an account change no longer freezes ZTC."
|
|
287
288
|
],
|
|
288
289
|
"changes": [
|
|
289
290
|
"What you queue is still yours when it runs.",
|
|
@@ -292,11 +293,44 @@
|
|
|
292
293
|
"The desktop app's Send now waits for an account or model change.",
|
|
293
294
|
"A line typed during an account or model change can be edited, removed and sent from the queue.",
|
|
294
295
|
"The terminal's queue editor keeps a queued image that has no text.",
|
|
295
|
-
"Saving settings never leaves config.json half written."
|
|
296
|
+
"Saving settings never leaves config.json half written.",
|
|
297
|
+
"Panes an agent opens follow your settings.",
|
|
298
|
+
"Narrowing a desktop terminal pane no longer takes memory out of all proportion to what it keeps.",
|
|
299
|
+
"A font size in ZTerm's settings file is read into the range zoom allows, 9 to 28 points.",
|
|
300
|
+
"Closing a desktop terminal pane closes its terminal.",
|
|
301
|
+
"Shift+Enter and Option+Enter start a new line in Claude Code and Codex in the desktop app.",
|
|
302
|
+
"Left Option is Alt and right Option types characters in terminal panes.",
|
|
303
|
+
"Scrollback keys in terminal panes.",
|
|
304
|
+
"Input methods compose at the cursor, and dropped files paste their paths.",
|
|
305
|
+
"Selecting in terminal panes works as it does in a terminal.",
|
|
306
|
+
"Search in terminal panes lights each match and moves between them.",
|
|
307
|
+
"Search in terminal panes holds up over wide characters that line editing or a resize cut short or moved.",
|
|
308
|
+
"Cmd-click opens links in terminal panes.",
|
|
309
|
+
"Pastes of any length reach the program.",
|
|
310
|
+
"A pane that rings or notifies wears a badge until you look at it.",
|
|
311
|
+
"Programs can copy to the clipboard and ask the terminal about itself.",
|
|
312
|
+
"A new split opens where the focused pane is working",
|
|
313
|
+
"Claude Code panes in the desktop app redraw without tearing",
|
|
314
|
+
"Every underline style is drawn in terminal panes.",
|
|
315
|
+
"Programs can set the colours their pane draws in.",
|
|
316
|
+
"A cursor a program asks to blink blinks.",
|
|
317
|
+
"A scrolled-back terminal pane shows the lines it is scrolled to.",
|
|
318
|
+
"Bold, dim and the cursor are drawn as the program asks in terminal panes.",
|
|
319
|
+
"\"process exited\" never covers a pane's output.",
|
|
320
|
+
"Escape ends a search, so no terminal pane keeps its matches lit.",
|
|
321
|
+
"Cmd-C copies exactly the text you selected",
|
|
322
|
+
"The mouse wheel and trackpad scroll vim, less, htop and similar programs one line per row of movement",
|
|
323
|
+
"Programs get answers to their queries at once.",
|
|
324
|
+
"A pane resized so narrow that it splits a wide character keeps showing its cursor.",
|
|
325
|
+
"Braille, sextants, Nerd Font icons, Powerline separators and Claude Code's and Codex's symbols draw instead of empty boxes",
|
|
326
|
+
"ZTC's own panes draw what ZTC sends them.",
|
|
327
|
+
"Selecting in ZTC's own panes takes whole characters.",
|
|
328
|
+
"A window title a program sets is kept as printable text.",
|
|
329
|
+
"Pasting control characters into a program without bracketed paste asks first."
|
|
296
330
|
]
|
|
297
331
|
},
|
|
298
332
|
"publishConfig": {
|
|
299
|
-
"tag": "
|
|
333
|
+
"tag": "next",
|
|
300
334
|
"access": "public"
|
|
301
335
|
}
|
|
302
336
|
}
|