From 3165a3e7bd4c3a5d0c807c9e7dda66ef509a33da Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Mon, 17 Aug 2026 22:34:21 -0300 Subject: [PATCH 1/2] ops(OPS55): worktree respeita WORKTREES_ROOT do .forgejo/worktree.env MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - worktree.mjs: WORKTREES_ROOT = env ?? fallback (~/.cursor/worktrees/teqo) - .forgejo/worktree.env novo: FORGEJO_REPOSITORY=fsolla/teqo + root atual (migração para ~/.worktrees/teqo fica para quando as sessões opencode ativas nos worktrees antigos fecharem — OPS52/OPS53/PUB5) Roteador global (~/.config/shell/worktree.sh) exporta as chaves do arquivo por projeto; iara-pwa já usa o mesmo mecanismo. --- .forgejo/worktree.env | 5 +++++ scripts/worktree.mjs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .forgejo/worktree.env diff --git a/.forgejo/worktree.env b/.forgejo/worktree.env new file mode 100644 index 00000000..b7af1ca7 --- /dev/null +++ b/.forgejo/worktree.env @@ -0,0 +1,5 @@ +FORGEJO_REPOSITORY=fsolla/teqo +# Mantém o root atual enquanto houver sessões opencode ativas nos worktrees +# antigos (OPS52/OPS53/PUB5 em ~/.cursor/worktrees/teqo). Quando todas +# fecharem, migrar para ~/.worktrees/teqo (git worktree move) e trocar aqui. +WORKTREES_ROOT=~/.cursor/worktrees/teqo diff --git a/scripts/worktree.mjs b/scripts/worktree.mjs index 57d13760..ad6cccbe 100644 --- a/scripts/worktree.mjs +++ b/scripts/worktree.mjs @@ -141,7 +141,8 @@ import { } from './lib/worktree.mjs' const die = dieAgent('worktree') -const WORKTREES_ROOT = join(homedir(), '.cursor', 'worktrees', 'teqo') +const WORKTREES_ROOT = + process.env.WORKTREES_ROOT ?? join(homedir(), '.cursor', 'worktrees', 'teqo') /** * True when the interactive terminal shell function (`.agents/shell/worktree.sh`) -- 2.45.2 From 365f254f0691147086a8789e8bc2ec6b2bf19c55 Mon Sep 17 00:00:00 2001 From: Francisco Solla Date: Mon, 17 Aug 2026 22:35:28 -0300 Subject: [PATCH 2/2] =?UTF-8?q?ops(OPS55):=20prettier=20em=20scripts/workt?= =?UTF-8?q?ree.mjs=20(formato=20p=C3=B3s-commit)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/worktree.mjs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/worktree.mjs b/scripts/worktree.mjs index ad6cccbe..a7e70dd4 100644 --- a/scripts/worktree.mjs +++ b/scripts/worktree.mjs @@ -141,8 +141,7 @@ import { } from './lib/worktree.mjs' const die = dieAgent('worktree') -const WORKTREES_ROOT = - process.env.WORKTREES_ROOT ?? join(homedir(), '.cursor', 'worktrees', 'teqo') +const WORKTREES_ROOT = process.env.WORKTREES_ROOT ?? join(homedir(), '.cursor', 'worktrees', 'teqo') /** * True when the interactive terminal shell function (`.agents/shell/worktree.sh`) -- 2.45.2