zilmate 1.10.3 β†’ 1.10.4

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 (40) hide show
  1. package/README.md +364 -360
  2. package/SDK.md +1 -1
  3. package/dist/agents/manager.d.ts.map +1 -1
  4. package/dist/agents/manager.js +18 -3
  5. package/dist/agents/manager.js.map +1 -1
  6. package/dist/cli/doctor.d.ts.map +1 -1
  7. package/dist/cli/doctor.js +27 -0
  8. package/dist/cli/doctor.js.map +1 -1
  9. package/dist/cli/format.d.ts.map +1 -1
  10. package/dist/cli/format.js +183 -38
  11. package/dist/cli/format.js.map +1 -1
  12. package/dist/cli/setup.d.ts.map +1 -1
  13. package/dist/cli/setup.js +1 -0
  14. package/dist/cli/setup.js.map +1 -1
  15. package/dist/config/env.d.ts +1 -0
  16. package/dist/config/env.d.ts.map +1 -1
  17. package/dist/config/env.js +1 -0
  18. package/dist/config/env.js.map +1 -1
  19. package/dist/daemon/mac-installer.d.ts +4 -0
  20. package/dist/daemon/mac-installer.d.ts.map +1 -0
  21. package/dist/daemon/mac-installer.js +353 -0
  22. package/dist/daemon/mac-installer.js.map +1 -0
  23. package/dist/daemon/service.d.ts +15 -0
  24. package/dist/daemon/service.d.ts.map +1 -0
  25. package/dist/daemon/service.js +196 -0
  26. package/dist/daemon/service.js.map +1 -0
  27. package/dist/daemon/win-listener.ps1 +222 -0
  28. package/dist/index.js +48 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/runtime/progress.d.ts +7 -0
  31. package/dist/runtime/progress.d.ts.map +1 -1
  32. package/dist/runtime/progress.js +10 -0
  33. package/dist/runtime/progress.js.map +1 -1
  34. package/dist/runtime/swarm.d.ts.map +1 -1
  35. package/dist/runtime/swarm.js +19 -12
  36. package/dist/runtime/swarm.js.map +1 -1
  37. package/install.ps1 +1 -1
  38. package/package.json +6 -5
  39. package/scripts/copy-resources.mjs +18 -0
  40. package/scripts/release-github.mjs +6 -1
