@grackle-ai/adapter-codespace 0.72.2
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 +20 -0
- package/dist/codespace.d.ts +38 -0
- package/dist/codespace.d.ts.map +1 -0
- package/dist/codespace.js +213 -0
- package/dist/codespace.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/tsdoc-metadata.json +11 -0
- package/package.json +44 -0
package/README.md
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# @grackle-ai/adapter-codespace
|
|
2
|
+
|
|
3
|
+
Grackle environment adapter for managing GitHub Codespaces.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The Codespace adapter provisions PowerLine inside a GitHub Codespace, opens a port-forward tunnel via `gh codespace ports forward`, and a reverse tunnel so remote agents can reach the local MCP server.
|
|
8
|
+
|
|
9
|
+
## Configuration
|
|
10
|
+
|
|
11
|
+
| Field | Type | Default | Description |
|
|
12
|
+
|-------|------|---------|-------------|
|
|
13
|
+
| `codespaceName` | `string` | *required* | Codespace name from `gh codespace list` |
|
|
14
|
+
| `localPort` | `number` | auto | Override local tunnel port |
|
|
15
|
+
| `env` | `Record<string, string>` | — | Extra env vars for remote PowerLine |
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
- GitHub CLI (`gh`) installed and authenticated
|
|
20
|
+
- An existing GitHub Codespace
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { EnvironmentAdapter, BaseEnvironmentConfig, PowerLineConnection, ProvisionEvent, AdapterDependencies } from "@grackle-ai/adapter-sdk";
|
|
2
|
+
/** GitHub Codespaces-specific environment configuration. */
|
|
3
|
+
export interface CodespaceEnvironmentConfig extends BaseEnvironmentConfig {
|
|
4
|
+
/** The codespace name from `gh codespace list` (required). */
|
|
5
|
+
codespaceName: string;
|
|
6
|
+
/** Override the local tunnel port (otherwise a free port is chosen). */
|
|
7
|
+
localPort?: number;
|
|
8
|
+
/** Additional environment variables forwarded to the remote PowerLine. */
|
|
9
|
+
env?: Record<string, string>;
|
|
10
|
+
}
|
|
11
|
+
/** Environment adapter that provisions and manages GitHub Codespaces running the PowerLine. */
|
|
12
|
+
export declare class CodespaceAdapter implements EnvironmentAdapter {
|
|
13
|
+
type: string;
|
|
14
|
+
private readonly execFn;
|
|
15
|
+
private readonly sleepFn;
|
|
16
|
+
private readonly isGitHubProviderEnabled;
|
|
17
|
+
constructor(deps?: AdapterDependencies);
|
|
18
|
+
/** Provision the codespace: verify connectivity, bootstrap PowerLine, open port-forward. */
|
|
19
|
+
provision(environmentId: string, config: Record<string, unknown>, powerlineToken: string): AsyncGenerator<ProvisionEvent>;
|
|
20
|
+
/**
|
|
21
|
+
* Attempt fast reconnect: probe PowerLine, restart if needed, re-open tunnel.
|
|
22
|
+
*/
|
|
23
|
+
reconnect(environmentId: string, config: Record<string, unknown>, powerlineToken: string): AsyncGenerator<ProvisionEvent>;
|
|
24
|
+
/** Connect to the PowerLine through the port-forward tunnel. */
|
|
25
|
+
connect(environmentId: string, config: Record<string, unknown>, powerlineToken: string): Promise<PowerLineConnection>;
|
|
26
|
+
/** Close the port-forward tunnel without stopping the remote PowerLine. */
|
|
27
|
+
disconnect(environmentId: string): Promise<void>;
|
|
28
|
+
/** Stop the remote PowerLine process and close the tunnel. */
|
|
29
|
+
stop(environmentId: string, config: Record<string, unknown>): Promise<void>;
|
|
30
|
+
/**
|
|
31
|
+
* Stop the remote PowerLine and remove artifacts from the codespace.
|
|
32
|
+
* This does NOT delete the codespace itself.
|
|
33
|
+
*/
|
|
34
|
+
destroy(environmentId: string, config: Record<string, unknown>): Promise<void>;
|
|
35
|
+
/** Check that the tunnel is alive and the PowerLine responds to a ping. */
|
|
36
|
+
healthCheck(connection: PowerLineConnection): Promise<boolean>;
|
|
37
|
+
}
|
|
38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/B,2EAA2E;IAC9D,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI7D,8DAA8D;IACjD,IAAI,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxF;;;OAGG;IACU,OAAO,CAAC,aAAa,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAK3F,2EAA2E;IAC9D,WAAW,CAAC,UAAU,EAAE,mBAAmB,GAAG,OAAO,CAAC,OAAO,CAAC;CAG5E"}
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import { DEFAULT_POWERLINE_PORT, DEFAULT_MCP_PORT } from "@grackle-ai/common";
|
|
2
|
+
import { ProcessTunnel, bootstrapPowerLine, connectThroughTunnel, registerTunnel, getTunnel, closeTunnel, findFreePort, remoteStop, remoteDestroy, remoteHealthCheck, startRemotePowerLine, exec as defaultExec, sleep as defaultSleep, SSH_CONNECTIVITY_TIMEOUT_MS, REMOTE_EXEC_DEFAULT_TIMEOUT_MS, } from "@grackle-ai/adapter-sdk";
|
|
3
|
+
const REMOTE_COPY_TIMEOUT_MS = 120_000;
|
|
4
|
+
/** Delay for reverse tunnels to wait for SSH to establish. */
|
|
5
|
+
const REVERSE_TUNNEL_SETTLE_MS = 3_000;
|
|
6
|
+
// ─── Executor ───────────────────────────────────────────────
|
|
7
|
+
/** Execute commands inside a GitHub Codespace via the `gh` CLI. */
|
|
8
|
+
class CodespaceExecutor {
|
|
9
|
+
codespaceName;
|
|
10
|
+
execFn;
|
|
11
|
+
constructor(codespaceName, execFn) {
|
|
12
|
+
this.codespaceName = codespaceName;
|
|
13
|
+
this.execFn = execFn;
|
|
14
|
+
}
|
|
15
|
+
/** Execute a shell command inside the codespace and return trimmed stdout. */
|
|
16
|
+
async exec(command, opts) {
|
|
17
|
+
const args = ["codespace", "ssh", "-c", this.codespaceName, "--", command];
|
|
18
|
+
const result = await this.execFn("gh", args, { timeout: opts?.timeout ?? REMOTE_EXEC_DEFAULT_TIMEOUT_MS });
|
|
19
|
+
return result.stdout;
|
|
20
|
+
}
|
|
21
|
+
/** Copy a local file or directory into the codespace via `gh codespace cp`. */
|
|
22
|
+
async copyTo(localPath, remotePath) {
|
|
23
|
+
// Resolve $HOME since gh codespace cp uses SCP, which doesn't expand shell variables
|
|
24
|
+
let resolvedPath = remotePath;
|
|
25
|
+
if (resolvedPath.includes("$HOME")) {
|
|
26
|
+
const home = (await this.exec("echo $HOME")).trim();
|
|
27
|
+
resolvedPath = resolvedPath.replace(/\$HOME/g, home);
|
|
28
|
+
}
|
|
29
|
+
const args = [
|
|
30
|
+
"codespace", "cp", "-r", "-e",
|
|
31
|
+
"-c", this.codespaceName,
|
|
32
|
+
localPath,
|
|
33
|
+
`remote:${resolvedPath}`,
|
|
34
|
+
];
|
|
35
|
+
await this.execFn("gh", args, { timeout: REMOTE_COPY_TIMEOUT_MS });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
// ─── Tunnel ─────────────────────────────────────────────────
|
|
39
|
+
/** Port-forwarding tunnel using `gh codespace ports forward`. */
|
|
40
|
+
class CodespaceTunnel extends ProcessTunnel {
|
|
41
|
+
codespaceName;
|
|
42
|
+
constructor(localPort, codespaceName, processFactory, portProbe) {
|
|
43
|
+
super(localPort, undefined, processFactory, portProbe);
|
|
44
|
+
this.codespaceName = codespaceName;
|
|
45
|
+
}
|
|
46
|
+
/** Return the gh command and arguments for the port-forward process. */
|
|
47
|
+
spawnArgs() {
|
|
48
|
+
// gh codespace ports forward uses <remote>:<local> order (opposite of SSH -L)
|
|
49
|
+
const args = [
|
|
50
|
+
"codespace", "ports", "forward",
|
|
51
|
+
`${DEFAULT_POWERLINE_PORT}:${this.localPort}`,
|
|
52
|
+
"-c", this.codespaceName,
|
|
53
|
+
];
|
|
54
|
+
return { command: "gh", args };
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Reverse SSH tunnel: binds a port inside the codespace that tunnels back to a local port.
|
|
59
|
+
* Used so agents (running in the codespace) can reach the Grackle MCP server (on the host).
|
|
60
|
+
*/
|
|
61
|
+
class CodespaceReverseTunnel extends ProcessTunnel {
|
|
62
|
+
codespaceName;
|
|
63
|
+
remotePort;
|
|
64
|
+
sleepFn;
|
|
65
|
+
constructor(localPort, remotePort, codespaceName, sleepFn, processFactory, portProbe) {
|
|
66
|
+
super(localPort, undefined, processFactory, portProbe);
|
|
67
|
+
this.remotePort = remotePort;
|
|
68
|
+
this.codespaceName = codespaceName;
|
|
69
|
+
this.sleepFn = sleepFn;
|
|
70
|
+
}
|
|
71
|
+
/** Return the gh codespace ssh command with -R for reverse port forwarding. */
|
|
72
|
+
spawnArgs() {
|
|
73
|
+
const args = [
|
|
74
|
+
"codespace", "ssh",
|
|
75
|
+
"-c", this.codespaceName,
|
|
76
|
+
"--",
|
|
77
|
+
"-R", `${this.remotePort}:127.0.0.1:${this.localPort}`,
|
|
78
|
+
"-N",
|
|
79
|
+
];
|
|
80
|
+
return { command: "gh", args };
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Reverse tunnels bind on the remote side, not locally.
|
|
84
|
+
* We can't probe the remote port, so wait a fixed delay for SSH to establish.
|
|
85
|
+
*/
|
|
86
|
+
async waitForReady() {
|
|
87
|
+
await this.sleepFn(REVERSE_TUNNEL_SETTLE_MS);
|
|
88
|
+
if (this.process?.exitCode !== null) {
|
|
89
|
+
throw new Error(`Reverse tunnel exited immediately with code ${this.process?.exitCode}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
// ─── Adapter ────────────────────────────────────────────────
|
|
94
|
+
/** Environment adapter that provisions and manages GitHub Codespaces running the PowerLine. */
|
|
95
|
+
export class CodespaceAdapter {
|
|
96
|
+
type = "codespace";
|
|
97
|
+
execFn;
|
|
98
|
+
sleepFn;
|
|
99
|
+
isGitHubProviderEnabled;
|
|
100
|
+
constructor(deps = {}) {
|
|
101
|
+
this.execFn = deps.exec ?? defaultExec;
|
|
102
|
+
this.sleepFn = deps.sleep ?? defaultSleep;
|
|
103
|
+
this.isGitHubProviderEnabled = deps.isGitHubProviderEnabled ?? (() => false);
|
|
104
|
+
}
|
|
105
|
+
/** Provision the codespace: verify connectivity, bootstrap PowerLine, open port-forward. */
|
|
106
|
+
async *provision(environmentId, config, powerlineToken) {
|
|
107
|
+
const cfg = config;
|
|
108
|
+
if (!cfg.codespaceName) {
|
|
109
|
+
throw new Error("Codespace adapter requires a 'codespaceName' in the configuration");
|
|
110
|
+
}
|
|
111
|
+
const executor = new CodespaceExecutor(cfg.codespaceName, this.execFn);
|
|
112
|
+
// Test codespace connectivity
|
|
113
|
+
yield { stage: "connecting", message: `Connecting to codespace ${cfg.codespaceName}...`, progress: 0.05 };
|
|
114
|
+
try {
|
|
115
|
+
await executor.exec("echo ok", { timeout: SSH_CONNECTIVITY_TIMEOUT_MS });
|
|
116
|
+
}
|
|
117
|
+
catch (err) {
|
|
118
|
+
throw new Error(`Cannot reach codespace '${cfg.codespaceName}' via gh CLI: ${err instanceof Error ? err.message : String(err)}`);
|
|
119
|
+
}
|
|
120
|
+
// Detect the repo working directory (codespaces clone to /workspaces/<name>)
|
|
121
|
+
let workingDirectory;
|
|
122
|
+
try {
|
|
123
|
+
const workspaceDir = (await executor.exec("ls -d /workspaces/*/ 2>/dev/null | head -1", { timeout: SSH_CONNECTIVITY_TIMEOUT_MS })).trim().replace(/\/$/, "");
|
|
124
|
+
if (workspaceDir) {
|
|
125
|
+
workingDirectory = workspaceDir;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
// Non-fatal — fall back to PowerLine directory
|
|
130
|
+
}
|
|
131
|
+
// Bootstrap PowerLine on the codespace
|
|
132
|
+
yield* bootstrapPowerLine(executor, powerlineToken, {
|
|
133
|
+
extraEnv: cfg.env,
|
|
134
|
+
workingDirectory,
|
|
135
|
+
isGitHubProviderEnabled: this.isGitHubProviderEnabled,
|
|
136
|
+
defaultRuntime: config.defaultRuntime || undefined,
|
|
137
|
+
});
|
|
138
|
+
// Open port-forward tunnel (host → codespace PowerLine)
|
|
139
|
+
const localPort = cfg.localPort || await findFreePort();
|
|
140
|
+
yield { stage: "tunneling", message: `Forwarding local port ${localPort} to codespace...`, progress: 0.80 };
|
|
141
|
+
const tunnel = new CodespaceTunnel(localPort, cfg.codespaceName);
|
|
142
|
+
await tunnel.open();
|
|
143
|
+
// Open reverse tunnel (codespace → host MCP server) for agent tool calls
|
|
144
|
+
const mcpPort = parseInt(process.env.GRACKLE_MCP_PORT || String(DEFAULT_MCP_PORT), 10);
|
|
145
|
+
const reverseTunnel = new CodespaceReverseTunnel(mcpPort, mcpPort, cfg.codespaceName, this.sleepFn);
|
|
146
|
+
await reverseTunnel.open();
|
|
147
|
+
registerTunnel(environmentId, { tunnel, reverseTunnel });
|
|
148
|
+
yield { stage: "connecting", message: `Tunnel open, connecting on port ${localPort}...`, progress: 0.90 };
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Attempt fast reconnect: probe PowerLine, restart if needed, re-open tunnel.
|
|
152
|
+
*/
|
|
153
|
+
async *reconnect(environmentId, config, powerlineToken) {
|
|
154
|
+
const cfg = config;
|
|
155
|
+
if (!cfg.codespaceName) {
|
|
156
|
+
throw new Error("Codespace adapter requires a 'codespaceName' in the configuration");
|
|
157
|
+
}
|
|
158
|
+
const executor = new CodespaceExecutor(cfg.codespaceName, this.execFn);
|
|
159
|
+
// 1. Close any stale tunnel
|
|
160
|
+
yield { stage: "reconnecting", message: "Closing stale tunnel...", progress: 0.10 };
|
|
161
|
+
await closeTunnel(environmentId);
|
|
162
|
+
// 2. Probe + conditional restart in a single SSH call.
|
|
163
|
+
yield { stage: "reconnecting", message: `Checking PowerLine on ${cfg.codespaceName}...`, progress: 0.30 };
|
|
164
|
+
const { alreadyRunning } = await startRemotePowerLine(executor, powerlineToken, {
|
|
165
|
+
extraEnv: cfg.env,
|
|
166
|
+
autoDetectWorkspace: true,
|
|
167
|
+
probeFirst: true,
|
|
168
|
+
});
|
|
169
|
+
if (!alreadyRunning) {
|
|
170
|
+
yield { stage: "reconnecting", message: "PowerLine restarted", progress: 0.50 };
|
|
171
|
+
}
|
|
172
|
+
// 3. Open new port-forward tunnel + reverse tunnel for MCP
|
|
173
|
+
const localPort = cfg.localPort || await findFreePort();
|
|
174
|
+
yield { stage: "reconnecting", message: `Forwarding local port ${localPort} to codespace...`, progress: 0.70 };
|
|
175
|
+
const tunnel = new CodespaceTunnel(localPort, cfg.codespaceName);
|
|
176
|
+
await tunnel.open();
|
|
177
|
+
const mcpPort = parseInt(process.env.GRACKLE_MCP_PORT || String(DEFAULT_MCP_PORT), 10);
|
|
178
|
+
const reverseTunnel = new CodespaceReverseTunnel(mcpPort, mcpPort, cfg.codespaceName, this.sleepFn);
|
|
179
|
+
await reverseTunnel.open();
|
|
180
|
+
registerTunnel(environmentId, { tunnel, reverseTunnel });
|
|
181
|
+
yield { stage: "reconnecting", message: "Reconnected to codespace", progress: 0.90 };
|
|
182
|
+
}
|
|
183
|
+
/** Connect to the PowerLine through the port-forward tunnel. */
|
|
184
|
+
async connect(environmentId, config, powerlineToken) {
|
|
185
|
+
const state = getTunnel(environmentId);
|
|
186
|
+
if (!state) {
|
|
187
|
+
throw new Error(`No tunnel registered for environment ${environmentId}`);
|
|
188
|
+
}
|
|
189
|
+
return connectThroughTunnel(environmentId, state.tunnel.localPort, powerlineToken);
|
|
190
|
+
}
|
|
191
|
+
/** Close the port-forward tunnel without stopping the remote PowerLine. */
|
|
192
|
+
async disconnect(environmentId) {
|
|
193
|
+
await closeTunnel(environmentId);
|
|
194
|
+
}
|
|
195
|
+
/** Stop the remote PowerLine process and close the tunnel. */
|
|
196
|
+
async stop(environmentId, config) {
|
|
197
|
+
const cfg = config;
|
|
198
|
+
await remoteStop(environmentId, new CodespaceExecutor(cfg.codespaceName, this.execFn));
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Stop the remote PowerLine and remove artifacts from the codespace.
|
|
202
|
+
* This does NOT delete the codespace itself.
|
|
203
|
+
*/
|
|
204
|
+
async destroy(environmentId, config) {
|
|
205
|
+
const cfg = config;
|
|
206
|
+
await remoteDestroy(environmentId, new CodespaceExecutor(cfg.codespaceName, this.execFn));
|
|
207
|
+
}
|
|
208
|
+
/** Check that the tunnel is alive and the PowerLine responds to a ping. */
|
|
209
|
+
async healthCheck(connection) {
|
|
210
|
+
return remoteHealthCheck(connection);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
//# sourceMappingURL=codespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codespace.js","sourceRoot":"","sources":["../src/codespace.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAIL,aAAa,EACb,kBAAkB,EAClB,oBAAoB,EACpB,cAAc,EACd,SAAS,EACT,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,EACb,iBAAiB,EACjB,oBAAoB,EACpB,IAAI,IAAI,WAAW,EACnB,KAAK,IAAI,YAAY,EACrB,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,yBAAyB,CAAC;AAEjC,MAAM,sBAAsB,GAAW,OAAO,CAAC;AAE/C,8DAA8D;AAC9D,MAAM,wBAAwB,GAAW,KAAK,CAAC;AAc/C,+DAA+D;AAE/D,mEAAmE;AACnE,MAAM,iBAAiB;IACJ,aAAa,CAAS;IACtB,MAAM,CAAe;IAEtC,YAAmB,aAAqB,EAAE,MAAoB;QAC5D,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACnC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,8EAA8E;IACvE,KAAK,CAA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CAAC,CAAC;IACnC,CAAC;IAED,8DAA8D;IACvD,KAAK,CAAC,IAAI,CAAC,aAAqB,EAAE,MAA+B;QACtE,MAAM,GAAG,GAAG,MAA+C,CAAC;QAC5D,MAAM,UAAU,CAAC,aAAa,EAAE,IAAI,iBAAiB,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,CAAC;IAED;;;OAGG;IACI,KAAK,CAAC,OAAO,CAAC,aAAqB,EAAE,MAA+B;QACzE,MAAM,GAAG,GAAG,MAA+C,CAAC;QAC5D,MAAM,aAAa,CAAC,aAAa,EAAE,IAAI,iBAAiB,CAAC,GAAG,CAAC,aAAa,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;IAC5F,CAAC;IAED,2EAA2E;IACpE,KAAK,CAAC,WAAW,CAAC,UAA+B;QACtD,OAAO,iBAAiB,CAAC,UAAU,CAAC,CAAC;IACvC,CAAC;CACF"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAClD,YAAY,EAAE,0BAA0B,EAAE,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
+
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
+
{
|
|
4
|
+
"tsdocVersion": "0.12",
|
|
5
|
+
"toolPackages": [
|
|
6
|
+
{
|
|
7
|
+
"packageName": "@microsoft/api-extractor",
|
|
8
|
+
"packageVersion": "7.57.7"
|
|
9
|
+
}
|
|
10
|
+
]
|
|
11
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@grackle-ai/adapter-codespace",
|
|
3
|
+
"version": "0.72.2",
|
|
4
|
+
"description": "Grackle GitHub Codespace environment adapter",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/nick-pape/grackle.git",
|
|
9
|
+
"directory": "packages/adapter-codespace"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"grackle",
|
|
13
|
+
"adapter",
|
|
14
|
+
"codespace",
|
|
15
|
+
"github",
|
|
16
|
+
"environment"
|
|
17
|
+
],
|
|
18
|
+
"engines": {
|
|
19
|
+
"node": ">=22.0.0"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "dist/index.js",
|
|
23
|
+
"types": "dist/index.d.ts",
|
|
24
|
+
"files": [
|
|
25
|
+
"dist/"
|
|
26
|
+
],
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@grackle-ai/common": "0.72.2",
|
|
29
|
+
"@grackle-ai/adapter-sdk": "0.72.2"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"@rushstack/heft": "1.2.7",
|
|
33
|
+
"@types/node": "^22.0.0",
|
|
34
|
+
"vitest": "^3.1.1",
|
|
35
|
+
"@grackle-ai/heft-rig": "0.0.1"
|
|
36
|
+
},
|
|
37
|
+
"scripts": {
|
|
38
|
+
"build": "heft build --clean",
|
|
39
|
+
"test": "vitest run",
|
|
40
|
+
"clean": "heft clean",
|
|
41
|
+
"_phase:build": "heft run --only build -- --clean",
|
|
42
|
+
"_phase:test": "vitest run"
|
|
43
|
+
}
|
|
44
|
+
}
|