Skip to content

🧭 feat: Add Guided Worker Setup And Saved Profiles - #339

Open
lia-by-librechat[bot] wants to merge 3 commits into
mainfrom
lia/guided-machine-setup
Open

lia-by-librechat[bot] wants to merge 3 commits into
mainfrom
lia/guided-machine-setup

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

CLI foundation for simpler machine onboarding. Owners currently pair separately, assemble startup flags, and repeat configuration on every restart.

  • Add guided librechat-code setup: workspace/access choices, hidden pairing-code entry, confirmation, and sandbox dependency checks before redemption.
  • Persist a private versioned profile separately from the machine key. Plain run loads it when no legacy configuration exists; run --profile <file> selects another.
  • Keep writes/commands off unless enabled. Refuse identity/profile replacement, control files exposed through workspaces, insecure remote URLs, and code-bearing redirects.
  • Support automation with explicit options and --code-stdin. Preserve existing pair and environment-variable startup.

This is not all of slice 1. It uses current LibreChat one-time pairing. Browser/OAuth approval sessions remain outstanding. Startup recovery is separate in #341; diagnostics/service/lifecycle UI remain follow-ups.

Verification

  • Worker build and npx --no-install tsc --noEmit passed on Node 24.16.0.
  • 67 focused onboarding/profile/pairing tests passed with a temporary test-only ancestor-metadata fixture. Production storage checks are unchanged; this sandbox exposes /, /tmp, and /home as UID 65534.
  • Four terminal history/kill-buffer regressions passed without that fixture. The history and kill-buffer cases reproduced the disclosures before their fixes.
  • Updated real pseudo-terminal walkthrough: accept, decline, Ctrl-C, and EOF at both hidden and confirmation prompts passed. Secret editing stayed hidden and cancellation made no pairing request. Inspector confirmed the discarded secret reader held one kill-buffer entry while the fresh confirmation reader held none.
  • Original legacy CLI/storage selection: 68 passed, 4 skipped. Original terminal accept/decline/Ctrl-C walkthrough passed.
  • No browser/auth UI change or deployed end-to-end enrollment test.

Review

Current head: 3fd0d5dffc8f701f6f17694b07691f022174b51d.

Independent review found two P2s: readline history retained the secret (fixed in a514ea7), then the kill buffer retained secret editing state (fixed in 3fd0d5d). Swept the lifecycle by invariant: prompts use disposable readline instances. Independent review of 3fd0d5d completed with no findings. Both P2s are verified fixed; no findings were rejected. Current-head CI has no failures; the Lambda MicroVM image check is still pending.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review head: acde365. Adds guided CLI pairing/access selection, separate private profiles, profile-aware startup, and regression coverage. Browser approval is a follow-up; existing pairing remains supported.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review head: a514ea7. Independent review of acde365 found one P2: hidden pairing codes could be recalled visibly from readline history. Fixed in a514ea7 by disabling history. Added terminal-mode Up/Ctrl-P regression coverage, reproduced failing before the fix and passing afterward. Build/typecheck passed; 64 focused onboarding tests passed with the previously disclosed storage-metadata fixture. New-head independent review and CI are running. Browser/OAuth approval remains outside this CLI-foundation PR.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Review head: 3fd0d5d. Finding ledger: 339-R1 (P2, readline history) fixed in a514ea7; 339-R2 (P2, retained secret editing/kill buffer) fixed in 3fd0d5d. After the second actionable round, swept the prompt lifecycle by invariant: every prompt now owns a disposable readline instance, closed before output is unmuted. History and kill/yank regressions pass; 67 focused onboarding tests and build/no-emit typecheck pass. Fresh exact-head independent review and CI are running. The prior head had an API input-cache assertion failure in unchanged code; the new head has a new CI run.

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Independent review completed for 3fd0d5d: no findings. Both prior P2s are verified fixed; none rejected. Build/no-emit typecheck, 67 focused onboarding tests (with the disclosed storage fixture), four fixture-free terminal editing regressions, real-terminal acceptance/cancellation, and inspector state checks passed. Browser/OAuth approval is still outstanding.

@danny-avila

Copy link
Copy Markdown
Collaborator

@codex review the latest head, final review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-20T20:56:41.467443Z 3fd0d5d Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 3fd0d5dffc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants