@gapi/gcli 1.8.266 → 1.8.268
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/build.js
CHANGED
|
@@ -5,6 +5,10 @@ require('esbuild')
|
|
|
5
5
|
platform: 'node',
|
|
6
6
|
target: 'node24',
|
|
7
7
|
outfile: './release/index.js',
|
|
8
|
+
// `gcli --version` reads it (src/main.ts)
|
|
9
|
+
define: {
|
|
10
|
+
__GCLI_VERSION__: JSON.stringify(require('./package.json').version),
|
|
11
|
+
},
|
|
8
12
|
external: process.env.BINARY_BUILD ? [] : ["esbuild"]
|
|
9
13
|
})
|
|
10
14
|
.then((data) => console.log('SUCCESS', data))
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
## 2026-11-18 - local-workspaces: workspace:start --allow-terminal: browser terminals (script PTY) and file watch pushed to Lambforge
|
|
2
|
+
|
|
3
|
+
**Feature:** local-workspaces · **Type:** feat
|
|
4
|
+
|
|
5
|
+
- Plan 36 phase 2 (gcli). `--allow-terminal` lets the owner open a shell in
|
|
6
|
+
the workspace root from the Lambforge editor; without it every
|
|
7
|
+
`terminal/*` op answers 403 with the hint.
|
|
8
|
+
- `terminals.ts` (`TerminalManager`): `$SHELL -i` in a PTY through the
|
|
9
|
+
system's `script` (no native dependency; pipes where it is missing), a
|
|
10
|
+
recursive `fs.watch` of the root (`node_modules`/`.git` ignored), events
|
|
11
|
+
on an rxjs Subject; the connection batches them (40 ms) into
|
|
12
|
+
`pushLocalWorkspaceTerminalEvents`. Max 4 terminals; close kills the
|
|
13
|
+
process group; stop closes all.
|
|
14
|
+
- Ops `terminal/open`, `terminal/input`, `terminal/close` added to
|
|
15
|
+
`WORKSPACE_OPS`.
|
|
16
|
+
- **Test:** `npx jest test/workspace-terminals.spec.ts --coverage=false`
|
|
17
|
+
(output, changed file, close, cap, flag required).
|
|
18
|
+
- **Debug:** no PTY (no echo/line editing) -> `script` missing on the
|
|
19
|
+
machine; no changed-file events -> recursive `fs.watch` unsupported there.
|
|
20
|
+
- **Verification:** tsc clean, eslint, jest workspace + terminals 30/30.
|
|
@@ -19,6 +19,18 @@ the outbound WebSocket tunnel local AI runners use.
|
|
|
19
19
|
| `src/commands/workspace/processes.ts` | `runCommand` (timeout, process-group kill, output tails), `ProcessManager` (background processes, ring buffer, waitFor), `buildEnv` |
|
|
20
20
|
| `src/commands/workspace/{start,list,delete,config,index}.ts` | the commands; `~/.graphql-server/workspaces.json` (0600, keyed by directory) |
|
|
21
21
|
|
|
22
|
+
## Browser terminal (`--allow-terminal`, plan 36)
|
|
23
|
+
|
|
24
|
+
`src/commands/workspace/terminals.ts` (`TerminalManager`): `terminal/open`
|
|
25
|
+
spawns `$SHELL -i` in the root - in a PTY through `script` (Linux
|
|
26
|
+
`script -qfec`, macOS `script -q /dev/null`), plain pipes without it - plus
|
|
27
|
+
a recursive `fs.watch`. Output, exits and changed paths go out on
|
|
28
|
+
`events$`; `WorkspaceConnection` batches them (40 ms) into
|
|
29
|
+
`pushLocalWorkspaceTerminalEvents`. `terminal/input` writes stdin,
|
|
30
|
+
`terminal/close` kills the process group. Without `--allow-terminal` every
|
|
31
|
+
`terminal/*` op answers 403. Canonical: graphql-server
|
|
32
|
+
`docs/features/local-workspaces.md` "Browser terminal".
|
|
33
|
+
|
|
22
34
|
## Protocol (what the backend sends)
|
|
23
35
|
|
|
24
36
|
`POST /workspace/<op>` with a JSON body, answered `head(status) + chunks + end`
|