Add -with-remote-extension (#2062)

This commit is contained in:
Jim Bennett
2025-04-07 13:42:38 -07:00
committed by GitHub
parent 63623733dc
commit 050a8f2f42
21 changed files with 121 additions and 4 deletions

View File

@@ -376,7 +376,7 @@ goose session --with-builtin developer --with-builtin computercontroller
To enable an extension while starting a session, run the following command:
```bash
goose session --with-extension "{extension command}" --with-extension "{antoher extension command}"
goose session --with-extension "{extension command}" --with-extension "{another extension command}"
```
For example, to start a session with the [Fetch extension](https://github.com/modelcontextprotocol/servers/tree/main/src/fetch), you'd run:
@@ -404,9 +404,22 @@ goose session --with-extension "GITHUB_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN> npx -y
Note that you'll need [Node.js](https://nodejs.org/) installed on your system to run this command, as it uses `npx`.
:::
### Remote Extensions over SSE
To enable a remote extension over SSE while starting a session, run the following command:
```bash
goose session --with-remote-extension "{extension URL}" --with-remote-extension "{another extension URL}"
```
For example, to start a session with a remote extension running on localhost on port 8080, you'd run:
```bash
goose session --with-remote-extension "http://localhost:8080/sse"
```
## Developing Extensions
Goose extensions are implemented with MCP, a standard protocol that allows AI models and agents to securely connect with local or remote resources. Learn how to build your own [extension as an MCP server](https://modelcontextprotocol.io/quickstart/server).
[extensions-directory]: https://block.github.io/goose/v1/extensions

View File

@@ -79,6 +79,24 @@ goose configure
goose session --with-extension "GITHUB_PERSONAL_ACCESS_TOKEN=<YOUR_TOKEN> npx -y @modelcontextprotocol/server-github"
```
- Start a session with the specified remote extension over SSE
**Options:**
**`--with-remote-extension <url>`**
**Usage:**
```bash
goose session --with-remote-extension <url>
```
**Examples:**
```bash
goose session --with-remote-extension "http://localhost:8080/sse"
```
- Start a session with the specified [built-in extension](/docs/getting-started/using-extensions#built-in-extensions) enabled (e.g. 'developer')
**Options:**

View File

@@ -92,7 +92,7 @@ goose run -n my-project -r
### Working with Extensions
If you want to ensure specific extensions are available when running your task, you can indicate this with arguments. This can be done using the `--with-extension` or `--with-builtin` flags:
If you want to ensure specific extensions are available when running your task, you can indicate this with arguments. This can be done using the `--with-extension`, `--with-remote-extension`, or `--with-builtin` flags:
- Using built-in extensions e.g developer and computercontroller extensions
@@ -106,6 +106,12 @@ goose run --with-builtin "developer,computercontroller" -t "your instructions"
goose run --with-extension "ENV1=value1 custom-extension-args" -t "your instructions"
```
- Using remote extensions
```bash
goose run --with-remote-extension "url" -t "your instructions"
```
## Common Use Cases
### Running Script Files