From d961c8f8566cc6dc309a40f1dcffa1033054162b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 29 Oct 2026 11:25:55 +0100 Subject: [PATCH 1/3] ci: avoid duplicate builds for pull request branches --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index caed875..e2decb8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,7 +1,7 @@ name: CI Build Flatpak on: push: - branches: ['**'] + branches: ['main'] pull_request: workflow_dispatch: jobs: From a2ef74bbdd0f44975500809b8f66a5833b0dd9db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 29 Oct 2026 11:43:09 +0100 Subject: [PATCH 2/3] feat(flatpak): replace tea with the Gitea CLI gt - Bundle gitea-cli 0.2.0 as `gt` and note it is not Graphite - Verify gh, glab, and gt are executable in /app/bin before export --- README.md | 2 +- com.t3tools.t3code.yml | 19 ++++++++++++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index f31c1d1..af7cd8c 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ Project directory access still requires an explicit per-path override. ## Sandbox runtime tools -The Flatpak bundles sandbox-local `node`, `npm`, `npx`, `corepack`, `git`, GNU make, OpenSSH client tools, and the `gh`, `glab`, and `tea` hosting CLIs. These are real binaries inside `/app`, not host wrappers. Managed commands precede optional extension commands in `PATH`, without adding host `~/.local/bin`. The manifest does not grant host command execution, home access, or SSH-agent access. +The Flatpak bundles sandbox-local `node`, `npm`, `npx`, `corepack`, `git`, GNU make, OpenSSH client tools, and the `gh`, `glab`, and `gt` hosting CLIs. `gt` is [Gitea CLI](https://gitea.com/gitea/cli), not Graphite. These are real binaries inside `/app`, not host wrappers. Before export, the build checks that all three hosting CLIs exist in `/app/bin` and can print their versions. Managed commands precede optional extension commands in `PATH`, without adding host `~/.local/bin`. The manifest does not grant host command execution, home access, or SSH-agent access. The launcher configures npm globals and cache under T3 Code app data: diff --git a/com.t3tools.t3code.yml b/com.t3tools.t3code.yml index 1a6344d..e0be441 100644 --- a/com.t3tools.t3code.yml +++ b/com.t3tools.t3code.yml @@ -11,6 +11,15 @@ command: startt3code branch: master separate-locales: false +# Check the finished /app tree before exporting any repository or bundle. +cleanup-commands: + - | + set -eu + for cli in gh glab gt; do + test -x "/app/bin/$cli" + "/app/bin/$cli" --version + done + add-extensions: com.t3tools.t3code.Tools: directory: tools @@ -92,15 +101,15 @@ modules: sha256: 4e6c59de9f7ed2f304bf93aad01ea8f8a69584f0450ce90ad696ef81f69c69aa only-arches: [x86_64] - - name: tea + - name: gt buildsystem: simple build-commands: - - install -Dm755 tea-0.16.0-linux-amd64 /app/bin/tea + - install -Dm755 gitea-cli-0.2.0-linux-amd64 /app/bin/gt sources: - type: file - url: https://gitea.com/gitea/tea/releases/download/v0.16.0/tea-0.16.0-linux-amd64 - dest-filename: tea-0.16.0-linux-amd64 - sha256: 9c142c8a0b31485eea2387031c1c404f12b7141075eb4ffbd7ced49441590636 + url: https://gitea.com/gitea/cli/releases/download/v0.2.0/gitea-cli-0.2.0-linux-amd64 + dest-filename: gitea-cli-0.2.0-linux-amd64 + sha256: 220f329cbc08f55f623aa0814000eabab2fe76271c57ffb12fdb6311ab358e36 only-arches: [x86_64] - name: openssh From 497cc6af694dae0ff747c24e3fda169ba399a4f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= Date: Thu, 29 Oct 2026 13:26:34 +0100 Subject: [PATCH 3/3] docs: explain optional GPG and SSH agent overrides --- README.md | 42 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index af7cd8c..aa9b59f 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,9 @@ socket. The default sandbox grants display, IPC, network, portal-based file picking, and cursor theme access. It does not grant access to the full home directory, SSH agent, host command execution, host private keys, or broad host filesystems. -SSH-agent access is available through an explicit user override described below. +SSH-agent and GPG-agent access are available through explicit user overrides +described below. These are optional authentication permissions, not requirements +for launching T3 Code or using every provider. Provider CLIs can be installed into app data with the sandbox-local helper below. Project directory access still requires an explicit per-path override. @@ -129,6 +131,13 @@ Restart T3 Code. On the host, ensure the agent contains the intended key. Inside T3 Code's terminal, `ssh-add -l` lists the available agent identities. Git then uses the bundled SSH client for authentication. +The package already includes `--persist=.ssh`, so current builds do not need a +separate persistence override. For an older build without it, use: + +```bash +flatpak override --user --persist=.ssh --socket=ssh-auth com.t3tools.t3code +``` + Every provider, extension, and project subprocess inherits agent access. An agent does not normally disclose private-key material, but those processes can request authentication with its loaded keys while access lasts. Prefer a @@ -161,6 +170,37 @@ These revocations cannot undo earlier credential disclosure. Agent access is a separate permission and does not require any of those directory or D-Bus grants. See [the disposable SSH boundary checks](tests/ssh-boundary.md) for runtime validation. +## Optional GPG-agent access + +If your workflow needs the host GPG agent, for example for GPG-signed Git +commits, grant access and preserve sandbox-local GnuPG state with: + +```bash +flatpak override --user --socket=gpg-agent --persist=.gnupg com.t3tools.t3code +``` + +Restart T3 Code after changing permissions. This preserves the sandbox's own +`~/.gnupg` under `~/.var/app/com.t3tools.t3code/.gnupg`; it does not expose or +import the host's `~/.gnupg`, public keyring, or configuration. The socket grant +alone does not install a GPG client or configure Git signing. Check that `gpg` +is available inside T3 Code's terminal and configure the required public keys +and signing identity there. This package does not explicitly bundle GnuPG, and +the SSH boundary test does not validate GPG signing. + +All sandbox processes gain access to the agent socket, including providers, +extensions, and project commands. They can request operations permitted by the +agent; do not assume that every request requires fresh confirmation. Only +enable this permission if you trust those processes with that access. + +To revoke GPG-agent access: + +```bash +flatpak override --user --nosocket=gpg-agent com.t3tools.t3code +``` + +Restart T3 Code after revoking access. Revocation does not delete the persisted +sandbox-local GnuPG state. + ## Project access T3 Code's private app data lives under `~/.var/app/com.t3tools.t3code` (see