Skip to content

feat(providers): add Zero CLI#2765

Open
janburzinski wants to merge 3 commits into
mainfrom
jan/eng-1748-add-zero-coding-cli
Open

feat(providers): add Zero CLI#2765
janburzinski wants to merge 3 commits into
mainfrom
jan/eng-1748-add-zero-coding-cli

Conversation

@janburzinski

Copy link
Copy Markdown
Collaborator

Description

Screenshot/Recording (if applicable)

https://cap.link/0cg0vs2aa29m63t

Checklist
  • I kept this PR small and focused
  • I ran a self-review before opening this PR
  • I ran the relevant local checks or explained why not
  • I updated docs when behavior or setup changed
  • I added or updated tests when behavior changed, or explained why not
  • I only added comments where the logic is not obvious
  • I used Conventional Commits for commit
    messages and, when possible, the PR title

@greptile-apps

greptile-apps Bot commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds Zero CLI (@gitlawb/zero) as a new terminal-only, keystroke-injection provider, following the same pattern used by other recent providers like letta and mimocode. It also retroactively adds mimocode to the providers.md count and list, correcting a stale doc that had been missing it since mimocode was previously registered in code.

  • Plugin (packages/plugins/src/agents/impl/zero/): Declares a stateless, keystroke-delivery plugin with npm-based dependency detection and a matching icon asset; a focused test suite validates metadata and the buildCommand output.
  • Registry entries: AGENT_PROVIDER_IDS and AGENT_PROVIDERS in the shared registry and the plugin registry are both updated consistently, with matching websiteUrl, binary name, and keystroke injection flags.

Confidence Score: 4/5

Safe to merge; the change is a self-contained new provider following well-established patterns with no modifications to shared runtime code.

The plugin, registry entries, icon assets, and tests are all internally consistent and mirror how recent providers like letta and mimocode were integrated. The only finding is a minor test-quality gap where a top-level non-null assertion on the registry lookup would produce a confusing error rather than a clear failure if registration ever breaks.

packages/plugins/src/agents/impl/zero/index.test.ts — the non-null assertion at the module level could obscure registration failures.

Important Files Changed

Filename Overview
packages/plugins/src/agents/impl/zero/index.ts New plugin definition; follows the standard pattern for stateless, keystroke-injection providers with npm dependency detection.
packages/plugins/src/agents/impl/zero/index.test.ts Good coverage of metadata and buildCommand; the top-level non-null assertion on registry lookup means a missing registration would produce a confusing TypeError rather than a clear test failure.
apps/emdash-desktop/src/shared/core/agents/agent-provider-registry.ts Zero entry added consistently with existing providers; flags, install command, and icon path align with the plugin definition.
packages/plugins/src/agents/registry.ts Zero provider imported and registered correctly alongside existing providers.
agents/integrations/providers.md Docs updated to 34 providers (count is correct); also retroactively adds mimocode which was already registered in code but missing from this file.
packages/plugins/src/agents/impl/zero/icon.ts SVG icon asset follows the existing single-variant, light-only pattern used by other providers.
apps/emdash-desktop/src/assets/images/zero.svg SVG icon asset; content matches the inline SVG in icon.ts.

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    participant User
    participant Emdash as Emdash Desktop
    participant Registry as agent-provider-registry
    participant Plugin as zero plugin
    participant PTY as PTY session
    participant Zero as zero CLI (TUI)

    User->>Emdash: Start task with Zero provider
    Emdash->>Registry: Lookup 'zero' provider metadata
    Registry-->>Emdash: "{cli:'zero', useKeystrokeInjection:true, terminalOnly:true}"
    Emdash->>Plugin: buildCommand(ctx)
    Plugin-->>Emdash: "{command:'zero', args:[], env:{}}"
    Emdash->>PTY: Spawn 'zero' process
    PTY->>Zero: Start TUI
    Zero-->>PTY: TUI ready
    Emdash->>PTY: Inject keystrokes (initialPrompt)
    PTY->>Zero: Keystroke delivery
    Zero-->>User: Response streamed in terminal
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
    participant User
    participant Emdash as Emdash Desktop
    participant Registry as agent-provider-registry
    participant Plugin as zero plugin
    participant PTY as PTY session
    participant Zero as zero CLI (TUI)

    User->>Emdash: Start task with Zero provider
    Emdash->>Registry: Lookup 'zero' provider metadata
    Registry-->>Emdash: "{cli:'zero', useKeystrokeInjection:true, terminalOnly:true}"
    Emdash->>Plugin: buildCommand(ctx)
    Plugin-->>Emdash: "{command:'zero', args:[], env:{}}"
    Emdash->>PTY: Spawn 'zero' process
    PTY->>Zero: Start TUI
    Zero-->>PTY: TUI ready
    Emdash->>PTY: Inject keystrokes (initialPrompt)
    PTY->>Zero: Keystroke delivery
    Zero-->>User: Response streamed in terminal
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
packages/plugins/src/agents/impl/zero/index.test.ts:12-13
If `pluginRegistry.get('zero')` returns `undefined` (e.g., due to a registration error), the top-level non-null assertion fails at module load time with a confusing `TypeError` rather than a clear Vitest assertion failure. Adding an explicit `expect(zero).toBeDefined()` at the start of the first test would make any registration problem immediately obvious.

```suggestion
  it('registers install metadata and binary name', () => {
    expect(zero).toBeDefined();
    expect(zero.metadata.websiteUrl).toBe('https://zero.gitlawb.com/');
```

Reviews (1): Last reviewed commit: "chore(providers): refine Zero descriptio..." | Re-trigger Greptile

Comment thread packages/plugins/src/agents/impl/zero/index.test.ts
@arnestrickmann arnestrickmann requested a review from Davidknp July 6, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant