Skip to content

feat: add Jules CLI provider support#1916

Open
janburzinski wants to merge 1 commit intogeneralaction:mainfrom
janburzinski:jan/eng-1130-add-support-for-the-jules-cli
Open

feat: add Jules CLI provider support#1916
janburzinski wants to merge 1 commit intogeneralaction:mainfrom
janburzinski:jan/eng-1130-add-support-for-the-jules-cli

Conversation

@janburzinski
Copy link
Copy Markdown
Collaborator

summary

add jules as a cli provider

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Greptile Summary

This PR adds Jules (Google's async CLI coding agent) as a new provider, following the standard pattern used by other CLI providers in the codebase. All registration points are correctly wired: provider registry, classifier factory, renderer config, and icon assets.

  • Provider definition (agent-provider-registry.ts): Jules is registered with the verified npm package @google/jules, the correct jules version subcommand, and useKeystrokeInjection: true — consistent with other TUI-only agents like codebuff.
  • Classifier (jules.ts): Output pattern matching is modelled after the Goose classifier but includes a bare Jules word match in the idle_prompt branch, which will fire spurious idle notifications during normal agent output that naturally mentions its own name.
  • UI/icon (agentConfig.ts, meta.ts, jules.svg): SVG icon imported and registered with isSvg: true, matching the pattern used by Cursor, Droid, and other SVG providers.

Confidence Score: 4/5

Safe to merge with a minor classifier fix — the provider wiring is correct, but the idle-prompt regex needs tightening before the classifier behaves reliably in production.

The provider registration, icon, and UI config are all correct and follow established patterns. The one concrete defect is in the Jules classifier: the bare Jules word in the idle-prompt regex will fire false idle notifications any time Jules prints its own name in progress or status output, which it does frequently as an async agent.

src/main/core/agent-hooks/classifiers/jules.ts — the idle_prompt regex pattern needs a more specific anchor to avoid false notifications.

Important Files Changed

Filename Overview
src/main/core/agent-hooks/classifiers/jules.ts New Jules classifier closely mirrors the Goose classifier but adds an overly-broad bare Jules word match in the idle_prompt regex, which will produce false notifications during normal agent output.
src/shared/agent-provider-registry.ts Jules provider definition added with correct npm package name, verified jules version subcommand, and correct doc URL. Pattern is consistent with other keystroke-injection providers like codebuff.
src/renderer/utils/agentConfig.ts Jules entry added to agentConfig with SVG logo and isSvg flag set correctly, consistent with other SVG providers like Cursor and Droid.
src/renderer/lib/providers/meta.ts Jules SVG icon imported and registered in the ICONS map, consistent with how other SVG providers are handled.
src/main/core/agent-hooks/classifiers/index.ts Jules classifier correctly imported and registered in the classifier factory map in alphabetical order.
src/assets/images/jules.svg Valid SVG icon added for Jules with proper viewBox and fill color.

Sequence Diagram

sequenceDiagram
    participant U as User
    participant R as Renderer (agentConfig / meta)
    participant Reg as agent-provider-registry
    participant PTY as PTY Session
    participant C as JulesClassifier

    U->>R: Select Jules provider
    R->>Reg: Look up AgentProviderDefinition (id: 'jules')
    Reg-->>R: "{ cli: 'jules', useKeystrokeInjection: true, ... }"
    R->>PTY: Spawn `jules` process
    PTY->>PTY: Inject initial prompt via keystrokes
    loop Output chunks
        PTY->>C: classify(chunk)
        C->>C: Append to buffer, strip ANSI
        C-->>PTY: "ClassificationResult (notification | error | undefined)"
    end
    PTY-->>U: idle_prompt / permission_prompt / error notification
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
src/main/core/agent-hooks/classifiers/jules.ts:14-19
The bare `Jules` word in the `idle_prompt` regex will fire a false idle notification any time Jules prints its own name — for example during normal progress output like "Jules is analyzing your codebase…" or "Jules created a new remote session". All other classifiers in this repo use a specific terminal-prompt anchor (e.g., `goose\s*>`) rather than the tool's own name. This will cause spurious idle notifications during normal Jules operation.

```suggestion
    if (/Ready|Awaiting|Press Enter|jules\s*[>$]/i.test(tail)) {
      return {
        type: 'notification',
        notificationType: 'idle_prompt',
      };
    }
```

Reviews (1): Last reviewed commit: "feat: add Jules CLI provider support" | Re-trigger Greptile

Comment on lines +14 to +19
if (/Ready|Awaiting|Press Enter|Jules/i.test(tail)) {
return {
type: 'notification',
notificationType: 'idle_prompt',
};
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 The bare Jules word in the idle_prompt regex will fire a false idle notification any time Jules prints its own name — for example during normal progress output like "Jules is analyzing your codebase…" or "Jules created a new remote session". All other classifiers in this repo use a specific terminal-prompt anchor (e.g., goose\s*>) rather than the tool's own name. This will cause spurious idle notifications during normal Jules operation.

Suggested change
if (/Ready|Awaiting|Press Enter|Jules/i.test(tail)) {
return {
type: 'notification',
notificationType: 'idle_prompt',
};
}
if (/Ready|Awaiting|Press Enter|jules\s*[>$]/i.test(tail)) {
return {
type: 'notification',
notificationType: 'idle_prompt',
};
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/main/core/agent-hooks/classifiers/jules.ts
Line: 14-19

Comment:
The bare `Jules` word in the `idle_prompt` regex will fire a false idle notification any time Jules prints its own name — for example during normal progress output like "Jules is analyzing your codebase…" or "Jules created a new remote session". All other classifiers in this repo use a specific terminal-prompt anchor (e.g., `goose\s*>`) rather than the tool's own name. This will cause spurious idle notifications during normal Jules operation.

```suggestion
    if (/Ready|Awaiting|Press Enter|jules\s*[>$]/i.test(tail)) {
      return {
        type: 'notification',
        notificationType: 'idle_prompt',
      };
    }
```

How can I resolve this? If you propose a fix, please make it concise.

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