feat(cli): silent login refresh, scenario agent creds store, delivery_mode#37
Merged
George-iam merged 3 commits intomainfrom Mar 14, 2026
Merged
Conversation
- Add `axme tasks submit <id> --outcome <outcome>` for arbitrary outcomes beyond approve/reject (escalated, provided, deferred, submitted, etc.) - Add --comment, --data (key=value pairs), --data-json (JSON object) flags - Improve submitTaskResult output: shows actual outcome instead of hardcoded "approved"/"rejected" verb - Add 5 new unit tests for submit payload construction and validation All tasks subcommands now complete: list, get, approve, reject, submit. Made-with: Cursor
…_mode support - main.go: add silent token refresh on `axme login` — if a valid refresh_token exists, silently renews credentials without OTP flow; add --force flag to override; show file-store notice only once (FileStoreNoticeSeen persisted in config) - scenarios.go: add scenarioAgentCreds store (~/.config/axme/scenario-agents.json) for persisting provisioned agent credentials; add delivery_mode field to scenarioAgentEntry; add scenarioWorkflowStep struct for typed workflow steps - login_test.go: tests for silent refresh logic (mockRefreshServer, verify OTP flow skipped when token valid, OTP flow called when token expired) Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
axme loginnow silently renews credentials via refresh_token without OTP if session is still active;--forceflag to override. File-store notice shown only once (FileStoreNoticeSeenpersisted in config).~/.config/axme/scenario-agents.jsonfor reuse acrossapplycalls.delivery_modeon agent entries: scenario agent entries now carrydelivery_modefield (stream/poll/http/inbox) for typed dispatch.login_test.go: unit tests for silent refresh logic (mock HTTP server, verify OTP skipped when token valid, OTP called when expired).Test plan
axme loginwith existing valid session → "Session refreshed" without OTPaxme login --force→ always prompts OTPgo test ./cmd/axme/... -run TestLoginpassesaxme scenarios applywithdelivery_modefield in scenario JSON worksMade with Cursor