Skip to content

feat(auth): Add auth refresh-token view command#36

Merged
henningmu merged 1 commit into
mainfrom
henningmu/sdk-0-5-refresh-token
Jun 18, 2026
Merged

feat(auth): Add auth refresh-token view command#36
henningmu merged 1 commit into
mainfrom
henningmu/sdk-0-5-refresh-token

Conversation

@henningmu

@henningmu henningmu commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary

  • update @doist/comms-sdk to 0.5.0 and @doist/cli-core to 0.26.0
  • wire the cli-core refresh-token view attacher into tdc auth refresh-token view
  • preserve global/per-command --user behavior for bundle-aware auth reads
  • update auth tests, README, and generated Comms CLI skill content

Verification

  • npx vitest run src/commands/auth/auth.test.ts
  • npm run type-check
  • npm run build && npm run sync:skill
  • npm test
  • npm run lint:check
  • npm run check:skill-sync
  • node dist/index.js auth refresh-token --help
  • node dist/index.js auth refresh-token view --help

@doistbot doistbot requested a review from nats12 June 18, 2026 12:11
@henningmu henningmu changed the title Add auth refresh-token view command feat(auth): Add auth refresh-token view command Jun 18, 2026
@henningmu henningmu self-assigned this Jun 18, 2026
@henningmu henningmu added the 👀 Show PR PR must be reviewed before or after merging label Jun 18, 2026
@henningmu henningmu requested a review from scottlovegrove June 18, 2026 12:13

@doistbot doistbot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This PR wires up the tdc auth refresh-token view command using the newly updated @doist/cli-core attacher, with consistent test coverage and skill content updates.

Few things worth tightening:

  • The global --user flag isn't fully resolved before calling activeBundle(), so a non-existent account falls into the generic not-authenticated path instead of ACCOUNT_NOT_FOUND — mirror the pre-resolution that clear() already does with findAccountInStore().
  • When COMMS_API_TOKEN is set without --user, the store resolves the env credential (which has no refresh token) instead of the stored OAuth account, causing AUTH_REFRESH_UNAVAILABLE even when a valid refresh token exists — add the same env-var guard that auth token view already uses.

Share FeedbackReview Logs

Comment thread src/commands/auth/store-wrap.ts
Comment thread src/commands/auth/index.ts
@henningmu henningmu merged commit 04877b7 into main Jun 18, 2026
6 of 8 checks passed
@henningmu henningmu deleted the henningmu/sdk-0-5-refresh-token branch June 18, 2026 12:18
doist-release-bot Bot added a commit that referenced this pull request Jun 18, 2026
## [1.8.0](v1.7.0...v1.8.0) (2026-06-18)

### Features

* **auth:** Add auth refresh-token view command ([#36](#36)) ([04877b7](04877b7))
@doist-release-bot

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.8.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

released 👀 Show PR PR must be reviewed before or after merging

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants