Commit graph

24 commits

Author SHA1 Message Date
deseltrus
d154d992dd feat(config): session-internal /gsd config + fix key hydration
Three fixes for config/setup UX:

1. cli.ts: Add missing loadStoredEnvKeys() call in gsd config flow.
   Previously, gsd config showed keys as "not configured" even when
   they existed in auth.json because env vars weren't hydrated first.

2. commands.ts: New /gsd config slash command that lets users configure
   API keys (Tavily, Brave, Context7, Jina, Groq) from within a running
   session. Keys are saved to auth.json and activated immediately.
   No need to exit the session and run gsd config externally.

3. command-search-provider.ts: Show native Anthropic web search status
   when using Claude models, so users know search works even without
   Brave/Tavily keys.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-15 08:35:27 +01:00
Colin Johnson
fe03743b08 fix: guard against newer synced resources (#445)
Co-authored-by: TÂCHES <afromanguy@me.com>
2026-03-14 22:58:18 -06:00
Juan Francisco Lebrero
3a1b8f457d feat: opus 4.6 1M default, model selector UX, Discord onboarding (#290) 2026-03-14 08:43:56 -06:00
Juan Francisco Lebrero
0858092098 feat: add gsd update subcommand for self-update
Adds a CLI subcommand that checks npm for the latest version and
runs `npm install -g gsd-pi@latest` if an update is available.
Prints current/latest version and clear success/failure messages.
2026-03-13 18:47:33 -03:00
Facu_Viñas
5a2ed4eb05 feat: add startup update check with 24h cache
Queries npm registry at most once per 24h to check if a newer version
of gsd-pi is available. Displays a non-blocking banner in interactive
mode when an update exists. The check is fire-and-forget — network
errors or timeouts never block startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 14:28:43 -03:00
TÂCHES
2a3c2b5194 Merge pull request #151 from dbachelder/fix/pi-provider-reuse-and-extension-loading
fix: reuse Pi provider config and load Pi extensions correctly
2026-03-12 22:25:15 -06:00
Lex Christopherson
c80d640d35 feat: vendor Pi source into workspace monorepo
Vendor all 4 Pi packages (tui, ai, agent-core, coding-agent) from
pi-mono v0.57.1 as @gsd/* workspace packages under packages/. This
replaces the compiled npm dependency (@mariozechner/pi-coding-agent)
and patch-package workflow, giving direct source access for
modifications.

- Copy Pi source from pi-mono v0.57.1 into packages/
- Create workspace package.json + tsconfig.json for each package
- Rename ~240 imports from @mariozechner/pi-* to @gsd/pi-*
- Apply existing patches as source edits (setModel persist, VT input)
- Remove @mariozechner/pi-coding-agent dep and patch-package
- Update build pipeline to build packages in dependency order
- Add pi-upstream git remote for future selective syncing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 21:55:17 -06:00
dan
00cb2f36a8 fix: reuse pi provider config and extension loading 2026-03-12 20:44:09 -07:00
vp275
d7a90cf0e6 Add --continue / -c flag to resume the most recent session
Uses the existing SessionManager.continueRecent() from the Pi SDK
to load the most recent session for the current working directory.
Mirrors the --continue flag already available in the base Pi CLI.
2026-03-13 07:51:29 +05:30
Lex Christopherson
b72d852771 feat: migrate provider credentials from existing Pi install
Closes #122

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 11:08:34 -06:00
TÂCHES
e93a44d967 feat: add clack-based onboarding wizard and gsd config command (#118)
Replace the plain-text API-key-only wizard with a branded, clack-based
onboarding experience that guides first-launch users through LLM provider
authentication (OAuth or API key), optional tool API keys, and a summary.

- Create src/logo.ts as single source of truth for ASCII logo
- Create src/onboarding.ts with shouldRunOnboarding() and runOnboarding()
- Trim src/wizard.ts to env hydration only (loadStoredEnvKeys)
- Wire onboarding into src/cli.ts, add `gsd config` subcommand
- Remove duplicate first-launch banner from src/loader.ts

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 10:02:00 -06:00
Lex Christopherson
254c3c8931 fix: address 11 community-reported bugs across CLI, auto-mode, and extensions
CLI routing (#81, #107):
- Import and route --mode rpc to runRpcMode() instead of silently falling through to runPrintMode
- Add TTY guard before interactive mode — exit with helpful message when stdin is not a TTY
- Add --version and --help flags

Auto-mode infinite loop (#96):
- Move summarizing/complete-slice dispatch before reassessment check (D1) — ensures mergeSliceToMain always runs
- Add per-unit dispatch counter to detect alternating loops like A→B→A→B (D3)

Windows shell escaping (#106, #98):
- Platform-aware escapeShellArg() in mcporter extension — double quotes on Windows, single quotes on Unix

CRASH: parseSummary (#91):
- Add asStringArray() helper to safely coerce YAML bare scalars (e.g. "none") to string arrays
- Applied to all 7 frontmatter fields that expect string[]

Google Search model (#99):
- Replace hardcoded gemini-3-flash-preview with env var GEMINI_SEARCH_MODEL (default: gemini-2.5-flash)

Worktree branch collision (#84):
- Check git worktree list before checkout to detect branches already in use by another worktree

Migration UX (#90, #93):
- Improve error messages to distinguish migration from new project setup, suggest /gsd:new-project

Keyboard shortcuts (#100, #104):
- Document terminal protocol requirement in shortcut descriptions — Ctrl+Alt combos need Kitty/modifyOtherKeys

Closes #81, #84, #91, #96, #99, #106, #107
Addresses #90, #93, #95, #98, #100, #104

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 08:37:00 -06:00
Lex Christopherson
5eb02e9a1c fix: auto-commit before branch switch and migrate legacy flat sessions
ensureSliceBranch() now auto-commits dirty files before git checkout,
preventing "would be overwritten" errors when doctor/STATE.md rebuild
leaves uncommitted changes between slice dispatches. (closes #63)

On startup, migrate any .jsonl session files from the flat
~/.gsd/sessions/ directory into the per-cwd subdirectory so /resume
can find sessions created before per-directory scoping was added.
(closes #64)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 17:07:54 -06:00
Lex Christopherson
d4a46beef7 fix: support print/JSON mode in cli.js so subagents don't hang
cli.ts unconditionally entered InteractiveMode, ignoring --mode, -p,
--no-session and other flags the subagent extension passes to child
processes. The child would wait for TTY input that never arrives
(stdin is "ignore"), causing the parent to hang forever on "working".

Parse CLI args to detect print/subagent mode and route to runPrintMode()
with proper session, model, extension, and system prompt handling.

Closes #45

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 11:21:12 -06:00
TÂCHES
0d251d9707 fix: bootstrap managed tools and gh auth
Preserve the original #39 fix while adding the missing hardening and regression coverage. Credit to @LuxVTZ for the original fix incorporated here.
2026-03-11 10:52:45 -06:00
vp275
f307923db2 fix: scope session list to current working directory
Sessions are stored in a single flat ~/.gsd/sessions/ directory, so
/resume shows sessions from all projects regardless of which folder
you're in.

Use per-cwd subdirectories under ~/.gsd/sessions/ with the same
path encoding the upstream SDK uses (--path-segments--), so /resume
only lists sessions from the current working directory.
2026-03-11 21:39:02 +05:30
jonathancostin
0b1f02219b fix: restore scoped models from settings on new session startup (#22) 2026-03-11 06:57:55 -06:00
Vedant
afa1fffaac fix: startup fallback overwrites user's default model with Sonnet (#29) 2026-03-11 06:57:31 -06:00
Lex Christopherson
cce10ffc89 fix: validate default model against full registry on every startup
Uses getAll() instead of getAvailable() so stale models like grok-2
are caught even when the user has no auth for the correct provider yet.
Resets thinking to off when the configured model was invalid.
2026-03-11 01:51:48 -06:00
Lex Christopherson
b364e369d5 fix: remove circular self-dependency, default to anthropic/claude-sonnet-4-6 with thinking off
- Remove gsd-pi from its own dependencies (circular dep caused ENOTEMPTY install failures)
- Auto-select anthropic/claude-sonnet-4-6 as default model for new installs
- Reset to valid model if configured model no longer exists in registry
- Default thinking level to off
2026-03-11 01:47:36 -06:00
Lex Christopherson
3086e5d979 fix(cli): match default model by id.includes('sonnet') — API returns dated IDs not aliases 2026-03-11 01:33:34 -06:00
Lex Christopherson
fc9da03cbf fix: use claude-sonnet-4-6 as default model 2026-03-10 23:55:12 -06:00
Lex Christopherson
0181ff2dca fix: auto-select default model after login to prevent 'No model configured' error
When users logged in via /login but never explicitly ran /model, the agent
would throw 'No model configured' on every action. Now GSD auto-selects
a default model from available authenticated providers on startup.

Preference order: claude-sonnet-4-20250514 > any Anthropic model > first available.

Also documented /model command in README Getting Started section.

Closes #4
2026-03-10 23:54:33 -06:00
Lex Christopherson
3bd2f8cb63 Initial commit 2026-03-10 22:28:37 -06:00