Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
46459aa
feat(serve): server-owned session host with seq replay and dialog replay
ismaelosuna7824 Nov 24, 2026
ef72907
feat(serve): device pairing, scoped tokens and stream tickets
ismaelosuna7824 Nov 24, 2026
dbf4549
feat(serve): hardened HTTP + SSE API over server-owned sessions
ismaelosuna7824 Nov 24, 2026
7767ca5
feat(serve): gentle-shell serve command, daemon, server file and lock
ismaelosuna7824 Nov 24, 2026
9f36f49
docs(serve): protocol, auth, limits and security model
ismaelosuna7824 Nov 24, 2026
e078ee5
feat(serve): --allow-host admits a named Host such as a tailnet Magic…
ismaelosuna7824 Nov 24, 2026
11c517c
docs(serve): try it from source on Linux and reach it from another ma…
ismaelosuna7824 Nov 24, 2026
164f20c
fix(serve): resume sessions by exact id with --session-id
ismaelosuna7824 Nov 24, 2026
fa9e84b
feat(serve): GET /.well-known/gentle-shell names the server without a…
ismaelosuna7824 Nov 24, 2026
ee9e4a1
feat(serve): serve share prints one connection code for LAN pairing
ismaelosuna7824 Nov 24, 2026
fd25173
feat(serve): answer LAN discovery so the app needs only the short code
ismaelosuna7824 Nov 25, 2026
80f6408
feat(desktop-rpc): host tools a client provides and runs
ismaelosuna7824 Nov 25, 2026
9e83ea6
feat(serve): route host tool calls to the device that provides them
ismaelosuna7824 Nov 25, 2026
2a73098
feat(desktop-rpc): host messages, host context and result details
ismaelosuna7824 Nov 25, 2026
c91ad9d
feat(desktop-rpc): several clients may provide the same host tool
ismaelosuna7824 Nov 25, 2026
b0d3762
feat(serve): authenticated port forwarding for pages on the server
ismaelosuna7824 Nov 25, 2026
7ea9eaa
feat(serve): start Gentle Tower and forward it
ismaelosuna7824 Nov 25, 2026
6c933a1
feat(serve): files on the server: list, stat, read, write, mkdir, ren…
ismaelosuna7824 Nov 25, 2026
55c8a8e
feat(serve): git commands in folders on the server
ismaelosuna7824 Nov 25, 2026
98bb214
feat(serve): uploads for chat attachments
ismaelosuna7824 Nov 25, 2026
e9c80db
feat(serve): server-level forwards and services
ismaelosuna7824 Nov 25, 2026
858b3b4
feat(serve): terminals over a native host
ismaelosuna7824 Nov 25, 2026
9e7e219
docs(remote): overview, diagrams and security model for serve
ismaelosuna7824 Nov 25, 2026
39f2df5
feat(serve): a stable server id across restarts
ismaelosuna7824 Nov 25, 2026
e5f7e19
feat(serve): one-shot prompts on the server
ismaelosuna7824 Nov 25, 2026
1742d16
feat(serve): term host over TCP on Windows
ismaelosuna7824 Nov 25, 2026
27a4662
fix(serve): type the one-shot prompt's model
ismaelosuna7824 Nov 25, 2026
2056aa0
feat(serve): session keeper, TLS with a pairing proof, and a relay
ismaelosuna7824 Nov 25, 2026
e150bb9
fix(serve): keep a keeper's socket inside the Unix path limit
ismaelosuna7824 Nov 25, 2026
c807c5e
test(serve): do not wait on the impostor's socket to close
ismaelosuna7824 Nov 25, 2026
f561ca2
feat(desktop-rpc): host tool progress keeps a working call alive
ismaelosuna7824 Nov 25, 2026
b3cd72c
feat(desktop-rpc): sign in to providers from a client
ismaelosuna7824 Nov 25, 2026
cc4c788
feat(desktop-rpc): manage packages from a client
ismaelosuna7824 Nov 25, 2026
b173ec6
feat(serve): upgrade Gentle Shell from a client
ismaelosuna7824 Nov 25, 2026
3bebba5
fix(desktop-rpc): list local packages by a path remove_package accepts
ismaelosuna7824 Nov 25, 2026
70d3957
feat(serve): a device unpairs itself
ismaelosuna7824 Nov 25, 2026
8d7f042
feat(desktop-rpc): an epoch tells clients when event numbering restarts
ismaelosuna7824 Nov 25, 2026
94635c5
feat(serve): a device paired again takes its earlier pairing's place
ismaelosuna7824 Nov 25, 2026
6d629be
feat(desktop-rpc): model defaults through set_config
ismaelosuna7824 Nov 25, 2026
9f83acc
feat(serve): run Gentle Shell's setup from a client
ismaelosuna7824 Nov 25, 2026
aa294a3
feat(desktop-rpc): custom models and MCP servers as config stores
ismaelosuna7824 Nov 25, 2026
48ba3b6
refactor(serve): drop config file paths from the server info
ismaelosuna7824 Nov 25, 2026
8ae6528
feat(serve): Desktop RPC without opening a session
ismaelosuna7824 Nov 25, 2026
16ef9bd
docs(serve): bring "Try it from source on Linux" up to date
ismaelosuna7824 Nov 25, 2026
e5f4c27
docs(serve): the network server speaks HTTPS
ismaelosuna7824 Nov 25, 2026
66817e1
docs(remote): a runbook for testing serve on a Linux machine
ismaelosuna7824 Nov 26, 2026
e653924
docs(orchestration): a plan for multi-repo orchestration (Phase 5)
ismaelosuna7824 Nov 26, 2026
fd8276e
Merge upstream/main into feat/serve-phase1
ismaelosuna7824 Nov 26, 2026
200a3df
test(serve): stop session keepers the tests start
ismaelosuna7824 Nov 26, 2026
5e27aa6
docs(remote): the network server speaks TLS, and a relay reaches it f…
ismaelosuna7824 Nov 26, 2026
2adf97a
test(serve): end the dialog and terminal races that hung CI, time out…
ismaelosuna7824 Nov 26, 2026
fb45dce
fix(serve): a new server version starts a fresh control session
ismaelosuna7824 Nov 26, 2026
f986bbe
Merge remote-tracking branch 'upstream/main' into feat/serve-phase1
ismaelosuna7824 Nov 26, 2026
8c37880
build(runtime): regenerate serve-server after the control session change
ismaelosuna7824 Nov 26, 2026
e4ce75e
fix(serve): file contents need sessions:operate
ismaelosuna7824 Nov 26, 2026
859db2d
feat(serve): readiness checks (GET /api/checks)
ismaelosuna7824 Nov 26, 2026
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,8 @@ Start with the product-facing destination, then move into the operational refere
| [ODD workflow](docs/readme-reference.md#organic-driven-development) · [Technical reference](docs/readme-reference.md) | Everyday work and recovery, installation, configuration, commands, and contributor detail. |
| [Installation wizard (preview)](docs/install-wizard.md) | How the browser installer checks your computer, what it installs on the release and main channels, its security model, and what is still being verified. |
| [Removing Gentle Shell](docs/gentle-shell-uninstall.md) | What `gentle-shell self-uninstall` removes, keeps and never touches. |
| [Remote use](docs/remote.md) | Agents on one machine, driven from others: what runs on the server and on each client, pairing with a short code, sessions, host tools, forwarded pages and terminals, with diagrams and the security model. |
| [`gentle-shell serve`](docs/serve.md) | The server's reference: commands, files, every endpoint, pairing, device tokens, the HTTP + SSE protocol, limits and troubleshooting. |
| [Review integration](docs/review-integration.md) | The provider/consumer boundary for native review. |
| [Native authority architecture](docs/native-authority-architecture.md) | Ownership boundaries and review architecture. |
| [Delegated verification](docs/delegated-verification.md) | Practical verification guidance. |
Expand Down
40 changes: 40 additions & 0 deletions bin/gentle-shell.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -2264,6 +2264,42 @@ async function main() {
else await handleSelfUninstallCommand(args.commandArgs);
return;
}
// `gentle-shell [home selectors] serve`: one server per agent home that owns
// `--mode rpc` sessions for remote clients (docs/serve.md). Its sessions are
// this same launcher with the same home, so they resolve Pi like a plain launch.
if (args.command === "serve") {
const { parseServeArgs, runServeCommand } = await import("../runtime/serve-cli.mjs");
const serve = parseServeArgs(args.commandArgs);
if ("error" in serve) fail(`gentle-shell serve: ${serve.error}\nRun 'gentle-shell serve --help' for usage.`, 2);
let home = resolveHome({ args, env: process.env, homedir: homedir(), config: loadConfig() });
if (home.mode === "path") home = { ...home, dir: resolvePath(home.dir) };
// The server file lives inside the home: create a new home the way a first
// launch does, so its sessions still treat it as Gentle Shell's own.
if ((serve.action === "start" || serve.action === "share") && (home.mode === "isolated" || home.mode === "path") && !existsSync(home.dir)) await bootstrapOwnedHome(home);
const homeFlags = home.mode === "link" ? ["--link"] : home.mode === "isolated" ? ["--isolated"] : ["--home", home.dir];
// After `POST /api/upgrade` the server restarts on the launcher of the installed version: this one
// (npm and pnpm upgrade it in place), or the bundled version `current` names by then.
const restartLauncher = bundled ? () => {
const current = join(bundled.root, "current");
const versionDir = process.platform === "win32" ? join(bundled.root, "versions", readFileSync(current, "utf8").trim()) : current;
return join(versionDir, "node_modules", "gentle-pi", "bin", "gentle-shell.mjs");
} : undefined;
process.exitCode = await runServeCommand(serve, { agentHome: home.dir, homeFlags, launcher: fileURLToPath(import.meta.url), nodePath: process.execPath,
version: ownPackageVersion(), env: process.env, stdout: (text) => process.stdout.write(text), stderr: (text) => process.stderr.write(text),
...(restartLauncher ? { restartLauncher } : {}) });
return;
}
// `gentle-shell [home selectors] relay`: the rendezvous that lets devices outside
// a server's network reach it (docs/serve.md#relay). Its secret lives in the home.
if (args.command === "relay") {
const { parseRelayArgs, runRelayCommand } = await import("../runtime/serve-relay-cli.mjs");
const relay = parseRelayArgs(args.commandArgs);
if ("error" in relay) fail(`gentle-shell relay: ${relay.error}\nRun 'gentle-shell relay --help' for usage.`, 2);
let home = resolveHome({ args, env: process.env, homedir: homedir(), config: loadConfig() });
if (home.mode === "path") home = { ...home, dir: resolvePath(home.dir) };
process.exitCode = await runRelayCommand(relay, { agentHome: home.dir, env: process.env, stdout: (text) => process.stdout.write(text), stderr: (text) => process.stderr.write(text) });
return;
}

const startupCode = await startupUpdate(bundled, args, startupEnv);
if (startupCode !== undefined) {
Expand Down Expand Up @@ -2569,6 +2605,10 @@ async function main() {
// A nested launch must not inherit a stale reporter handoff.
if (herdr.reporter) invocation.env[HERDR_REPORTER_ENV] = "1";
else delete invocation.env[HERDR_REPORTER_ENV];
// A Desktop client's package install or removal runs this same CLI with this
// same home (lib/desktop-packages-service.ts), wherever the session runs.
const selfHomeFlags = home.mode === "path" ? ["--home", resolvePath(home.dir)] : homeSelectorFlags(home);
invocation.env.GENTLE_SHELL_LAUNCH = JSON.stringify({ command: process.execPath, args: [fileURLToPath(import.meta.url), ...selfHomeFlags] });

const resumeHandoff = args.piSubcommand === undefined ? createResumeHandoff() : undefined;
const childEnv = resumeHandoff ? { ...invocation.env, [RESUME_HANDOFF_ENV]: resumeHandoff.path } : invocation.env;
Expand Down
Loading
Loading