Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ See https://github.com/mistralai/mistral-vibe for details.

*** Factory Droid
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We need to update install instructions also

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done!


For Factory Droid, install the =droid-acp= client:
For Factory Droid, install Droid:

#+begin_src bash
npm install -g droid-acp
curl -fsSL https://app.factory.ai/cli | sh
#+end_src

See https://github.com/yaonyan/droid-acp for details.
See https://factory.ai for details.

*** Pi

Expand Down
40 changes: 36 additions & 4 deletions agent-shell-droid.el
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
;;; Commentary:
;;
;; This file includes Factory Droid specific configurations relying on the
;; droid-acp client: https://github.com/yaonyan/droid-acp
;; droid: https://docs.factory.ai/cli/getting-started/quickstart
;;

;;; Code:
Expand Down Expand Up @@ -73,8 +73,35 @@ For no authentication (e.g., using `droid-acp` built-in login):
:type 'alist
:group 'agent-shell)

(defcustom agent-shell-droid-default-model-id
nil
"Default Droid AI model ID.

Must be one of the model ID's displayed under \"Available models\"
when starting a new shell."
:type '(choice (const nil) string)
:group 'agent-shell)

(defcustom agent-shell-droid-default-session-mode-id
nil
"Default Droid AI session mode ID.

Must be one of the mode ID's displayed under \"Available modes\"
when starting a new shell."
:type '(choice (const nil) string)
:group 'agent-shell)

(defcustom agent-shell-droid-default-reasoning-effort
nil
"Default reasoning effort.

It can be one of the followings.
none, dynamic, off, minimal, low, medium, high, xhigh, max"
:type '(choice (const nil) string)
:group 'agent-shell)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

We should drop none and accept nil (default value), which signals not to include the setting at all (and document what nil does).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

done!


(defcustom agent-shell-droid-acp-command
'("droid-acp")
'("droid" "exec" "--output-format" "acp")
"Command and parameters for the Factory Droid ACP client.

The first element is the command name, and the rest are command parameters."
Expand Down Expand Up @@ -111,7 +138,9 @@ Returns an agent configuration alist using `agent-shell-make-agent-config'."
:welcome-function #'agent-shell-droid--welcome-message
:client-maker (lambda (buffer)
(agent-shell-droid-make-client :buffer buffer))
:install-instructions "See https://github.com/yaonyan/droid-acp for installation."))
:default-model-id (lambda () agent-shell-droid-default-model-id)
:default-session-mode-id (lambda () agent-shell-droid-default-session-mode-id)
:install-instructions "See https://docs.factory.ai/cli/getting-started/quickstart for installation."))

(defun agent-shell-droid-start-agent ()
"Start an interactive Factory Droid agent shell."
Expand All @@ -129,7 +158,10 @@ Uses `agent-shell-droid-authentication' for authentication configuration."
(user-error "Please migrate to use agent-shell-droid-acp-command and eval (setq agent-shell-droid-command nil)"))
(let ((api-key (agent-shell-droid-key)))
(agent-shell--make-acp-client :command (car agent-shell-droid-acp-command)
:command-params (cdr agent-shell-droid-acp-command)
:command-params (append (seq-rest agent-shell-droid-acp-command)
(when agent-shell-droid-default-reasoning-effort
(list "--reasoning-effort"
agent-shell-droid-default-reasoning-effort)))
:environment-variables (append (cond ((map-elt agent-shell-droid-authentication :none)
nil)
(api-key
Expand Down