Skip to content

Update for User Tokens#147

Merged
donatj merged 7 commits into
masterfrom
feat/shield-key
Jul 26, 2026
Merged

Update for User Tokens#147
donatj merged 7 commits into
masterfrom
feat/shield-key

Conversation

@donatj

@donatj donatj commented Jul 25, 2026

Copy link
Copy Markdown
Member

Adds optional shield-key support to the CLI and SDK without changing existing per-shield-token workflows.

  • --key sends the shield_key form field to select or create a shield through the API
  • --token explicitly supplies the token and takes precedence over environment variables
  • With --key, the CLI uses SHIELDED_USER_TOKEN first, then falls back to SHIELDED_TOKEN
  • Without --key, the CLI uses only SHIELDED_TOKEN, preserving existing behavior
  • The CLI remains token-agnostic: it forwards the token supplied or selected and leaves token validation to the API
  • Includes updated user-oriented documentation and regenerated distribution files

Copilot AI review requested due to automatic review settings July 25, 2026 12:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds token-agnostic support for passing Shield selection fields through the CLI and SDK, enabling user-token workflows that require an API id and optionally a shield_key.

Changes:

  • Adds id and shieldKey fields to the SDK request payload (mapped to id / shield_key form fields).
  • Exposes --id and --shield-key CLI flags and documents user API token usage.
  • Regenerates distribution artifacts to include the new options.

Reviewed changes

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

Show a summary per file
File Description
src/sdk.ts Extends SDK options to forward id and shield_key form fields.
src/bin.ts Adds CLI flags to pass id / shieldKey into the SDK.
README.md Documents user API token behavior and new CLI options.
dist/sdk.js Regenerated build output for SDK request changes.
dist/sdk.d.ts Regenerated type definitions reflecting new SDK fields.
dist/pkg.json Regenerated packaging metadata for distribution.
dist/bin.js Regenerated build output for CLI option changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/bin.ts Outdated
Comment thread src/bin.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 3 out of 7 changed files in this pull request and generated 1 comment.

Comment thread src/bin.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@donatj donatj changed the title Add shield key API options Update for User Tokens Jul 26, 2026
@donatj
donatj merged commit c705f35 into master Jul 26, 2026
2 checks passed
@donatj
donatj deleted the feat/shield-key branch July 26, 2026 23:06
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