zerg-ztc 0.1.11 → 0.1.12

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.
Files changed (122) hide show
  1. package/bin/ztc-audio-darwin-arm64 +0 -0
  2. package/dist/utils/dictation_native.d.ts.map +1 -1
  3. package/dist/utils/dictation_native.js +43 -23
  4. package/dist/utils/dictation_native.js.map +1 -1
  5. package/package.json +5 -4
  6. package/packages/ztc-dictation/Cargo.toml +0 -43
  7. package/packages/ztc-dictation/README.md +0 -65
  8. package/packages/ztc-dictation/index.d.ts +0 -16
  9. package/packages/ztc-dictation/index.js +0 -74
  10. package/packages/ztc-dictation/package.json +0 -41
  11. package/packages/ztc-dictation/src/main.rs +0 -430
  12. package/src/App.tsx +0 -910
  13. package/src/agent/agent.ts +0 -534
  14. package/src/agent/backends/anthropic.ts +0 -86
  15. package/src/agent/backends/gemini.ts +0 -119
  16. package/src/agent/backends/inception.ts +0 -23
  17. package/src/agent/backends/index.ts +0 -17
  18. package/src/agent/backends/openai.ts +0 -23
  19. package/src/agent/backends/openai_compatible.ts +0 -143
  20. package/src/agent/backends/types.ts +0 -83
  21. package/src/agent/commands/clipboard.ts +0 -77
  22. package/src/agent/commands/config.ts +0 -204
  23. package/src/agent/commands/debug.ts +0 -23
  24. package/src/agent/commands/dictation.ts +0 -11
  25. package/src/agent/commands/emulation.ts +0 -80
  26. package/src/agent/commands/execution.ts +0 -9
  27. package/src/agent/commands/help.ts +0 -20
  28. package/src/agent/commands/history.ts +0 -13
  29. package/src/agent/commands/index.ts +0 -48
  30. package/src/agent/commands/input_mode.ts +0 -22
  31. package/src/agent/commands/keybindings.ts +0 -40
  32. package/src/agent/commands/model.ts +0 -11
  33. package/src/agent/commands/models.ts +0 -116
  34. package/src/agent/commands/permissions.ts +0 -64
  35. package/src/agent/commands/retry.ts +0 -9
  36. package/src/agent/commands/shell.ts +0 -68
  37. package/src/agent/commands/skills.ts +0 -54
  38. package/src/agent/commands/status.ts +0 -19
  39. package/src/agent/commands/types.ts +0 -88
  40. package/src/agent/commands/update.ts +0 -32
  41. package/src/agent/factory.ts +0 -60
  42. package/src/agent/index.ts +0 -20
  43. package/src/agent/runtime/capabilities.ts +0 -7
  44. package/src/agent/runtime/memory.ts +0 -23
  45. package/src/agent/runtime/policy.ts +0 -48
  46. package/src/agent/runtime/session.ts +0 -18
  47. package/src/agent/runtime/tracing.ts +0 -23
  48. package/src/agent/tools/file.ts +0 -178
  49. package/src/agent/tools/index.ts +0 -52
  50. package/src/agent/tools/screenshot.ts +0 -821
  51. package/src/agent/tools/search.ts +0 -138
  52. package/src/agent/tools/shell.ts +0 -69
  53. package/src/agent/tools/skills.ts +0 -28
  54. package/src/agent/tools/types.ts +0 -14
  55. package/src/agent/tools/zerg.ts +0 -50
  56. package/src/cli.tsx +0 -163
  57. package/src/components/ActivityLine.tsx +0 -23
  58. package/src/components/FullScreen.tsx +0 -79
  59. package/src/components/Header.tsx +0 -27
  60. package/src/components/InputArea.tsx +0 -1660
  61. package/src/components/MessageList.tsx +0 -71
  62. package/src/components/SingleMessage.tsx +0 -298
  63. package/src/components/StatusBar.tsx +0 -55
  64. package/src/components/index.tsx +0 -8
  65. package/src/config/types.ts +0 -19
  66. package/src/config.ts +0 -186
  67. package/src/debug/logger.ts +0 -14
  68. package/src/emulation/README.md +0 -24
  69. package/src/emulation/catalog.ts +0 -82
  70. package/src/emulation/trace_style.ts +0 -8
  71. package/src/emulation/types.ts +0 -7
  72. package/src/skills/index.ts +0 -36
  73. package/src/skills/loader.ts +0 -135
  74. package/src/skills/registry.ts +0 -6
  75. package/src/skills/types.ts +0 -10
  76. package/src/types.ts +0 -84
  77. package/src/ui/README.md +0 -44
  78. package/src/ui/core/factory.ts +0 -9
  79. package/src/ui/core/index.ts +0 -4
  80. package/src/ui/core/input.ts +0 -38
  81. package/src/ui/core/input_segments.ts +0 -410
  82. package/src/ui/core/input_state.ts +0 -17
  83. package/src/ui/core/layout_yoga.ts +0 -122
  84. package/src/ui/core/style.ts +0 -38
  85. package/src/ui/core/types.ts +0 -54
  86. package/src/ui/ink/index.tsx +0 -1
  87. package/src/ui/ink/render.tsx +0 -60
  88. package/src/ui/views/activity_line.ts +0 -33
  89. package/src/ui/views/app.ts +0 -111
  90. package/src/ui/views/header.ts +0 -44
  91. package/src/ui/views/input_area.ts +0 -255
  92. package/src/ui/views/message_list.ts +0 -443
  93. package/src/ui/views/status_bar.ts +0 -114
  94. package/src/ui/vue/index.ts +0 -53
  95. package/src/ui/web/frame_render.tsx +0 -148
  96. package/src/ui/web/index.tsx +0 -1
  97. package/src/ui/web/render.tsx +0 -41
  98. package/src/utils/clipboard.ts +0 -39
  99. package/src/utils/clipboard_image.ts +0 -40
  100. package/src/utils/dictation.ts +0 -467
  101. package/src/utils/dictation_native.ts +0 -258
  102. package/src/utils/diff.ts +0 -52
  103. package/src/utils/image_preview.ts +0 -36
  104. package/src/utils/models.ts +0 -98
  105. package/src/utils/path_complete.ts +0 -173
  106. package/src/utils/path_format.ts +0 -99
  107. package/src/utils/shell.ts +0 -72
  108. package/src/utils/spinner_frames.ts +0 -1
  109. package/src/utils/spinner_verbs.ts +0 -23
  110. package/src/utils/table.ts +0 -171
  111. package/src/utils/tool_summary.ts +0 -56
  112. package/src/utils/tool_trace.ts +0 -346
  113. package/src/utils/update.ts +0 -44
  114. package/src/utils/version.ts +0 -15
  115. package/src/web/index.html +0 -352
  116. package/src/web/mirror-favicon.svg +0 -4
  117. package/src/web/mirror.html +0 -641
  118. package/src/web/mirror_hook.ts +0 -25
  119. package/src/web/mirror_server.ts +0 -204
  120. package/tsconfig.json +0 -22
  121. package/vite.config.ts +0 -363
  122. /package/{packages/ztc-dictation/bin → bin}/.gitkeep +0 -0