package/README.md CHANGED
@@ -1,360 +1,364 @@
1
- # <p align="center">πŸ€– ZilMate</p>
2
-
3
- <p align="center">
4
- <b>Production-Grade Multi-Agent AI Swarm, Real-Time Voice Controller, and Webhook Job Scheduler</b>
5
- </p>
6
-
7
- <p align="center">
8
- <img src="https://img.shields.io/badge/version-1.9.1-blue.svg?style=flat-square" alt="Version">
9
- <img src="https://img.shields.io/badge/node-%3E%3D20.0.0-green.svg?style=flat-square" alt="Node Engine">
10
- <img src="https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey.svg?style=flat-square" alt="Platform Support">
11
- <img src="https://img.shields.io/badge/license-ISC-orange.svg?style=flat-square" alt="License">
12
- </p>
13
-
14
- ---
15
-
16
- ZilMate is a CLI-first general assistant with deep built-in ZiloShift expertise. It can chat, answer support questions, draft posts, research docs/web sources, generate image assets, and use Composio for external app tools such as GitHub, Gmail, Slack, Notion, Stripe, and Supabase.
17
-
18
- ZilMate can also work with local files inside safe configured roots: search files/folders, read text files, write approved files, create folders, move/copy/rename, summarize documents, compare folder snapshots for changes, and find duplicate or large files. Sensitive files such as `.env`, keys, credentials, and token-looking paths are blocked.
19
-
20
- It can also use approved desktop context: read/write clipboard text, take screenshots, open the laptop camera for a still photo, and analyze screenshots/photos with `google/gemini-3.1-flash-lite` by default. Screenshot analysis describes visible UI, extracts visible text when possible, identifies errors or unusual states, and can optionally search the web for troubleshooting context. Camera photo analysis describes visible objects, environments, documents, devices, or issues without identifying people or inferring sensitive traits.
21
-
22
- The GitHub project can remain `zilo-manager`, but the installable npm package and command are both `zilmate`.
23
-
24
- ---
25
-
26
- ## πŸš€ Key Features & Capabilities
27
-
28
- - **Hierarchical Swarm Architecture** β€” Powered by a Manager Agent (CEO) that delegates to a Digital Corporation (COO), coordinating 30+ specialized subagents across 6 key business departments on a horizontal peer-to-peer messaging fabric. See the complete [SWARM.md](file:///c:/Users/mseyy/Downloads/zilo-manager/SWARM.md) blueprint.
29
- - **Zero-Config Webhook Tunneling** β€” Automates background webhook listeners using **Upstash QStash**. Features a built-in automated **Cloudflare Tunnel** binary (`cloudflared`) downloader for platform-specific runtimes (`windows`, `macOS`, `linux`).
30
- - **Interactive Safety Checklists** β€” Replaced basic text prompts with a premium interactive terminal UI (in TTY). Navigate via arrow keys and toggle checkboxes to filter and approve critical system and write-like app actions.
31
- - **Bottom-Pinned Thinking Status Card** β€” High-feedback console loaders and elapsed timers remain perfectly pinned to the bottom of the console whileSpecialist logs scroll smoothly above them.
32
- - **High-Fidelity Document Generation** β€” In-house layout engine producing styled corporate reports with hanging list indents, stable alternating row tables, and character boundaries spacing.
33
-
34
- ---
35
-
36
- ## πŸ“¦ Installation & Getting Started
37
-
38
- ### 1. Published NPM Package
39
-
40
- After the package is published to npm, install globally:
41
-
42
- ```powershell
43
- npm install -g zilmate
44
- zilmate setup
45
- zilmate --help
46
- ```
47
-
48
- > [!NOTE]
49
- > Running `zilmate` with no arguments opens the status dashboard and then the guided launcher menu. If the AI Gateway key is missing, the launcher offers setup before starting chat.
50
-
51
- When a new CLI/SDK release is published, update easily using:
52
-
53
- ```powershell
54
- zilmate update
55
- zilmate version
56
- ```
57
-
58
- ### 2. Private GitHub Install
59
-
60
- Before npm publishing, install directly from the GitHub repository:
61
-
62
- ```powershell
63
- npm install -g github:zester4/zilo-manager
64
- zilmate setup
65
- zilmate --help
66
- ```
67
-
68
- ### 3. Windows PowerShell Installer Wizard
69
-
70
- From PowerShell, run the automatic installer helper to trigger the complete first-use pipeline:
71
-
72
- ```powershell
73
- iwr https://raw.githubusercontent.com/zester4/zilo-manager/main/install.ps1 | iex
74
- ```
75
-
76
- The installer performs the following flow:
77
- 1. Installs ZilMate globally on your machine.
78
- 2. Runs `zilmate setup` to collect `AI_GATEWAY_API_KEY`.
79
- 3. Offers a guided workflow to configure Composio, Tavily, Redis, background jobs, QStash, and trigger workflows.
80
- 4. Runs `zilmate ping` to verify the key.
81
- 5. Automatically starts `zilmate talk`.
82
-
83
- **Custom Installer Parameters:**
84
-
85
- * Install without launching the guided setup:
86
- ```powershell
87
- iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilo-manager/main/install.ps1).Content) } -NoSetup"
88
- ```
89
- * Skip Gateway ping verification or instant chat launch:
90
- ```powershell
91
- iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilo-manager/main/install.ps1).Content) } -NoPing -NoTalk"
92
- ```
93
- * Force install from NPM instead of GitHub:
94
- ```powershell
95
- iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilo-manager/main/install.ps1).Content) } -Source npm"
96
- ```
97
-
98
- ---
99
-
100
- ## πŸ› οΈ Configuration & Setup
101
-
102
- ### 1. Automated Setup Wizard
103
-
104
- Install project workspace dependencies and run the guided installer:
105
-
106
- ```powershell
107
- npm install
108
- zilmate setup
109
- ```
110
-
111
- The wizard prompts you for critical credentials. Have these keys ready:
112
- * **Required**: AI Gateway API Key (`AI_GATEWAY_API_KEY`).
113
- * **External Apps**: Composio API Key (`COMPOSIO_API_KEY`).
114
- * **Web Research**: Tavily API Key (`TAVILY_API_KEY`).
115
- * **Cloud Memory & Schedulers**: Upstash Redis REST URL and Token.
116
- * **Hosted Background Webhooks**: Upstash QStash Token and Public Job Webhook URL.
117
- * **Realtime Voice**: Deepgram API Key (`DEEPGRAM_API_KEY`).
118
- * **Camera Capture**: `ffmpeg` installed on system path (setup can install this for you).
119
-
120
- > [!TIP]
121
- > Every optional feature can be skipped. If you only want basic chat, you only need the AI Gateway Key.
122
-
123
- ### 2. Real-Time Voice Configuration
124
-
125
- ZilMate supports hands-free natural voice dialog. Manage voice features directly:
126
-
127
- ```powershell
128
- zilmate voice setup
129
- zilmate voice enable
130
- zilmate voice disable
131
- zilmate voice doctor
132
- zilmate voice devices
133
- zilmate voice live
134
- ```
135
-
136
- Inside typed chat (`zilmate talk`), enter `/voice` to launch a hands-free microphone cycle:
137
- ```text
138
- /voice
139
- ```
140
-
141
- ### 3. Manual `.env` Template
142
-
143
- Create a `.env` file at your workspace root with the following configuration:
144
-
145
- ```env
146
- AI_GATEWAY_API_KEY=your_vercel_ai_gateway_key
147
- COMPOSIO_API_KEY=your_composio_key
148
- ZILMATE_USER_ID=zilmate-generated-local-user-id
149
- TAVILY_API_KEY=your_tavily_key
150
- UPSTASH_REDIS_REST_URL=
151
- UPSTASH_REDIS_REST_TOKEN=
152
- ZILMATE_JOBS_ENABLED=false
153
- UPSTASH_QSTASH_TOKEN=
154
- ZILMATE_PUBLIC_JOB_WEBHOOK_URL=
155
- ZILMATE_JOB_WEBHOOK_SECRET=
156
- ZILMATE_TRIGGER_WORKFLOWS_ENABLED=false
157
- DEEPGRAM_API_KEY=
158
- ZILMATE_VOICE_ENABLED=false
159
- ZILMATE_VOICE_MODE=agent
160
- ZILMATE_VOICE_LISTEN_MODEL=flux-general-en
161
- ZILMATE_VOICE_LISTEN_VERSION=v2
162
- ZILMATE_VOICE_TTS_MODEL=aura-2-thalia-en
163
- ZILMATE_VOICE_LANGUAGE=en
164
- ZILMATE_VOICE_LANGUAGE_HINTS=
165
- ZILMATE_VOICE_BARGE_IN=true
166
- ZILMATE_VOICE_INPUT_DEVICE=
167
- ZILMATE_SCREENSHOT_MODEL=google/gemini-3.1-flash-lite
168
- ZILMATE_CAMERA_DEVICE=
169
- ZILMATE_FILE_ROOTS=
170
- ZILO_MANAGER_MODEL=minimax/minimax-m3
171
- ZILO_HELP_MODEL=alibaba/qwen3.7-plus
172
- ZILO_POST_MODEL=alibaba/qwen3.7-plus
173
- ZILO_IMAGE_DEFAULT_PROVIDER=openai
174
- ZILO_IMAGE_OPENAI_MODEL=openai/gpt-image-2
175
- ZILO_IMAGE_GEMINI_MODEL=google/gemini-3-pro-image
176
- ZILO_IMAGE_MODEL=
177
- ```
178
-
179
- - **Composio** is optional. If set, ZilMate registers a stable local user session and generates app OAuth auth links automatically.
180
- - **Redis** is optional. If configured, chat sessions, scratchpads, and Composio state use Upstash Redis. Otherwise, they fallback locally under `.zilo-manager/`.
181
- - **Background Jobs** can run locally or via QStash. Local scheduler workers (`zilmate jobs worker`) run while your terminal is active. For serverless background triggers that execute even when your local machine is asleep, configure QStash plus a public job webhook.
182
- - **Camera capture** requires `ffmpeg` on your `PATH`. On Windows, install using `winget install Gyan.FFmpeg`; on macOS, use `brew install ffmpeg`. Run `zilmate camera doctor` to verify system support.
183
-
184
- ### 4. Non-Interactive CLI Setup Flags
185
-
186
- For automation pipelines, pass arguments directly:
187
-
188
- ```powershell
189
- zilmate setup --yes --ai-gateway-key <key> --jobs-enabled true
190
- zilmate setup --yes --ai-gateway-key <key> --composio-key <key> --trigger-workflows-enabled true
191
- zilmate setup --yes --ai-gateway-key <key> --qstash-token <token> --job-webhook-url https://example.com/api/zilmate/jobs
192
- zilmate setup --yes --ai-gateway-key <key> --voice-enabled true --deepgram-key <key>
193
- zilmate setup --yes --ai-gateway-key <key> --voice-input-device "audio=Microphone Array"
194
- zilmate setup --yes --ai-gateway-key <key> --install-camera-deps true
195
- zilmate setup --yes --ai-gateway-key <key> --camera-device "video=Integrated Camera"
196
- zilmate setup --yes --ai-gateway-key <key> --file-roots "C:\Users\me\Documents,C:\work"
197
- zilmate setup --yes --ai-gateway-key <key> --screenshot-model google/gemini-3.1-flash-lite
198
- ```
199
-
200
- ---
201
-
202
- ## πŸ“‚ Command Matrix & Reference
203
-
204
- ### Local Development Commands
205
-
206
- Use these scripts when working directly inside the cloned repository directory:
207
-
208
- ```bash
209
- npm run build # Compile TypeScript to dist/
210
- npm run zilmate -- --help # Show global help usage
211
- npm run zilmate -- setup # Launch interactive setup
212
- npm run zilmate -- doctor # Run local environment check
213
- npm run zilmate -- config # View active configs (sanitized)
214
- npm run zilmate -- models # Query active AI model routing
215
- npm run zilmate -- apps status # List connected Composio tools
216
- npm run zilmate -- triggers listen # Start local event stream
217
- npm run zilmate -- triggers types github # List webhook trigger events
218
- npm run zilmate -- jobs create "Summary update" # Create background automation
219
- npm run zilmate -- jobs list # Show active background jobs
220
- npm run zilmate -- jobs worker --once # Execute outstanding schedules
221
- npm run zilmate -- voice doctor # Check Deepgram and microphone audio
222
- npm run zilmate -- voice setup # Setup voice parameters
223
- npm run zilmate -- voice turn "What's my status?" # Run one-shot voice query
224
- npm run zilmate -- remember "Prefers concise replies" # Add durable vector memory
225
- npm run zilmate -- recall support # Search durable vector memories
226
- npm run zilmate -- talk # Open the main interactive chat
227
- ```
228
-
229
- ### Global CLI Commands
230
-
231
- If globally linked (`npm link`), execute the `zilmate` CLI directly:
232
-
233
- ```powershell
234
- zilmate --help
235
- zilmate setup
236
- zilmate doctor
237
- zilmate update
238
- zilmate version
239
- zilmate config
240
- zilmate talk
241
- zilmate ping
242
- zilmate models
243
- zilmate apps status
244
- zilmate triggers listen
245
- zilmate triggers types github
246
- zilmate triggers create GITHUB_BRANCH_CREATED_TRIGGER --dry-run --owner zester4 --repo zilo-manager
247
- zilmate triggers create GITHUB_COMMIT_EVENT --owner zester4 --repo zilo-manager
248
- zilmate triggers list
249
- zilmate jobs create "Research today's priority updates and summarize them"
250
- zilmate jobs create "Prepare my weekday morning briefing" --schedule "daily"
251
- zilmate jobs list
252
- zilmate jobs status job_xxx
253
- zilmate jobs logs job_xxx
254
- zilmate jobs run job_xxx
255
- zilmate jobs worker
256
- zilmate jobs cancel job_xxx
257
- zilmate voice doctor
258
- zilmate voice config
259
- zilmate voice setup
260
- zilmate voice disable
261
- zilmate voice enable
262
- zilmate voice turn "Plan my next two hours"
263
- zilmate voice devices
264
- zilmate voice live
265
- zilmate voice agent-probe
266
- zilmate camera doctor
267
- zilmate camera list
268
- zilmate camera capture
269
- zilmate camera capture --device "video=Integrated Camera"
270
- zilmate remember "Use a warm but concise support tone"
271
- zilmate recall support
272
- zilmate memory list
273
- zilmate help "worker cannot see shifts"
274
- zilmate image --model openai --size 1024x1024 "ZiloShift launch poster"
275
- ```
276
-
277
- ---
278
-
279
- ## πŸ’» Server-Side SDK
280
-
281
- ZilMate can be integrated as a backend SDK inside Next.js, Node servers, or dashboard API routes.
282
-
283
- ```typescript
284
- import { createZilMate } from 'zilmate/server';
285
-
286
- const zilmate = createZilMate({
287
- sessionId: 'user-session-123',
288
- });
289
-
290
- // Execute structured chat
291
- const result = await zilmate.chat({
292
- message: 'Draft a project roadmap based on the current workspace context.',
293
- });
294
-
295
- console.log(result.text);
296
- ```
297
-
298
- ### Next.js API Route Integration
299
-
300
- ```typescript
301
- // app/api/zilmate/route.ts
302
- import { createZilMate } from 'zilmate/server';
303
-
304
- export async function POST(req: Request) {
305
- const { message, sessionId } = await req.json();
306
- const zilmate = createZilMate({ sessionId });
307
- const result = await zilmate.chat({ message });
308
-
309
- return Response.json(result);
310
- }
311
- ```
312
-
313
- ### SDK Public Methods Reference
314
-
315
- - `chat({ message })` β€” Primary interactive assistant backed by the supervisor Manager agent.
316
- - `manager({ message | prompt })` β€” Explicit manager-level swarming and planning execution.
317
- - `help({ question | message })` β€” High-speed product troubleshooting.
318
- - `guide({ message })` β€” Interactive guided workflow tutorial.
319
- - `post({ prompt })` β€” Generates optimized marketing status, caption, and social outreach copy.
320
- - `research({ query | message })` β€” Double-tier search (local repository documents + Tavily deep-web research).
321
- - `image({ prompt, provider, size, outputDir })` β€” Generates image assets via Vercel AI SDK.
322
- - `remember({ text, tags })`, `recall({ query, limit })` β€” Save and retrieve facts from Upstash Redis or local memory.
323
- - `createJob({ task, schedule, source, metadata })`, `runDueJobs()` β€” Queue, schedule, and run background automation jobs.
324
-
325
- ---
326
-
327
- ## πŸ›οΈ Swarm Departmental Architecture
328
-
329
- ZilMate organizes complex business pipelines by splitting responsibilities among 30+ specialists across 6 key departments. By deploying a horizontal active peer-to-peer messaging fabric, the swarm can coordinate actions and negotiate schemas directly. For a deep-dive into specialist instructions, toolkits, and communication protocols, see the comprehensive [SWARM.md](file:///c:/Users/mseyy/Downloads/zilo-manager/SWARM.md) document.
330
-
331
- ZilMate’s core corporate structure is represented below:
332
-
333
- ```text
334
- πŸ’Ό Supervisor Manager (CEO)
335
- └── βš™οΈ Digital Corporation (COO)
336
- β”œβ”€β”€ πŸ“Š Strategy & Planning Department
337
- β”œβ”€β”€ πŸ’» Software Engineering Department
338
- β”œβ”€β”€ πŸ“ˆ Growth & Marketing Department
339
- β”œβ”€β”€ πŸ“‹ General Operations Department
340
- β”œβ”€β”€ πŸ—„οΈ Data Analytics Department
341
- β”œβ”€β”€ πŸ›‘οΈ Security & Audits Department
342
- └── πŸ’° Revenue & Finance Department
343
- ```
344
-
345
- * **Quick Help Agent** β€” High-speed, local-focused markdown troubleshooting and workflow assistance.
346
- * **Developer Helper** β€” Assists with CLI setup, NPM packaging, serverless webhooks, and QStash connection tuning.
347
- * **Composio Connector** β€” Handles app discoveries, OAuth auth links, and action schemas.
348
- * **Local Files Agent** β€” Performs safe directory audits, summarizes PDF docs, and generates git-style change snapshots within safe roots.
349
- * **Desktop Agent** β€” Handshakes with OS APIs to grab clipboard contents, trigger screenshots, capture camera stills, and interpret UI using vision models.
350
-
351
- ---
352
-
353
- ## πŸ›‘οΈ Security & Safety Guidelines
354
-
355
- - **Sensitive File Blocklist** β€” ZilMate automatically denies reading or exposing `.env`, API keys, private certificates, or local credentials to prevent unauthorized data exposure.
356
- - **Granular Approvals** β€” All write-like external app integrations (e.g. creating, updating, charging, deleting) require explicit approval via the interactive Safety Checklist.
357
- - **Data Veracity** β€” The AI swarm will never claim a live external state (such as payments, identity verification, or database columns) has changed unless a tool invocation returns a successful execution confirmation.
358
-
359
- ---
360
- *Developed as part of the ZiloShift operational intelligence ecosystem. For security reports, bug logs, and custom integration requests, please refer to [docs/README.md](docs/README.md) or open an issue.*
1
+ # <p align="center">πŸ€– ZilMate</p>
2
+
3
+ <p align="center">
4
+ <img src="public/zilmate.png" alt="ZilMate Logo" width="180">
5
+ </p>
6
+
7
+ <p align="center">
8
+ <b>Production-Grade Multi-Agent AI Swarm, Real-Time Voice Controller, and Webhook Job Scheduler</b>
9
+ </p>
10
+
11
+ <p align="center">
12
+ <img src="https://img.shields.io/badge/version-1.9.1-blue.svg?style=flat-square" alt="Version">
13
+ <img src="https://img.shields.io/badge/node-%3E%3D20.0.0-green.svg?style=flat-square" alt="Node Engine">
14
+ <img src="https://img.shields.io/badge/platform-windows%20%7C%20macos%20%7C%20linux-lightgrey.svg?style=flat-square" alt="Platform Support">
15
+ <img src="https://img.shields.io/badge/license-ISC-orange.svg?style=flat-square" alt="License">
16
+ </p>
17
+
18
+ ---
19
+
20
+ ZilMate is a CLI-first general assistant with deep built-in ZiloShift expertise. It can chat, answer support questions, draft posts, research docs/web sources, generate image assets, and use Composio for external app tools such as GitHub, Gmail, Slack, Notion, Stripe, and Supabase.
21
+
22
+ ZilMate can also work with local files inside safe configured roots: search files/folders, read text files, write approved files, create folders, move/copy/rename, summarize documents, compare folder snapshots for changes, and find duplicate or large files. Sensitive files such as `.env`, keys, credentials, and token-looking paths are blocked.
23
+
24
+ It can also use approved desktop context: read/write clipboard text, take screenshots, open the laptop camera for a still photo, and analyze screenshots/photos with `google/gemini-3.1-flash-lite` by default. Screenshot analysis describes visible UI, extracts visible text when possible, identifies errors or unusual states, and can optionally search the web for troubleshooting context. Camera photo analysis describes visible objects, environments, documents, devices, or issues without identifying people or inferring sensitive traits.
25
+
26
+ The GitHub project and repository name is now `zilmate`, matching the installable npm package and command.
27
+
28
+ ---
29
+
30
+ ## πŸš€ Key Features & Capabilities
31
+
32
+ - **Hierarchical Swarm Architecture** β€” Powered by a Manager Agent (CEO) that delegates to a Digital Corporation (COO), coordinating 30+ specialized subagents across 6 key business departments on a horizontal peer-to-peer messaging fabric. See the complete [SWARM.md](file:///c:/Users/mseyy/Downloads/zilo-manager/SWARM.md) blueprint.
33
+ - **Zero-Config Webhook Tunneling** β€” Automates background webhook listeners using **Upstash QStash**. Features a built-in automated **Cloudflare Tunnel** binary (`cloudflared`) downloader for platform-specific runtimes (`windows`, `macOS`, `linux`).
34
+ - **Interactive Safety Checklists** β€” Replaced basic text prompts with a premium interactive terminal UI (in TTY). Navigate via arrow keys and toggle checkboxes to filter and approve critical system and write-like app actions.
35
+ - **Bottom-Pinned Thinking Status Card** β€” High-feedback console loaders and elapsed timers remain perfectly pinned to the bottom of the console whileSpecialist logs scroll smoothly above them.
36
+ - **High-Fidelity Document Generation** β€” In-house layout engine producing styled corporate reports with hanging list indents, stable alternating row tables, and character boundaries spacing.
37
+
38
+ ---
39
+
40
+ ## πŸ“¦ Installation & Getting Started
41
+
42
+ ### 1. Published NPM Package
43
+
44
+ After the package is published to npm, install globally:
45
+
46
+ ```powershell
47
+ npm install -g zilmate
48
+ zilmate setup
49
+ zilmate --help
50
+ ```
51
+
52
+ > [!NOTE]
53
+ > Running `zilmate` with no arguments opens the status dashboard and then the guided launcher menu. If the AI Gateway key is missing, the launcher offers setup before starting chat.
54
+
55
+ When a new CLI/SDK release is published, update easily using:
56
+
57
+ ```powershell
58
+ zilmate update
59
+ zilmate version
60
+ ```
61
+
62
+ ### 2. Private GitHub Install
63
+
64
+ Before npm publishing, install directly from the GitHub repository:
65
+
66
+ ```powershell
67
+ npm install -g github:zester4/zilmate
68
+ zilmate setup
69
+ zilmate --help
70
+ ```
71
+
72
+ ### 3. Windows PowerShell Installer Wizard
73
+
74
+ From PowerShell, run the automatic installer helper to trigger the complete first-use pipeline:
75
+
76
+ ```powershell
77
+ iwr https://raw.githubusercontent.com/zester4/zilmate/main/install.ps1 | iex
78
+ ```
79
+
80
+ The installer performs the following flow:
81
+ 1. Installs ZilMate globally on your machine.
82
+ 2. Runs `zilmate setup` to collect `AI_GATEWAY_API_KEY`.
83
+ 3. Offers a guided workflow to configure Composio, Tavily, Redis, background jobs, QStash, and trigger workflows.
84
+ 4. Runs `zilmate ping` to verify the key.
85
+ 5. Automatically starts `zilmate talk`.
86
+
87
+ **Custom Installer Parameters:**
88
+
89
+ * Install without launching the guided setup:
90
+ ```powershell
91
+ iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilmate/main/install.ps1).Content) } -NoSetup"
92
+ ```
93
+ * Skip Gateway ping verification or instant chat launch:
94
+ ```powershell
95
+ iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilmate/main/install.ps1).Content) } -NoPing -NoTalk"
96
+ ```
97
+ * Force install from NPM instead of GitHub:
98
+ ```powershell
99
+ iex "& { $((iwr -UseBasicParsing https://raw.githubusercontent.com/zester4/zilmate/main/install.ps1).Content) } -Source npm"
100
+ ```
101
+
102
+ ---
103
+
104
+ ## πŸ› οΈ Configuration & Setup
105
+
106
+ ### 1. Automated Setup Wizard
107
+
108
+ Install project workspace dependencies and run the guided installer:
109
+
110
+ ```powershell
111
+ npm install
112
+ zilmate setup
113
+ ```
114
+
115
+ The wizard prompts you for critical credentials. Have these keys ready:
116
+ * **Required**: AI Gateway API Key (`AI_GATEWAY_API_KEY`).
117
+ * **External Apps**: Composio API Key (`COMPOSIO_API_KEY`).
118
+ * **Web Research**: Tavily API Key (`TAVILY_API_KEY`).
119
+ * **Cloud Memory & Schedulers**: Upstash Redis REST URL and Token.
120
+ * **Hosted Background Webhooks**: Upstash QStash Token and Public Job Webhook URL.
121
+ * **Realtime Voice**: Deepgram API Key (`DEEPGRAM_API_KEY`).
122
+ * **Camera Capture**: `ffmpeg` installed on system path (setup can install this for you).
123
+
124
+ > [!TIP]
125
+ > Every optional feature can be skipped. If you only want basic chat, you only need the AI Gateway Key.
126
+
127
+ ### 2. Real-Time Voice Configuration
128
+
129
+ ZilMate supports hands-free natural voice dialog. Manage voice features directly:
130
+
131
+ ```powershell
132
+ zilmate voice setup
133
+ zilmate voice enable
134
+ zilmate voice disable
135
+ zilmate voice doctor
136
+ zilmate voice devices
137
+ zilmate voice live
138
+ ```
139
+
140
+ Inside typed chat (`zilmate talk`), enter `/voice` to launch a hands-free microphone cycle:
141
+ ```text
142
+ /voice
143
+ ```
144
+
145
+ ### 3. Manual `.env` Template
146
+
147
+ Create a `.env` file at your workspace root with the following configuration:
148
+
149
+ ```env
150
+ AI_GATEWAY_API_KEY=your_vercel_ai_gateway_key
151
+ COMPOSIO_API_KEY=your_composio_key
152
+ ZILMATE_USER_ID=zilmate-generated-local-user-id
153
+ TAVILY_API_KEY=your_tavily_key
154
+ UPSTASH_REDIS_REST_URL=
155
+ UPSTASH_REDIS_REST_TOKEN=
156
+ ZILMATE_JOBS_ENABLED=false
157
+ UPSTASH_QSTASH_TOKEN=
158
+ ZILMATE_PUBLIC_JOB_WEBHOOK_URL=
159
+ ZILMATE_JOB_WEBHOOK_SECRET=
160
+ ZILMATE_TRIGGER_WORKFLOWS_ENABLED=false
161
+ DEEPGRAM_API_KEY=
162
+ ZILMATE_VOICE_ENABLED=false
163
+ ZILMATE_VOICE_MODE=agent
164
+ ZILMATE_VOICE_LISTEN_MODEL=flux-general-en
165
+ ZILMATE_VOICE_LISTEN_VERSION=v2
166
+ ZILMATE_VOICE_TTS_MODEL=aura-2-thalia-en
167
+ ZILMATE_VOICE_LANGUAGE=en
168
+ ZILMATE_VOICE_LANGUAGE_HINTS=
169
+ ZILMATE_VOICE_BARGE_IN=true
170
+ ZILMATE_VOICE_INPUT_DEVICE=
171
+ ZILMATE_SCREENSHOT_MODEL=google/gemini-3.1-flash-lite
172
+ ZILMATE_CAMERA_DEVICE=
173
+ ZILMATE_FILE_ROOTS=
174
+ ZILO_MANAGER_MODEL=minimax/minimax-m3
175
+ ZILO_HELP_MODEL=alibaba/qwen3.7-plus
176
+ ZILO_POST_MODEL=alibaba/qwen3.7-plus
177
+ ZILO_IMAGE_DEFAULT_PROVIDER=openai
178
+ ZILO_IMAGE_OPENAI_MODEL=openai/gpt-image-2
179
+ ZILO_IMAGE_GEMINI_MODEL=google/gemini-3-pro-image
180
+ ZILO_IMAGE_MODEL=
181
+ ```
182
+
183
+ - **Composio** is optional. If set, ZilMate registers a stable local user session and generates app OAuth auth links automatically.
184
+ - **Redis** is optional. If configured, chat sessions, scratchpads, and Composio state use Upstash Redis. Otherwise, they fallback locally under `.zilo-manager/`.
185
+ - **Background Jobs** can run locally or via QStash. Local scheduler workers (`zilmate jobs worker`) run while your terminal is active. For serverless background triggers that execute even when your local machine is asleep, configure QStash plus a public job webhook.
186
+ - **Camera capture** requires `ffmpeg` on your `PATH`. On Windows, install using `winget install Gyan.FFmpeg`; on macOS, use `brew install ffmpeg`. Run `zilmate camera doctor` to verify system support.
187
+
188
+ ### 4. Non-Interactive CLI Setup Flags
189
+
190
+ For automation pipelines, pass arguments directly:
191
+
192
+ ```powershell
193
+ zilmate setup --yes --ai-gateway-key <key> --jobs-enabled true
194
+ zilmate setup --yes --ai-gateway-key <key> --composio-key <key> --trigger-workflows-enabled true
195
+ zilmate setup --yes --ai-gateway-key <key> --qstash-token <token> --job-webhook-url https://example.com/api/zilmate/jobs
196
+ zilmate setup --yes --ai-gateway-key <key> --voice-enabled true --deepgram-key <key>
197
+ zilmate setup --yes --ai-gateway-key <key> --voice-input-device "audio=Microphone Array"
198
+ zilmate setup --yes --ai-gateway-key <key> --install-camera-deps true
199
+ zilmate setup --yes --ai-gateway-key <key> --camera-device "video=Integrated Camera"
200
+ zilmate setup --yes --ai-gateway-key <key> --file-roots "C:\Users\me\Documents,C:\work"
201
+ zilmate setup --yes --ai-gateway-key <key> --screenshot-model google/gemini-3.1-flash-lite
202
+ ```
203
+
204
+ ---
205
+
206
+ ## πŸ“‚ Command Matrix & Reference
207
+
208
+ ### Local Development Commands
209
+
210
+ Use these scripts when working directly inside the cloned repository directory:
211
+
212
+ ```bash
213
+ npm run build # Compile TypeScript to dist/
214
+ npm run zilmate -- --help # Show global help usage
215
+ npm run zilmate -- setup # Launch interactive setup
216
+ npm run zilmate -- doctor # Run local environment check
217
+ npm run zilmate -- config # View active configs (sanitized)
218
+ npm run zilmate -- models # Query active AI model routing
219
+ npm run zilmate -- apps status # List connected Composio tools
220
+ npm run zilmate -- triggers listen # Start local event stream
221
+ npm run zilmate -- triggers types github # List webhook trigger events
222
+ npm run zilmate -- jobs create "Summary update" # Create background automation
223
+ npm run zilmate -- jobs list # Show active background jobs
224
+ npm run zilmate -- jobs worker --once # Execute outstanding schedules
225
+ npm run zilmate -- voice doctor # Check Deepgram and microphone audio
226
+ npm run zilmate -- voice setup # Setup voice parameters
227
+ npm run zilmate -- voice turn "What's my status?" # Run one-shot voice query
228
+ npm run zilmate -- remember "Prefers concise replies" # Add durable vector memory
229
+ npm run zilmate -- recall support # Search durable vector memories
230
+ npm run zilmate -- talk # Open the main interactive chat
231
+ ```
232
+
233
+ ### Global CLI Commands
234
+
235
+ If globally linked (`npm link`), execute the `zilmate` CLI directly:
236
+
237
+ ```powershell
238
+ zilmate --help
239
+ zilmate setup
240
+ zilmate doctor
241
+ zilmate update
242
+ zilmate version
243
+ zilmate config
244
+ zilmate talk
245
+ zilmate ping
246
+ zilmate models
247
+ zilmate apps status
248
+ zilmate triggers listen
249
+ zilmate triggers types github
250
+ zilmate triggers create GITHUB_BRANCH_CREATED_TRIGGER --dry-run --owner zester4 --repo zilmate
251
+ zilmate triggers create GITHUB_COMMIT_EVENT --owner zester4 --repo zilmate
252
+ zilmate triggers list
253
+ zilmate jobs create "Research today's priority updates and summarize them"
254
+ zilmate jobs create "Prepare my weekday morning briefing" --schedule "daily"
255
+ zilmate jobs list
256
+ zilmate jobs status job_xxx
257
+ zilmate jobs logs job_xxx
258
+ zilmate jobs run job_xxx
259
+ zilmate jobs worker
260
+ zilmate jobs cancel job_xxx
261
+ zilmate voice doctor
262
+ zilmate voice config
263
+ zilmate voice setup
264
+ zilmate voice disable
265
+ zilmate voice enable
266
+ zilmate voice turn "Plan my next two hours"
267
+ zilmate voice devices
268
+ zilmate voice live
269
+ zilmate voice agent-probe
270
+ zilmate camera doctor
271
+ zilmate camera list
272
+ zilmate camera capture
273
+ zilmate camera capture --device "video=Integrated Camera"
274
+ zilmate remember "Use a warm but concise support tone"
275
+ zilmate recall support
276
+ zilmate memory list
277
+ zilmate help "worker cannot see shifts"
278
+ zilmate image --model openai --size 1024x1024 "ZiloShift launch poster"
279
+ ```
280
+
281
+ ---
282
+
283
+ ## πŸ’» Server-Side SDK
284
+
285
+ ZilMate can be integrated as a backend SDK inside Next.js, Node servers, or dashboard API routes.
286
+
287
+ ```typescript
288
+ import { createZilMate } from 'zilmate/server';
289
+
290
+ const zilmate = createZilMate({
291
+ sessionId: 'user-session-123',
292
+ });
293
+
294
+ // Execute structured chat
295
+ const result = await zilmate.chat({
296
+ message: 'Draft a project roadmap based on the current workspace context.',
297
+ });
298
+
299
+ console.log(result.text);
300
+ ```
301
+
302
+ ### Next.js API Route Integration
303
+
304
+ ```typescript
305
+ // app/api/zilmate/route.ts
306
+ import { createZilMate } from 'zilmate/server';
307
+
308
+ export async function POST(req: Request) {
309
+ const { message, sessionId } = await req.json();
310
+ const zilmate = createZilMate({ sessionId });
311
+ const result = await zilmate.chat({ message });
312
+
313
+ return Response.json(result);
314
+ }
315
+ ```
316
+
317
+ ### SDK Public Methods Reference
318
+
319
+ - `chat({ message })` β€” Primary interactive assistant backed by the supervisor Manager agent.
320
+ - `manager({ message | prompt })` β€” Explicit manager-level swarming and planning execution.
321
+ - `help({ question | message })` β€” High-speed product troubleshooting.
322
+ - `guide({ message })` β€” Interactive guided workflow tutorial.
323
+ - `post({ prompt })` β€” Generates optimized marketing status, caption, and social outreach copy.
324
+ - `research({ query | message })` β€” Double-tier search (local repository documents + Tavily deep-web research).
325
+ - `image({ prompt, provider, size, outputDir })` β€” Generates image assets via Vercel AI SDK.
326
+ - `remember({ text, tags })`, `recall({ query, limit })` β€” Save and retrieve facts from Upstash Redis or local memory.
327
+ - `createJob({ task, schedule, source, metadata })`, `runDueJobs()` β€” Queue, schedule, and run background automation jobs.
328
+
329
+ ---
330
+
331
+ ## πŸ›οΈ Swarm Departmental Architecture
332
+
333
+ ZilMate organizes complex business pipelines by splitting responsibilities among 30+ specialists across 6 key departments. By deploying a horizontal active peer-to-peer messaging fabric, the swarm can coordinate actions and negotiate schemas directly. For a deep-dive into specialist instructions, toolkits, and communication protocols, see the comprehensive [SWARM.md](file:///c:/Users/mseyy/Downloads/zilo-manager/SWARM.md) document.
334
+
335
+ ZilMate’s core corporate structure is represented below:
336
+
337
+ ```text
338
+ πŸ’Ό Supervisor Manager (CEO)
339
+ └── βš™οΈ Digital Corporation (COO)
340
+ β”œβ”€β”€ πŸ“Š Strategy & Planning Department
341
+ β”œβ”€β”€ πŸ’» Software Engineering Department
342
+ β”œβ”€β”€ πŸ“ˆ Growth & Marketing Department
343
+ β”œβ”€β”€ πŸ“‹ General Operations Department
344
+ β”œβ”€β”€ πŸ—„οΈ Data Analytics Department
345
+ β”œβ”€β”€ πŸ›‘οΈ Security & Audits Department
346
+ └── πŸ’° Revenue & Finance Department
347
+ ```
348
+
349
+ * **Quick Help Agent** β€” High-speed, local-focused markdown troubleshooting and workflow assistance.
350
+ * **Developer Helper** β€” Assists with CLI setup, NPM packaging, serverless webhooks, and QStash connection tuning.
351
+ * **Composio Connector** β€” Handles app discoveries, OAuth auth links, and action schemas.
352
+ * **Local Files Agent** β€” Performs safe directory audits, summarizes PDF docs, and generates git-style change snapshots within safe roots.
353
+ * **Desktop Agent** β€” Handshakes with OS APIs to grab clipboard contents, trigger screenshots, capture camera stills, and interpret UI using vision models.
354
+
355
+ ---
356
+
357
+ ## πŸ›‘οΈ Security & Safety Guidelines
358
+
359
+ - **Sensitive File Blocklist** β€” ZilMate automatically denies reading or exposing `.env`, API keys, private certificates, or local credentials to prevent unauthorized data exposure.
360
+ - **Granular Approvals** β€” All write-like external app integrations (e.g. creating, updating, charging, deleting) require explicit approval via the interactive Safety Checklist.
361
+ - **Data Veracity** β€” The AI swarm will never claim a live external state (such as payments, identity verification, or database columns) has changed unless a tool invocation returns a successful execution confirmation.
362
+
363
+ ---
364
+ *Developed as part of the ZiloShift operational intelligence ecosystem. For security reports, bug logs, and custom integration requests, please refer to [docs/README.md](docs/README.md) or open an issue.*