@grackle-ai/runtime-copilot 0.108.3 → 0.110.1
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 +59 -0
- package/package.json +3 -3
package/README.md
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# @grackle-ai/runtime-copilot
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://www.npmjs.com/package/@grackle-ai/runtime-copilot"><img src="https://img.shields.io/npm/v/@grackle-ai/runtime-copilot.svg" alt="npm version" /></a>
|
|
5
|
+
<a href="https://github.com/nick-pape/grackle/actions/workflows/ci.yml"><img src="https://github.com/nick-pape/grackle/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI" /></a>
|
|
6
|
+
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="License: MIT" /></a>
|
|
7
|
+
</p>
|
|
8
|
+
|
|
9
|
+
<p align="center">
|
|
10
|
+
<img src="https://raw.githubusercontent.com/nick-pape/grackle/main/apps/docs-site/static/img/grackle-logo.png" alt="Grackle" width="200" />
|
|
11
|
+
</p>
|
|
12
|
+
|
|
13
|
+
Grackle runtime that drives GitHub Copilot via the Copilot SDK (`@github/copilot-sdk`).
|
|
14
|
+
|
|
15
|
+
## Overview
|
|
16
|
+
|
|
17
|
+
The Copilot runtime implements the `@grackle-ai/runtime-sdk` `AgentRuntime` interface (`CopilotRuntime extends BaseAgentRuntime`) and wraps the GitHub Copilot SDK. It is registered with the PowerLine runtime registry under the name `copilot` and is selected by personas that target Copilot. Each agent session creates a `CopilotClient`, opens (or resumes) a Copilot session, streams the SDK's events back to Grackle, and tears the session down on completion.
|
|
18
|
+
|
|
19
|
+
The Copilot SDK (`@github/copilot-sdk`) and the Copilot CLI (`@github/copilot`) are **not** install-time dependencies. They are installed lazily at spawn time into an isolated per-runtime directory (`~/.grackle/runtimes/copilot/`) via `ensureRuntimeInstalled` and imported dynamically, so the package stays light until a Copilot session actually runs.
|
|
20
|
+
|
|
21
|
+
## Configuration
|
|
22
|
+
|
|
23
|
+
All configuration is driven by environment variables so the runtime behaves identically across local, Docker, SSH, and other environments.
|
|
24
|
+
|
|
25
|
+
| Variable | Description |
|
|
26
|
+
|----------|-------------|
|
|
27
|
+
| `COPILOT_CLI_PATH` | Path to the Copilot CLI binary. Defaults to `copilot` resolved via `PATH`. |
|
|
28
|
+
| `COPILOT_CLI_URL` | URL of an external Copilot CLI server (e.g. `localhost:4321`). When set, the runtime connects to it instead of spawning a local CLI process. |
|
|
29
|
+
| `COPILOT_PROVIDER_CONFIG` | JSON-encoded provider config for bring-your-own-key (BYOK) scenarios (e.g. `type`, `baseUrl`, `apiKey`). Malformed JSON is ignored. |
|
|
30
|
+
|
|
31
|
+
Session-level options are passed through from Grackle: the model, an optional system message (injected via the SDK's `systemMessage` in `append` mode), MCP servers, and the working directory. Tool permission prompts are auto-approved (`approveAll`) for headless operation.
|
|
32
|
+
|
|
33
|
+
> **Note:** the Copilot SDK does not support a turn limit. If a `maxTurns` value is requested, it is logged and ignored — the session runs until idle.
|
|
34
|
+
|
|
35
|
+
## Models
|
|
36
|
+
|
|
37
|
+
The model is selected per session and passed straight through to the Copilot SDK's session config; this package does not hard-code a model list or a default. The available models are those exposed by your Copilot CLI / SDK installation.
|
|
38
|
+
|
|
39
|
+
## Credentials
|
|
40
|
+
|
|
41
|
+
The runtime resolves a GitHub token from the following environment variables, in priority order:
|
|
42
|
+
|
|
43
|
+
| Variable | Priority |
|
|
44
|
+
|----------|----------|
|
|
45
|
+
| `COPILOT_GITHUB_TOKEN` | 1 |
|
|
46
|
+
| `GH_TOKEN` | 2 |
|
|
47
|
+
| `GITHUB_TOKEN` | 3 |
|
|
48
|
+
|
|
49
|
+
If a token is found, it is passed to the `CopilotClient` and the SDK uses it directly. If none is set, the runtime falls back to the logged-in Copilot user (`useLoggedInUser`). For BYOK setups, supply provider credentials via `COPILOT_PROVIDER_CONFIG` instead.
|
|
50
|
+
|
|
51
|
+
## Requirements
|
|
52
|
+
|
|
53
|
+
- Node.js >= 22
|
|
54
|
+
- The GitHub Copilot SDK (`@github/copilot-sdk`) and Copilot CLI (`@github/copilot`) — installed lazily into `~/.grackle/runtimes/copilot/` at spawn time, or an external CLI server reachable via `COPILOT_CLI_URL`
|
|
55
|
+
- GitHub Copilot credentials — a token in `COPILOT_GITHUB_TOKEN` / `GH_TOKEN` / `GITHUB_TOKEN`, a logged-in Copilot CLI session, or a BYOK provider config in `COPILOT_PROVIDER_CONFIG`
|
|
56
|
+
|
|
57
|
+
## License
|
|
58
|
+
|
|
59
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grackle-ai/runtime-copilot",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.110.1",
|
|
4
4
|
"description": "Grackle GitHub Copilot runtime implementation",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dist/"
|
|
29
29
|
],
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@grackle-ai/
|
|
32
|
-
"@grackle-ai/
|
|
31
|
+
"@grackle-ai/common": "0.110.1",
|
|
32
|
+
"@grackle-ai/runtime-sdk": "0.110.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@rushstack/heft": "1.2.7",
|