@@ -1,352 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>ZTC - Zerg Terminal Client</title>
7
- <style>
8
- * { box-sizing: border-box; margin: 0; padding: 0; }
9
-
10
- :root {
11
- --bg: #0d1117;
12
- --fg: #e6edf3;
13
- --gray: #7d8590;
14
- --blue: #58a6ff;
15
- --magenta: #d2a8ff;
16
- --green: #3fb950;
17
- --yellow: #d29922;
18
- --red: #f85149;
19
- --cyan: #76e3ea;
20
- }
21
-
22
- body {
23
- font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
24
- font-size: 14px;
25
- background: var(--bg);
26
- color: var(--fg);
27
- height: 100vh;
28
- display: flex;
29
- flex-direction: column;
30
- }
31
-
32
- .header {
33
- padding: 8px 16px;
34
- display: flex;
35
- justify-content: space-between;
36
- border-bottom: 1px solid #30363d;
37
- }
38
-
39
- .header-title {
40
- color: var(--magenta);
41
- font-weight: bold;
42
- }
43
-
44
- .header-help {
45
- color: var(--gray);
46
- }
47
-
48
- .messages {
49
- flex: 1;
50
- overflow-y: auto;
51
- padding: 16px;
52
- display: flex;
53
- flex-direction: column;
54
- }
55
-
56
- .message {
57
- margin-bottom: 16px;
58
- }
59
-
60
- .message-header {
61
- display: flex;
62
- align-items: center;
63
- gap: 8px;
64
- margin-bottom: 4px;
65
- }
66
-
67
- .message-role {
68
- font-weight: bold;
69
- }
70
-
71
- .message-role.user { color: var(--blue); }
72
- .message-role.assistant { color: var(--magenta); }
73
- .message-role.system { color: var(--gray); }
74
- .message-role.tool { color: var(--yellow); }
75
-
76
- .message-time {
77
- color: var(--gray);
78
- font-size: 12px;
79
- }
80
-
81
- .message-content {
82
- margin-left: 24px;
83
- white-space: pre-wrap;
84
- line-height: 1.5;
85
- }
86
-
87
- .tool-call {
88
- margin-left: 24px;
89
- margin-top: 8px;
90
- padding: 8px;
91
- background: #161b22;
92
- border-radius: 4px;
93
- }
94
-
95
- .tool-name {
96
- color: var(--cyan);
97
- font-weight: bold;
98
- }
99
-
100
- .tool-status {
101
- margin-left: 8px;
102
- }
103
-
104
- .tool-status.running { color: var(--yellow); }
105
- .tool-status.complete { color: var(--green); }
106
- .tool-status.error { color: var(--red); }
107
-
108
- .input-area {
109
- padding: 16px;
110
- border-top: 1px solid #30363d;
111
- display: flex;
112
- align-items: center;
113
- gap: 8px;
114
- }
115
-
116
- .input-prompt {
117
- color: var(--blue);
118
- font-weight: bold;
119
- }
120
-
121
- .input-field {
122
- flex: 1;
123
- background: transparent;
124
- border: none;
125
- color: var(--fg);
126
- font-family: inherit;
127
- font-size: inherit;
128
- outline: none;
129
- }
130
-
131
- .input-field::placeholder {
132
- color: var(--gray);
133
- }
134
-
135
- .input-field:disabled {
136
- opacity: 0.5;
137
- }
138
-
139
- .status-bar {
140
- padding: 8px 16px;
141
- display: flex;
142
- justify-content: space-between;
143
- background: #161b22;
144
- font-size: 12px;
145
- }
146
-
147
- .status-left {
148
- display: flex;
149
- align-items: center;
150
- gap: 8px;
151
- }
152
-
153
- .status-indicator {
154
- width: 8px;
155
- height: 8px;
156
- border-radius: 50%;
157
- }
158
-
159
- .status-indicator.idle { background: var(--green); }
160
- .status-indicator.thinking { background: var(--yellow); animation: pulse 1s infinite; }
161
- .status-indicator.error { background: var(--red); }
162
-
163
- @keyframes pulse {
164
- 0%, 100% { opacity: 1; }
165
- 50% { opacity: 0.5; }
166
- }
167
-
168
- .status-right {
169
- color: var(--gray);
170
- }
171
-
172
- /* Debug mode */
173
- .debug .header,
174
- .debug .messages,
175
- .debug .input-area,
176
- .debug .status-bar {
177
- border: 1px dashed var(--gray);
178
- }
179
- </style>
180
- </head>
181
- <body>
182
- <div id="root"></div>
183
-
184
- <script type="module">
185
- // Simple state management
186
- const state = {
187
- messages: [],
188
- agentState: { status: 'idle' },
189
- debug: false
190
- };
191
-
192
- const generateId = () => Math.random().toString(36).slice(2, 11);
193
-
194
- function formatTime(date) {
195
- return date.toLocaleTimeString('en-US', {
196
- hour: '2-digit',
197
- minute: '2-digit',
198
- hour12: false
199
- });
200
- }
201
-
202
- const roleIcons = {
203
- user: '❯',
204
- assistant: '◆',
205
- system: '●',
206
- tool: '⚙'
207
- };
208
-
209
- function render() {
210
- const root = document.getElementById('root');
211
- root.innerHTML = `
212
- <div class="header">
213
- <div>
214
- <span class="header-title">◆ Zerg Terminal Client ◆</span>
215
- <span style="color: var(--gray)"> v0.1.0</span>
216
- </div>
217
- <div class="header-help">Ctrl+Enter send • /help</div>
218
- </div>
219
-
220
- <div class="messages" id="messages">
221
- ${state.messages.map(msg => `
222
- <div class="message">
223
- <div class="message-header">
224
- <span class="message-role ${msg.role}">${roleIcons[msg.role]} ${msg.role === 'user' ? 'You' : msg.role === 'assistant' ? 'Zerg' : msg.role.charAt(0).toUpperCase() + msg.role.slice(1)}</span>
225
- <span class="message-time">• ${formatTime(msg.timestamp)}</span>
226
- </div>
227
- <div class="message-content">${escapeHtml(msg.content)}</div>
228
- ${msg.toolCalls ? msg.toolCalls.map(tool => `
229
- <div class="tool-call">
230
- <span class="tool-name">${tool.name}</span>
231
- <span class="tool-status ${tool.status}">${tool.status}</span>
232
- ${tool.result ? `<div style="margin-top: 4px; color: var(--gray)">→ ${escapeHtml(tool.result.slice(0, 100))}</div>` : ''}
233
- </div>
234
- `).join('') : ''}
235
- </div>
236
- `).join('')}
237
- </div>
238
-
239
- <div class="input-area">
240
- <span class="input-prompt">❯</span>
241
- <input
242
- type="text"
243
- class="input-field"
244
- id="input"
245
- placeholder="${state.agentState.status !== 'idle' ? 'Processing...' : 'Type a message or /help for commands...'}"
246
- ${state.agentState.status !== 'idle' ? 'disabled' : ''}
247
- />
248
- </div>
249
-
250
- <div class="status-bar">
251
- <div class="status-left">
252
- <div class="status-indicator ${state.agentState.status}"></div>
253
- <span>${state.agentState.status === 'idle' ? 'Ready' : state.agentState.status}</span>
254
- </div>
255
- <div class="status-right">ZTC v0.1.0 (Web)</div>
256
- </div>
257
- `;
258
-
259
- // Scroll to bottom
260
- const messages = document.getElementById('messages');
261
- messages.scrollTop = messages.scrollHeight;
262
-
263
- // Setup input handler
264
- const input = document.getElementById('input');
265
- input.focus();
266
- input.addEventListener('keydown', handleInput);
267
- }
268
-
269
- function escapeHtml(text) {
270
- const div = document.createElement('div');
271
- div.textContent = text;
272
- return div.innerHTML;
273
- }
274
-
275
- function addMessage(msg) {
276
- state.messages.push({
277
- ...msg,
278
- id: generateId(),
279
- timestamp: new Date()
280
- });
281
- render();
282
- }
283
-
284
- function handleInput(e) {
285
- if (e.key === 'Enter' && !e.shiftKey) {
286
- e.preventDefault();
287
- const text = e.target.value.trim();
288
- if (!text) return;
289
-
290
- e.target.value = '';
291
-
292
- if (text.startsWith('/')) {
293
- handleCommand(text);
294
- } else {
295
- handleSubmit(text);
296
- }
297
- }
298
- }
299
-
300
- function handleCommand(text) {
301
- const [cmd, ...args] = text.slice(1).split(/\s+/);
302
-
303
- switch (cmd) {
304
- case 'help':
305
- addMessage({
306
- role: 'system',
307
- content: `Available commands:
308
- /help - Show this help
309
- /clear - Clear messages
310
- /debug - Toggle debug mode
311
- /status - Show status`
312
- });
313
- break;
314
- case 'clear':
315
- state.messages = [];
316
- addMessage({ role: 'system', content: 'Messages cleared.' });
317
- break;
318
- case 'debug':
319
- state.debug = !state.debug;
320
- document.body.classList.toggle('debug', state.debug);
321
- addMessage({ role: 'system', content: `Debug mode ${state.debug ? 'enabled' : 'disabled'}` });
322
- break;
323
- default:
324
- addMessage({ role: 'system', content: `Unknown command: /${cmd}` });
325
- }
326
- }
327
-
328
- async function handleSubmit(text) {
329
- addMessage({ role: 'user', content: text });
330
-
331
- state.agentState = { status: 'thinking' };
332
- render();
333
-
334
- // Simulate response (replace with actual API call)
335
- setTimeout(() => {
336
- addMessage({
337
- role: 'assistant',
338
- content: `This is the web UI preview. Connect to the ZTC backend for real responses.\n\nYou said: "${text}"`
339
- });
340
- state.agentState = { status: 'idle' };
341
- render();
342
- }, 1000);
343
- }
344
-
345
- // Initialize
346
- addMessage({
347
- role: 'system',
348
- content: 'Welcome to ZTC Web Preview.\nThis is a browser-based UI for debugging. Type a message or /help for commands.'
349
- });
350
- </script>
351
- </body>
352
- </html>
@@ -1,4 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="64" height="64" viewBox="0 0 64 64">
2
- <rect x="6" y="6" width="52" height="52" rx="10" ry="10" fill="#000" stroke="#fff" stroke-width="4" />
3
- <text x="32" y="38" text-anchor="middle" font-family="Arial, Helvetica, sans-serif" font-size="20" fill="#fff">ZDE</text>
4
- </svg>