@duheso/zerocli 1.0.5 → 1.0.7

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 CHANGED
@@ -11,7 +11,7 @@ Use OpenAI-compatible APIs, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, A
11
11
  [![License](https://img.shields.io/badge/license-MIT-2563eb)](LICENSE)
12
12
 
13
13
 
14
- [Quick Start](#quick-start) | [Setup Guides](#setup-guides) | [Providers](#supported-providers) | [Source Build](#source-build-and-local-development) | [VS Code Extension](#vs-code-extension) | [Community](#community)
14
+ [Quick Start](#quick-start) | [Setup Guides](#setup-guides) | [Tribunal do Conselho](#️-tribunal-do-conselho--council-tribunal) | [Providers](#supported-providers) | [Source Build](#source-build-and-local-development) | [VS Code Extension](#vs-code-extension) | [Community](#community)
15
15
 
16
16
  ## Why Zero CLI
17
17
 
@@ -19,6 +19,7 @@ Use OpenAI-compatible APIs, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, A
19
19
  - Save provider profiles inside the app with `/provider`
20
20
  - Run with OpenAI-compatible services, Gemini, GitHub Models, Codex OAuth, Codex, Ollama, Atomic Chat, and other supported providers
21
21
  - Keep coding-agent workflows in one place: bash, file tools, grep, glob, agents, tasks, MCP, and web tools
22
+ - Invoke the **Tribunal do Conselho** to have 5 AI advisors debate any problem from radically different perspectives
22
23
  - Use the bundled VS Code extension for launch integration and theme support
23
24
 
24
25
  ## Quick Start
@@ -217,8 +218,110 @@ Advanced and source-build guides:
217
218
  - **Images**: URL and base64 image inputs for providers that support vision
218
219
  - **Provider profiles**: Guided setup plus saved `.zerocli-profile.json` support
219
220
  - **Local and remote model backends**: Cloud APIs, local servers, and Apple Silicon local inference
221
+ - **Tribunal do Conselho**: Multi-agent deliberation with 5 AI advisors modeled on historical figures
222
+
223
+ ## ⚖️ Tribunal do Conselho — Council Tribunal
224
+
225
+ The **Tribunal do Conselho** is a signature Zero CLI skill that convenes a panel of 5 AI advisors to debate any question, dilemma, or decision from radically different perspectives. Rather than getting a single AI opinion, you get a full deliberation — with agreements, disagreements, and a final synthesized verdict.
226
+
227
+ This is invaluable for complex decisions, brainstorming, code architecture review, life choices, or any situation where a single perspective is not enough.
228
+
229
+ ### How to invoke
230
+
231
+ ```
232
+ /council Should I leave my job and start a company?
233
+ /council Review this architecture — microservices vs monolith for a 3-person team
234
+ /council I'm getting married in 6 months. How should I prepare financially?
235
+ ```
236
+
237
+ Aliases also work: `/conselho` and `/tribunal`.
238
+
239
+ Or just type naturally and the model will invoke it:
240
+
241
+ ```
242
+ invoco o tribunal do conselho — quero largar meu emprego
243
+ ```
244
+
245
+ ### How it works
246
+
247
+ ```
248
+ User prompt
249
+
250
+
251
+ 📨 Mensageiro (Messenger)
252
+ Analyzes complexity → generates 3-13 clarifying questions
253
+
254
+
255
+ ❓ AskUserQuestion (per question)
256
+ Collects all context from the user
257
+
258
+
259
+ ⚖️ TRIBUNAL DO CONSELHO — Round 1 / 2 / 3
260
+ 5 advisors deliberate in parallel
261
+ React to each other, agree, disagree, debate
262
+
263
+
264
+ 🔍 Convergence check after Round 3
265
+ ├── Consensus reached → proceed to verdict
266
+ └── Still diverging → ⚠️ 2 extra rounds invoked
267
+ "DIVERGÊNCIA NO CONSELHO — Rodadas extras invocadas!"
268
+
269
+
270
+ 📜 Síntese — Synthesizer consolidates the verdict
271
+
272
+
273
+ ✅ Final verdict delivered to the user
274
+ ```
275
+
276
+ ### The Classic Council (default pack)
277
+
278
+ Five legendary figures with radically different worldviews ensure every angle of your problem is covered:
279
+
280
+ | Advisor | Role | Focus |
281
+ |---|---|---|
282
+ | 🏛️ **Marco Aurélio** | O Estoico / Líder Consciente | Focus on what you can control, stay calm under pressure, act with ethics and reason |
283
+ | 🗡️ **Maquiavel** | O Estrategista Realista | Pragmatic, cold analysis — human risks, power dynamics, and effective action without idealism |
284
+ | ⚗️ **Marie Curie** | A Cientista Analítica | Demands data, facts, and experimentation — breaks problems logically before committing |
285
+ | 🎨 **Leonardo da Vinci** | O Inovador Criativo | Lateral thinking, unexpected connections, completely original solutions |
286
+ | 👑 **Catarina, a Grande** | A Executora de Longo Prazo | Evaluates long-term impact, master of ambitious plans executed with patience |
287
+
288
+ ### Council Packs
289
+
290
+ Switch the deliberating panel by passing `pack:` in your prompt or using the tool parameter:
291
+
292
+ | Pack | Members | Best for |
293
+ |---|---|---|
294
+ | `default` | Marco Aurélio, Maquiavel, Marie Curie, Da Vinci, Catarina | General decisions, life dilemmas, strategy |
295
+ | `strategy` | Sun Tzu, Clausewitz, Bismarck, Napoleão, Genghis Khan | Competitive strategy, negotiations, conflict |
296
+ | `creativity` | Tesla, Ada Lovelace, Frida Kahlo, Mozart, Steve Jobs | Innovation, creative blocks, product design |
297
+ | `leadership` | Churchill, Mandela, Cleópatra, Lincoln, Ashoka | Leadership decisions, team challenges, governance |
298
+
299
+ ### Dynamic rounds
300
+
301
+ The debate starts with **3 rounds** (minimum). After round 3, convergence is automatically detected:
302
+
303
+ - **Consensus reached** → debate closes, verdict synthesized immediately
304
+ - **Significant divergence** → a bold visual alert appears and 2 extra rounds are invoked:
305
+
306
+ ```
307
+ ⚠️ DIVERGÊNCIA NO CONSELHO — Rodadas extras invocadas!
308
+ 🔥 O Tribunal detectou divergências significativas. Invocando 2 rodadas extras finais...
309
+ ```
310
+
311
+ ### Dynamic clarification questions
312
+
313
+ The Messenger automatically calibrates the number of clarifying questions (3–13) based on the detail level of your prompt:
314
+ - **Vague / short prompt** → 8–13 questions to fill all gaps
315
+ - **Moderate detail** → 5–7 focused questions
316
+ - **Detailed prompt** → 3–5 targeted questions on remaining blind spots
317
+
318
+ ### Live progress streaming
319
+
320
+ You see the debate unfold in real time as each round completes — no waiting until the end to see results. Each advisor's response streams as it finishes, round by round.
321
+
322
+ ---
323
+
220
324
 
221
- ## Provider Notes
222
325
 
223
326
  Zero CLI supports multiple providers, but behavior is not identical across all of them.
224
327
 
@@ -784,32 +784,45 @@ function pressKey(keyString) {
784
784
  }
785
785
 
786
786
  function scrollPage(direction, distance, coordinate) {
787
- let target = document.body;
787
+ const scrollAmount = distance * 100;
788
788
 
789
+ // When a coordinate is given, try to scroll the element at that point.
790
+ // Fall back to the nearest scrollable ancestor if the element itself isn't scrollable.
789
791
  if (coordinate) {
790
792
  const [x, y] = coordinate;
791
- const el = document.elementFromPoint(x, y);
792
- if (el) target = el;
793
- }
793
+ let el = document.elementFromPoint(x, y);
794
+
795
+ // Walk up the DOM to find the nearest scrollable ancestor
796
+ while (el && el !== document.documentElement) {
797
+ const style = window.getComputedStyle(el);
798
+ const overflow = style.overflow + style.overflowY + style.overflowX;
799
+ const isScrollable = /(auto|scroll)/.test(overflow);
800
+ if (isScrollable && (el.scrollHeight > el.clientHeight || el.scrollWidth > el.clientWidth)) {
801
+ break;
802
+ }
803
+ el = el.parentElement;
804
+ }
794
805
 
795
- const scrollAmount = distance * 100;
806
+ if (el && el !== document.documentElement) {
807
+ switch (direction) {
808
+ case 'up': el.scrollBy({ top: -scrollAmount, behavior: 'smooth' }); break;
809
+ case 'down': el.scrollBy({ top: scrollAmount, behavior: 'smooth' }); break;
810
+ case 'left': el.scrollBy({ left: -scrollAmount, behavior: 'smooth' }); break;
811
+ case 'right': el.scrollBy({ left: scrollAmount, behavior: 'smooth' }); break;
812
+ }
813
+ return { success: true, scrolled: direction, distance, target: 'element' };
814
+ }
815
+ }
796
816
 
817
+ // No coordinate (or no scrollable element found) → scroll the page via window
797
818
  switch (direction) {
798
- case 'up':
799
- target.scrollBy({ top: -scrollAmount, behavior: 'smooth' });
800
- break;
801
- case 'down':
802
- target.scrollBy({ top: scrollAmount, behavior: 'smooth' });
803
- break;
804
- case 'left':
805
- target.scrollBy({ left: -scrollAmount, behavior: 'smooth' });
806
- break;
807
- case 'right':
808
- target.scrollBy({ left: scrollAmount, behavior: 'smooth' });
809
- break;
819
+ case 'up': window.scrollBy({ top: -scrollAmount, behavior: 'smooth' }); break;
820
+ case 'down': window.scrollBy({ top: scrollAmount, behavior: 'smooth' }); break;
821
+ case 'left': window.scrollBy({ left: -scrollAmount, behavior: 'smooth' }); break;
822
+ case 'right': window.scrollBy({ left: scrollAmount, behavior: 'smooth' }); break;
810
823
  }
811
824
 
812
- return { success: true, scrolled: direction, distance };
825
+ return { success: true, scrolled: direction, distance, target: 'window' };
813
826
  }
814
827
 
815
828
  function performDrag(startCoordinate, endCoordinate) {