Skip to content

Add autonomous credential login - #74

Merged
altaywtf merged 1 commit into
mainfrom
feat/autonomous-auth
Aug 26, 2026
Merged

Add autonomous credential login#74
altaywtf merged 1 commit into
mainfrom
feat/autonomous-auth

Conversation

@altaywtf

Copy link
Copy Markdown
Member

Adds a headless credential flow for authorized unattended profiles.

  • accepts five redacted PUTIO_CLI_LOGIN_* environment values behind auth login --from-env
  • generates RFC 6238 TOTP codes locally and persists only the OAuth token
  • requires a named profile and rejects interactive-only flags
  • narrows the consumer skill to actual put.io CLI operations

Verified with pnpm exec vp run verify: 34 files and 352 tests pass.

Copilot AI lite review requested due to automatic review settings August 26, 2026 18:21
@altaywtf
altaywtf merged commit 5fd5415 into main Aug 26, 2026
7 checks passed
@altaywtf
altaywtf deleted the feat/autonomous-auth branch August 26, 2026 18:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a headless “credential login” path to the put.io CLI (auth login --from-env) intended for unattended, authorized profiles. It introduces local RFC 6238 TOTP generation, loads a redacted credential bundle from five PUTIO_CLI_LOGIN_* environment variables, and updates CLI metadata/docs/consumer skill guidance accordingly.

Changes:

  • Add auth login --from-env flow that requires --profile, rejects device-only flags, performs SDK credential login + TOTP verification, and persists only the OAuth token.
  • Introduce an internal TOTP generator (src/internal/totp.ts) with RFC 6238 SHA-1 vector tests.
  • Extend CLI metadata, i18n terminal rendering, and consumer-facing docs/skill prompts to reflect the new automation-friendly login option.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/test-support/command-path-mocks.ts Extends command-path mocks to cover credential login + TOTP generation.
src/internal/totp.ts Adds local RFC 6238 TOTP generation implementation.
src/internal/totp.test.ts Adds unit tests covering RFC vectors, invalid secrets, and grouped secrets.
src/internal/terminal/auth-terminal.ts Extends login success terminal output with an auth “method” field.
src/internal/terminal/auth-terminal.test.ts Updates terminal rendering test to assert the new “method” line.
src/internal/metadata.ts Exposes the five credential-login env var names in describe metadata.
src/internal/metadata.test.ts Validates auth login flag metadata and credential env mapping in tests.
src/internal/env.ts Defines ENV_CLI_LOGIN_* constants for credential login env vars.
src/internal/config.ts Adds redacted credential auth config resolution via resolveCliCredentialAuthConfig.
src/internal/config.test.ts Adds tests for resolving credential config (redacted) and failing closed when incomplete.
src/i18n/catalog/en.ts Adds i18n string for the login success “method” line.
src/commands/auth.ts Implements auth login --from-env flow and wires it into command specs/output.
src/command-paths.test.ts Adds command-path test coverage for credential login behavior and validation errors.
skills/putio-cli/SKILL.md Narrows and updates consumer skill guidance, including the new headless login flow.
skills/putio-cli/references/auth.md Updates auth reference docs to prefer --from-env for unattended credential payloads.
skills/putio-cli/agents/openai.yaml Simplifies the agent default prompt to a minimal directive.
README.md Documents unattended credential login usage and the new recommended headless flow.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/internal/config.ts
Comment thread src/internal/totp.ts
Comment thread src/internal/totp.ts
putio-releaser Bot added a commit that referenced this pull request Aug 26, 2026
## [1.7.0](v1.6.4...v1.7.0) (2026-08-26)

### Features

* add autonomous credential login ([#74](#74)) ([5fd5415](5fd5415))
@putio-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.7.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c5c1585299

ℹ️ 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".

Comment thread src/commands/auth.ts
Comment thread src/commands/auth.ts
Comment thread src/internal/totp.ts
Comment thread src/commands/auth.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants